From 87a79cff5627f6d09cf8907587e3be6b5676f120 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 1 Jun 2021 05:12:51 +0000 Subject: [PATCH] CodeGen from PR 13718 in Azure/azure-rest-api-specs Merge e555055006b24ccd0481c739014edf726df9e881 into 6a38cb16662cd02a3659665f9242d5ce011e032e --- sdk/cdn/azure-mgmt-cdn/MANIFEST.in | 1 + sdk/cdn/azure-mgmt-cdn/_meta.json | 11 + .../azure/mgmt/cdn/_cdn_management_client.py | 19 ++ .../azure/mgmt/cdn/_metadata.json | 130 ++++++---- .../azure-mgmt-cdn/azure/mgmt/cdn/_version.py | 2 +- .../mgmt/cdn/aio/_cdn_management_client.py | 18 ++ .../_afd_custom_domains_operations.py | 48 ++-- .../operations/_afd_endpoints_operations.py | 56 ++--- .../_afd_origin_groups_operations.py | 42 ++-- .../aio/operations/_afd_origins_operations.py | 38 +-- .../operations/_afd_profiles_operations.py | 8 +- .../_cdn_management_client_operations.py | 12 +- .../operations/_custom_domains_operations.py | 224 ++++++++++++++---- .../aio/operations/_edge_nodes_operations.py | 4 +- .../aio/operations/_endpoints_operations.py | 86 +++---- .../operations/_log_analytics_operations.py | 24 +- .../_managed_rule_sets_operations.py | 4 +- .../mgmt/cdn/aio/operations/_operations.py | 4 +- .../operations/_origin_groups_operations.py | 38 +-- .../cdn/aio/operations/_origins_operations.py | 38 +-- .../aio/operations/_policies_operations.py | 30 +-- .../aio/operations/_profiles_operations.py | 54 ++--- .../operations/_resource_usage_operations.py | 4 +- .../cdn/aio/operations/_routes_operations.py | 38 +-- .../aio/operations/_rule_sets_operations.py | 32 +-- .../cdn/aio/operations/_rules_operations.py | 38 +-- .../cdn/aio/operations/_secrets_operations.py | 38 +-- .../_security_policies_operations.py | 38 +-- .../aio/operations/_validate_operations.py | 4 +- .../azure/mgmt/cdn/models/__init__.py | 4 +- .../models/_cdn_management_client_enums.py | 22 +- .../azure/mgmt/cdn/models/_models.py | 115 ++++----- .../azure/mgmt/cdn/models/_models_py3.py | 135 +++++------ .../_afd_custom_domains_operations.py | 28 +-- .../operations/_afd_endpoints_operations.py | 32 +-- .../_afd_origin_groups_operations.py | 24 +- .../cdn/operations/_afd_origins_operations.py | 22 +- .../operations/_afd_profiles_operations.py | 4 +- .../_cdn_management_client_operations.py | 6 +- .../operations/_custom_domains_operations.py | 210 ++++++++++++---- .../cdn/operations/_edge_nodes_operations.py | 2 +- .../cdn/operations/_endpoints_operations.py | 50 ++-- .../operations/_log_analytics_operations.py | 12 +- .../_managed_rule_sets_operations.py | 2 +- .../azure/mgmt/cdn/operations/_operations.py | 2 +- .../operations/_origin_groups_operations.py | 22 +- .../cdn/operations/_origins_operations.py | 22 +- .../cdn/operations/_policies_operations.py | 16 +- .../cdn/operations/_profiles_operations.py | 30 +-- .../operations/_resource_usage_operations.py | 2 +- .../mgmt/cdn/operations/_routes_operations.py | 22 +- .../cdn/operations/_rule_sets_operations.py | 18 +- .../mgmt/cdn/operations/_rules_operations.py | 22 +- .../cdn/operations/_secrets_operations.py | 22 +- .../_security_policies_operations.py | 22 +- .../cdn/operations/_validate_operations.py | 2 +- 56 files changed, 1153 insertions(+), 800 deletions(-) create mode 100644 sdk/cdn/azure-mgmt-cdn/_meta.json diff --git a/sdk/cdn/azure-mgmt-cdn/MANIFEST.in b/sdk/cdn/azure-mgmt-cdn/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/cdn/azure-mgmt-cdn/MANIFEST.in +++ b/sdk/cdn/azure-mgmt-cdn/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/cdn/azure-mgmt-cdn/_meta.json b/sdk/cdn/azure-mgmt-cdn/_meta.json new file mode 100644 index 000000000000..194e945085de --- /dev/null +++ b/sdk/cdn/azure-mgmt-cdn/_meta.json @@ -0,0 +1,11 @@ +{ + "autorest": "3.4.2", + "use": [ + "@autorest/python@5.8.0", + "@autorest/modelerfour@4.19.2" + ], + "commit": "d099dca71ad11e78f58b3c8baed516e098418185", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/cdn/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.0 --use=@autorest/modelerfour@4.19.2 --version=3.4.2", + "readme": "specification/cdn/resource-manager/readme.md" +} \ No newline at end of file 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 f61aa97cc6d1..de237a699dd3 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 @@ -16,6 +16,7 @@ from typing import Any, Optional from azure.core.credentials import TokenCredential + from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import CdnManagementClientConfiguration from .operations import ProfilesOperations @@ -162,6 +163,24 @@ def __init__( self.managed_rule_sets = ManagedRuleSetsOperations( self._client, self._config, self._serialize, self._deserialize) + def _send_request(self, http_request, **kwargs): + # type: (HttpRequest, Any) -> HttpResponse + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.HttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + def close(self): # type: () -> None self._client.close() diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_metadata.json b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_metadata.json index 383e91c8a295..a609a8ae0551 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_metadata.json +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/_metadata.json @@ -9,7 +9,9 @@ "custom_base_url": null, "azure_arm": true, "has_lro_operations": true, - "client_side_validation": false + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"CdnManagementClientConfiguration\"], \"._operations_mixin\": [\"CdnManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}", + "async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"CdnManagementClientConfiguration\"], \"._operations_mixin\": [\"CdnManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" }, "global_parameters": { "sync": { @@ -28,13 +30,13 @@ }, "async": { "credential": { - "signature": "credential, # type: \"AsyncTokenCredential\"", + "signature": "credential: \"AsyncTokenCredential\",", "description": "Credential needed for the client to connect to Azure.", "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", "required": true }, "subscription_id": { - "signature": "subscription_id, # type: str", + "signature": "subscription_id: str,", "description": "Azure Subscription ID.", "docstring_type": "str", "required": true @@ -42,14 +44,58 @@ }, "constant": { }, - "call": "credential, subscription_id" + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } }, "config": { "credential": true, "credential_scopes": ["https://management.azure.com/.default"], "credential_default_policy_type": "BearerTokenCredentialPolicy", "credential_default_policy_type_has_async_version": true, - "credential_key_header_name": null + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { "profiles": "ProfilesOperations", @@ -76,43 +122,45 @@ "managed_rule_sets": "ManagedRuleSetsOperations" }, "operation_mixins": { - "check_name_availability" : { - "sync": { - "signature": "def check_name_availability(\n self,\n check_name_availability_input, # type: \"_models.CheckNameAvailabilityInput\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Check the availability of a resource name. This is needed for resources where name is globally\nunique, such as a CDN endpoint.\n\n:param check_name_availability_input: Input to check.\n:type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CheckNameAvailabilityOutput, or the result of cls(response)\n:rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def check_name_availability(\n self,\n check_name_availability_input: \"_models.CheckNameAvailabilityInput\",\n **kwargs\n) -\u003e \"_models.CheckNameAvailabilityOutput\":\n", - "doc": "\"\"\"Check the availability of a resource name. This is needed for resources where name is globally\nunique, such as a CDN endpoint.\n\n:param check_name_availability_input: Input to check.\n:type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CheckNameAvailabilityOutput, or the result of cls(response)\n:rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "check_name_availability_input" - }, - "check_name_availability_with_subscription" : { - "sync": { - "signature": "def check_name_availability_with_subscription(\n self,\n check_name_availability_input, # type: \"_models.CheckNameAvailabilityInput\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Check the availability of a resource name. This is needed for resources where name is globally\nunique, such as a CDN endpoint.\n\n:param check_name_availability_input: Input to check.\n:type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CheckNameAvailabilityOutput, or the result of cls(response)\n:rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "async": { - "coroutine": true, - "signature": "async def check_name_availability_with_subscription(\n self,\n check_name_availability_input: \"_models.CheckNameAvailabilityInput\",\n **kwargs\n) -\u003e \"_models.CheckNameAvailabilityOutput\":\n", - "doc": "\"\"\"Check the availability of a resource name. This is needed for resources where name is globally\nunique, such as a CDN endpoint.\n\n:param check_name_availability_input: Input to check.\n:type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CheckNameAvailabilityOutput, or the result of cls(response)\n:rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" - }, - "call": "check_name_availability_input" - }, - "validate_probe" : { - "sync": { - "signature": "def validate_probe(\n self,\n validate_probe_input, # type: \"_models.ValidateProbeInput\"\n **kwargs # type: Any\n):\n", - "doc": "\"\"\"Check if the probe path is a valid path and the file can be accessed. Probe path is the path to\na file hosted on the origin server to help accelerate the delivery of dynamic content via the\nCDN endpoint. This path is relative to the origin path specified in the endpoint configuration.\n\n:param validate_probe_input: Input to check.\n:type validate_probe_input: ~azure.mgmt.cdn.models.ValidateProbeInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateProbeOutput, or the result of cls(response)\n:rtype: ~azure.mgmt.cdn.models.ValidateProbeOutput\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}", + "operations": { + "check_name_availability" : { + "sync": { + "signature": "def check_name_availability(\n self,\n check_name_availability_input, # type: \"_models.CheckNameAvailabilityInput\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Check the availability of a resource name. This is needed for resources where name is globally\nunique, such as a CDN endpoint.\n\n:param check_name_availability_input: Input to check.\n:type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CheckNameAvailabilityOutput, or the result of cls(response)\n:rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def check_name_availability(\n self,\n check_name_availability_input: \"_models.CheckNameAvailabilityInput\",\n **kwargs: Any\n) -\u003e \"_models.CheckNameAvailabilityOutput\":\n", + "doc": "\"\"\"Check the availability of a resource name. This is needed for resources where name is globally\nunique, such as a CDN endpoint.\n\n:param check_name_availability_input: Input to check.\n:type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CheckNameAvailabilityOutput, or the result of cls(response)\n:rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "check_name_availability_input" }, - "async": { - "coroutine": true, - "signature": "async def validate_probe(\n self,\n validate_probe_input: \"_models.ValidateProbeInput\",\n **kwargs\n) -\u003e \"_models.ValidateProbeOutput\":\n", - "doc": "\"\"\"Check if the probe path is a valid path and the file can be accessed. Probe path is the path to\na file hosted on the origin server to help accelerate the delivery of dynamic content via the\nCDN endpoint. This path is relative to the origin path specified in the endpoint configuration.\n\n:param validate_probe_input: Input to check.\n:type validate_probe_input: ~azure.mgmt.cdn.models.ValidateProbeInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateProbeOutput, or the result of cls(response)\n:rtype: ~azure.mgmt.cdn.models.ValidateProbeOutput\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + "check_name_availability_with_subscription" : { + "sync": { + "signature": "def check_name_availability_with_subscription(\n self,\n check_name_availability_input, # type: \"_models.CheckNameAvailabilityInput\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Check the availability of a resource name. This is needed for resources where name is globally\nunique, such as a CDN endpoint.\n\n:param check_name_availability_input: Input to check.\n:type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CheckNameAvailabilityOutput, or the result of cls(response)\n:rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def check_name_availability_with_subscription(\n self,\n check_name_availability_input: \"_models.CheckNameAvailabilityInput\",\n **kwargs: Any\n) -\u003e \"_models.CheckNameAvailabilityOutput\":\n", + "doc": "\"\"\"Check the availability of a resource name. This is needed for resources where name is globally\nunique, such as a CDN endpoint.\n\n:param check_name_availability_input: Input to check.\n:type check_name_availability_input: ~azure.mgmt.cdn.models.CheckNameAvailabilityInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: CheckNameAvailabilityOutput, or the result of cls(response)\n:rtype: ~azure.mgmt.cdn.models.CheckNameAvailabilityOutput\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "check_name_availability_input" }, - "call": "validate_probe_input" + "validate_probe" : { + "sync": { + "signature": "def validate_probe(\n self,\n validate_probe_input, # type: \"_models.ValidateProbeInput\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Check if the probe path is a valid path and the file can be accessed. Probe path is the path to\na file hosted on the origin server to help accelerate the delivery of dynamic content via the\nCDN endpoint. This path is relative to the origin path specified in the endpoint configuration.\n\n:param validate_probe_input: Input to check.\n:type validate_probe_input: ~azure.mgmt.cdn.models.ValidateProbeInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateProbeOutput, or the result of cls(response)\n:rtype: ~azure.mgmt.cdn.models.ValidateProbeOutput\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def validate_probe(\n self,\n validate_probe_input: \"_models.ValidateProbeInput\",\n **kwargs: Any\n) -\u003e \"_models.ValidateProbeOutput\":\n", + "doc": "\"\"\"Check if the probe path is a valid path and the file can be accessed. Probe path is the path to\na file hosted on the origin server to help accelerate the delivery of dynamic content via the\nCDN endpoint. This path is relative to the origin path specified in the endpoint configuration.\n\n:param validate_probe_input: Input to check.\n:type validate_probe_input: ~azure.mgmt.cdn.models.ValidateProbeInput\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ValidateProbeOutput, or the result of cls(response)\n:rtype: ~azure.mgmt.cdn.models.ValidateProbeOutput\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "validate_probe_input" + } } - }, - "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}", - "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\"]}}}" + } } \ No newline at end of file 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 ae876c37f272..48944bf3938a 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,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "11.0.0" +VERSION = "2.0.0" 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 f5e372c51d5f..06135b1a96e3 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 @@ -8,6 +8,7 @@ from typing import Any, Optional, TYPE_CHECKING +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer @@ -159,6 +160,23 @@ def __init__( self.managed_rule_sets = ManagedRuleSetsOperations( self._client, self._config, self._serialize, self._deserialize) + async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: + """Runs the network request through the client's chained policies. + + :param http_request: The network request you want to make. Required. + :type http_request: ~azure.core.pipeline.transport.HttpRequest + :keyword bool stream: Whether the response payload will be streamed. Defaults to True. + :return: The response of your network call. Does not do error handling on your response. + :rtype: ~azure.core.pipeline.transport.AsyncHttpResponse + """ + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + http_request.url = self._client.format_url(http_request.url, **path_format_arguments) + stream = kwargs.pop("stream", True) + pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs) + return pipeline_response.http_response + async def close(self) -> None: await self._client.close() diff --git a/sdk/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 7003721bb73b..c3c9bb5b07d5 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 @@ -47,7 +47,7 @@ def list_by_profile( self, resource_group_name: str, profile_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AFDDomainListResult"]: """Lists existing AzureFrontDoor domains. @@ -107,7 +107,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -123,7 +123,7 @@ async def get( resource_group_name: str, profile_name: str, custom_domain_name: str, - **kwargs + **kwargs: Any ) -> "_models.AFDDomain": """Gets an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. @@ -171,7 +171,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AFDDomain', pipeline_response) @@ -188,7 +188,7 @@ async def _create_initial( profile_name: str, custom_domain_name: str, custom_domain: "_models.AFDDomain", - **kwargs + **kwargs: Any ) -> "_models.AFDDomain": cls = kwargs.pop('cls', None) # type: ClsType["_models.AFDDomain"] error_map = { @@ -227,7 +227,7 @@ async def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -251,7 +251,7 @@ async def begin_create( profile_name: str, custom_domain_name: str, custom_domain: "_models.AFDDomain", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.AFDDomain"]: """Creates a new domain within the specified profile. @@ -265,8 +265,8 @@ async def begin_create( :type custom_domain: ~azure.mgmt.cdn.models.AFDDomain :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AFDDomain or the result of cls(response) @@ -327,7 +327,7 @@ async def _update_initial( profile_name: str, custom_domain_name: str, custom_domain_update_properties: "_models.AFDDomainUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.AFDDomain": cls = kwargs.pop('cls', None) # type: ClsType["_models.AFDDomain"] error_map = { @@ -366,7 +366,7 @@ async def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -387,7 +387,7 @@ async def begin_update( profile_name: str, custom_domain_name: str, custom_domain_update_properties: "_models.AFDDomainUpdateParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.AFDDomain"]: """Updates an existing domain within a profile. @@ -401,8 +401,8 @@ async def begin_update( :type custom_domain_update_properties: ~azure.mgmt.cdn.models.AFDDomainUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AFDDomain or the result of cls(response) @@ -462,7 +462,7 @@ async def _delete_initial( resource_group_name: str, profile_name: str, custom_domain_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -496,7 +496,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -509,7 +509,7 @@ async def begin_delete( resource_group_name: str, profile_name: str, custom_domain_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing AzureFrontDoor domain with the specified domain name under the specified subscription, resource group and profile. @@ -522,8 +522,8 @@ async def begin_delete( :type custom_domain_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -579,7 +579,7 @@ async def _refresh_validation_token_initial( resource_group_name: str, profile_name: str, custom_domain_name: str, - **kwargs + **kwargs: Any ) -> "_models.ValidationToken": cls = kwargs.pop('cls', None) # type: ClsType["_models.ValidationToken"] error_map = { @@ -613,7 +613,7 @@ async def _refresh_validation_token_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidationToken', pipeline_response) @@ -629,7 +629,7 @@ async def begin_refresh_validation_token( resource_group_name: str, profile_name: str, custom_domain_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ValidationToken"]: """Updates the domain validation token. @@ -641,8 +641,8 @@ async def begin_refresh_validation_token( :type custom_domain_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ValidationToken or the result of cls(response) 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 bb9f129209a1..822b7dd3fffa 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 @@ -47,7 +47,7 @@ def list_by_profile( self, resource_group_name: str, profile_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AFDEndpointListResult"]: """Lists existing AzureFrontDoor endpoints. @@ -107,7 +107,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -123,7 +123,7 @@ async def get( resource_group_name: str, profile_name: str, endpoint_name: str, - **kwargs + **kwargs: Any ) -> "_models.AFDEndpoint": """Gets an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. @@ -171,7 +171,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AFDEndpoint', pipeline_response) @@ -188,7 +188,7 @@ async def _create_initial( profile_name: str, endpoint_name: str, endpoint: "_models.AFDEndpoint", - **kwargs + **kwargs: Any ) -> "_models.AFDEndpoint": cls = kwargs.pop('cls', None) # type: ClsType["_models.AFDEndpoint"] error_map = { @@ -227,7 +227,7 @@ async def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -251,7 +251,7 @@ async def begin_create( profile_name: str, endpoint_name: str, endpoint: "_models.AFDEndpoint", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.AFDEndpoint"]: """Creates a new AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. @@ -266,8 +266,8 @@ async def begin_create( :type endpoint: ~azure.mgmt.cdn.models.AFDEndpoint :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AFDEndpoint or the result of cls(response) @@ -328,7 +328,7 @@ async def _update_initial( profile_name: str, endpoint_name: str, endpoint_update_properties: "_models.AFDEndpointUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.AFDEndpoint": cls = kwargs.pop('cls', None) # type: ClsType["_models.AFDEndpoint"] error_map = { @@ -367,7 +367,7 @@ async def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -388,7 +388,7 @@ async def begin_update( profile_name: str, endpoint_name: str, endpoint_update_properties: "_models.AFDEndpointUpdateParameters", - **kwargs + **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 @@ -405,8 +405,8 @@ async def begin_update( :type endpoint_update_properties: ~azure.mgmt.cdn.models.AFDEndpointUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AFDEndpoint or the result of cls(response) @@ -466,7 +466,7 @@ async def _delete_initial( resource_group_name: str, profile_name: str, endpoint_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -500,7 +500,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -513,7 +513,7 @@ async def begin_delete( resource_group_name: str, profile_name: str, endpoint_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing AzureFrontDoor endpoint with the specified endpoint name under the specified subscription, resource group and profile. @@ -526,8 +526,8 @@ async def begin_delete( :type endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -584,7 +584,7 @@ async def _purge_content_initial( profile_name: str, endpoint_name: str, contents: "_models.AfdPurgeParameters", - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -623,7 +623,7 @@ async def _purge_content_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -637,7 +637,7 @@ async def begin_purge_content( profile_name: str, endpoint_name: str, contents: "_models.AfdPurgeParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Removes a content from AzureFrontDoor. @@ -653,8 +653,8 @@ async def begin_purge_content( :type contents: ~azure.mgmt.cdn.models.AfdPurgeParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -711,7 +711,7 @@ def list_resource_usage( resource_group_name: str, profile_name: str, endpoint_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.UsagesListResult"]: """Checks the quota and actual usage of endpoints under the given CDN profile. @@ -774,7 +774,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -791,7 +791,7 @@ async def validate_custom_domain( profile_name: str, endpoint_name: str, custom_domain_properties: "_models.ValidateCustomDomainInput", - **kwargs + **kwargs: Any ) -> "_models.ValidateCustomDomainOutput": """Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. @@ -845,7 +845,7 @@ 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(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidateCustomDomainOutput', pipeline_response) 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 feef02f7a4bd..2f7de720a6f1 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 @@ -47,7 +47,7 @@ def list_by_profile( self, resource_group_name: str, profile_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AFDOriginGroupListResult"]: """Lists all of the existing origin groups within a profile. @@ -107,7 +107,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -123,7 +123,7 @@ async def get( resource_group_name: str, profile_name: str, origin_group_name: str, - **kwargs + **kwargs: Any ) -> "_models.AFDOriginGroup": """Gets an existing origin group within a profile. @@ -170,7 +170,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AFDOriginGroup', pipeline_response) @@ -187,7 +187,7 @@ async def _create_initial( profile_name: str, origin_group_name: str, origin_group: "_models.AFDOriginGroup", - **kwargs + **kwargs: Any ) -> "_models.AFDOriginGroup": cls = kwargs.pop('cls', None) # type: ClsType["_models.AFDOriginGroup"] error_map = { @@ -226,7 +226,7 @@ async def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -250,7 +250,7 @@ async def begin_create( profile_name: str, origin_group_name: str, origin_group: "_models.AFDOriginGroup", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.AFDOriginGroup"]: """Creates a new origin group within the specified profile. @@ -264,8 +264,8 @@ async def begin_create( :type origin_group: ~azure.mgmt.cdn.models.AFDOriginGroup :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AFDOriginGroup or the result of cls(response) @@ -326,7 +326,7 @@ async def _update_initial( profile_name: str, origin_group_name: str, origin_group_update_properties: "_models.AFDOriginGroupUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.AFDOriginGroup": cls = kwargs.pop('cls', None) # type: ClsType["_models.AFDOriginGroup"] error_map = { @@ -365,7 +365,7 @@ async def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -386,7 +386,7 @@ async def begin_update( profile_name: str, origin_group_name: str, origin_group_update_properties: "_models.AFDOriginGroupUpdateParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.AFDOriginGroup"]: """Updates an existing origin group within a profile. @@ -400,8 +400,8 @@ async def begin_update( :type origin_group_update_properties: ~azure.mgmt.cdn.models.AFDOriginGroupUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AFDOriginGroup or the result of cls(response) @@ -461,7 +461,7 @@ async def _delete_initial( resource_group_name: str, profile_name: str, origin_group_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -495,7 +495,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -508,7 +508,7 @@ async def begin_delete( resource_group_name: str, profile_name: str, origin_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing origin group within a profile. @@ -520,8 +520,8 @@ async def begin_delete( :type origin_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -577,7 +577,7 @@ def list_resource_usage( resource_group_name: str, profile_name: str, origin_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.UsagesListResult"]: """Checks the quota and actual usage of endpoints under the given CDN profile. @@ -640,7 +640,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/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 03e3cf733365..c1b2e9424ea7 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 @@ -48,7 +48,7 @@ def list_by_origin_group( resource_group_name: str, profile_name: str, origin_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AFDOriginListResult"]: """Lists all of the existing origins within an origin group. @@ -111,7 +111,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -128,7 +128,7 @@ async def get( profile_name: str, origin_group_name: str, origin_name: str, - **kwargs + **kwargs: Any ) -> "_models.AFDOrigin": """Gets an existing origin within an origin group. @@ -178,7 +178,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AFDOrigin', pipeline_response) @@ -196,7 +196,7 @@ async def _create_initial( origin_group_name: str, origin_name: str, origin: "_models.AFDOrigin", - **kwargs + **kwargs: Any ) -> "_models.AFDOrigin": cls = kwargs.pop('cls', None) # type: ClsType["_models.AFDOrigin"] error_map = { @@ -236,7 +236,7 @@ async def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -261,7 +261,7 @@ async def begin_create( origin_group_name: str, origin_name: str, origin: "_models.AFDOrigin", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.AFDOrigin"]: """Creates a new origin within the specified origin group. @@ -277,8 +277,8 @@ async def begin_create( :type origin: ~azure.mgmt.cdn.models.AFDOrigin :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AFDOrigin or the result of cls(response) @@ -342,7 +342,7 @@ async def _update_initial( origin_group_name: str, origin_name: str, origin_update_properties: "_models.AFDOriginUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.AFDOrigin": cls = kwargs.pop('cls', None) # type: ClsType["_models.AFDOrigin"] error_map = { @@ -382,7 +382,7 @@ async def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -404,7 +404,7 @@ async def begin_update( origin_group_name: str, origin_name: str, origin_update_properties: "_models.AFDOriginUpdateParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.AFDOrigin"]: """Updates an existing origin within an origin group. @@ -420,8 +420,8 @@ async def begin_update( :type origin_update_properties: ~azure.mgmt.cdn.models.AFDOriginUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either AFDOrigin or the result of cls(response) @@ -484,7 +484,7 @@ async def _delete_initial( profile_name: str, origin_group_name: str, origin_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -519,7 +519,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -533,7 +533,7 @@ async def begin_delete( profile_name: str, origin_group_name: str, origin_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing origin within an origin group. @@ -547,8 +547,8 @@ async def begin_delete( :type origin_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) 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 6df4d71edc95..d155fe9d3f10 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 @@ -45,7 +45,7 @@ def list_resource_usage( self, resource_group_name: str, profile_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.UsagesListResult"]: """Checks the quota and actual usage of endpoints under the given CDN profile. @@ -105,7 +105,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -121,7 +121,7 @@ async def check_host_name_availability( resource_group_name: str, profile_name: str, check_host_name_availability_input: "_models.ValidateCustomDomainInput", - **kwargs + **kwargs: Any ) -> "_models.ValidateCustomDomainOutput": """Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. @@ -172,7 +172,7 @@ 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(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidateCustomDomainOutput', pipeline_response) 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 8e1b0d1e19bf..ecb3e6d5ff26 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 @@ -23,7 +23,7 @@ class CdnManagementClientOperationsMixin: async def check_name_availability( self, check_name_availability_input: "_models.CheckNameAvailabilityInput", - **kwargs + **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. @@ -65,7 +65,7 @@ async def check_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CheckNameAvailabilityOutput', pipeline_response) @@ -79,7 +79,7 @@ async def check_name_availability( async def check_name_availability_with_subscription( self, check_name_availability_input: "_models.CheckNameAvailabilityInput", - **kwargs + **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. @@ -125,7 +125,7 @@ async def check_name_availability_with_subscription( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CheckNameAvailabilityOutput', pipeline_response) @@ -139,7 +139,7 @@ async def check_name_availability_with_subscription( async def validate_probe( self, validate_probe_input: "_models.ValidateProbeInput", - **kwargs + **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 @@ -186,7 +186,7 @@ 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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidateProbeOutput', pipeline_response) 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 9e9d9944c14f..e99535d353b8 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 @@ -48,7 +48,7 @@ def list_by_endpoint( resource_group_name: str, profile_name: str, endpoint_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.CustomDomainListResult"]: """Lists all of the existing custom domains within an endpoint. @@ -111,7 +111,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -128,7 +128,7 @@ async def get( profile_name: str, endpoint_name: str, custom_domain_name: str, - **kwargs + **kwargs: Any ) -> "_models.CustomDomain": """Gets an existing custom domain within an endpoint. @@ -178,7 +178,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CustomDomain', pipeline_response) @@ -196,7 +196,7 @@ async def _create_initial( endpoint_name: str, custom_domain_name: str, custom_domain_properties: "_models.CustomDomainParameters", - **kwargs + **kwargs: Any ) -> "_models.CustomDomain": cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomDomain"] error_map = { @@ -236,7 +236,7 @@ async def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -261,7 +261,7 @@ async def begin_create( endpoint_name: str, custom_domain_name: str, custom_domain_properties: "_models.CustomDomainParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.CustomDomain"]: """Creates a new custom domain within an endpoint. @@ -277,8 +277,8 @@ async def begin_create( :type custom_domain_properties: ~azure.mgmt.cdn.models.CustomDomainParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CustomDomain or the result of cls(response) @@ -341,7 +341,7 @@ async def _delete_initial( profile_name: str, endpoint_name: str, custom_domain_name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.CustomDomain"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.CustomDomain"]] error_map = { @@ -376,7 +376,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -395,7 +395,7 @@ async def begin_delete( profile_name: str, endpoint_name: str, custom_domain_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.CustomDomain"]: """Deletes an existing custom domain within an endpoint. @@ -409,8 +409,8 @@ async def begin_delete( :type custom_domain_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -466,29 +466,14 @@ def get_long_running_output(pipeline_response): return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}'} # type: ignore - async def disable_custom_https( + async def _disable_custom_https_initial( self, resource_group_name: str, profile_name: str, endpoint_name: str, custom_domain_name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.CustomDomain"]: - """Disable https delivery of the custom domain. - - :param resource_group_name: Name of the Resource group within the Azure subscription. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - :type endpoint_name: str - :param custom_domain_name: Name of the custom domain within an endpoint. - :type custom_domain_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: CustomDomain, or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CustomDomain or None - :raises: ~azure.core.exceptions.HttpResponseError - """ cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.CustomDomain"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -498,7 +483,7 @@ async def disable_custom_https( accept = "application/json" # Construct URL - url = self.disable_custom_https.metadata['url'] # type: ignore + url = self._disable_custom_https_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -522,7 +507,7 @@ async def disable_custom_https( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -533,18 +518,17 @@ async def disable_custom_https( return cls(pipeline_response, deserialized, {}) return deserialized - disable_custom_https.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/disableCustomHttps'} # type: ignore + _disable_custom_https_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/disableCustomHttps'} # type: ignore - async def enable_custom_https( + async def begin_disable_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, - **kwargs - ) -> Optional["_models.CustomDomain"]: - """Enable https delivery of the custom domain. + **kwargs: Any + ) -> AsyncLROPoller["_models.CustomDomain"]: + """Disable https delivery of the custom domain. :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str @@ -554,15 +538,74 @@ async def enable_custom_https( :type endpoint_name: str :param custom_domain_name: Name of the custom domain within an endpoint. :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. - :type custom_domain_https_parameters: ~azure.mgmt.cdn.models.CustomDomainHttpsParameters :keyword callable cls: A custom type or function that will be passed the direct response - :return: CustomDomain, or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CustomDomain or None - :raises: ~azure.core.exceptions.HttpResponseError + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomDomain"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._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, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('CustomDomain', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str'), + 'endpointName': self._serialize.url("endpoint_name", endpoint_name, 'str'), + 'customDomainName': self._serialize.url("custom_domain_name", custom_domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_disable_custom_https.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/disableCustomHttps'} # 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["_models.CustomDomainHttpsParameters"] = None, + **kwargs: Any + ) -> Optional["_models.CustomDomain"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.CustomDomain"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -573,7 +616,7 @@ async def enable_custom_https( accept = "application/json" # Construct URL - url = self.enable_custom_https.metadata['url'] # type: ignore + url = self._enable_custom_https_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -604,7 +647,7 @@ async def enable_custom_https( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -615,4 +658,87 @@ async def enable_custom_https( return cls(pipeline_response, deserialized, {}) return deserialized - enable_custom_https.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps'} # type: ignore + _enable_custom_https_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps'} # type: ignore + + 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, + **kwargs: Any + ) -> AsyncLROPoller["_models.CustomDomain"]: + """Enable https delivery of the custom domain. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param profile_name: Name of the CDN profile which is unique within the resource group. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. + :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. + :type custom_domain_https_parameters: ~azure.mgmt.cdn.models.CustomDomainHttpsParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomDomain"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = await self._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, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('CustomDomain', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str'), + 'endpointName': self._serialize.url("endpoint_name", endpoint_name, 'str'), + 'customDomainName': self._serialize.url("custom_domain_name", custom_domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = AsyncNoPolling() + else: polling_method = polling + if cont_token: + return AsyncLROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return AsyncLROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_enable_custom_https.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps'} # 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 index f2be0f50db1a..c5eab0475bae 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 @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.EdgenodeResult"]: """Edgenodes are the global Point of Presence (POP) locations used to deliver CDN content to end users. @@ -94,7 +94,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/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 cd7bbd4f49c2..07d6e067520d 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 @@ -47,7 +47,7 @@ def list_by_profile( self, resource_group_name: str, profile_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.EndpointListResult"]: """Lists existing CDN endpoints. @@ -107,7 +107,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -123,7 +123,7 @@ async def get( resource_group_name: str, profile_name: str, endpoint_name: str, - **kwargs + **kwargs: Any ) -> "_models.Endpoint": """Gets an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. @@ -171,7 +171,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Endpoint', pipeline_response) @@ -188,7 +188,7 @@ async def _create_initial( profile_name: str, endpoint_name: str, endpoint: "_models.Endpoint", - **kwargs + **kwargs: Any ) -> "_models.Endpoint": cls = kwargs.pop('cls', None) # type: ClsType["_models.Endpoint"] error_map = { @@ -227,7 +227,7 @@ async def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -251,7 +251,7 @@ async def begin_create( profile_name: str, endpoint_name: str, endpoint: "_models.Endpoint", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Endpoint"]: """Creates a new CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. @@ -266,8 +266,8 @@ async def begin_create( :type endpoint: ~azure.mgmt.cdn.models.Endpoint :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Endpoint or the result of cls(response) @@ -328,7 +328,7 @@ async def _update_initial( profile_name: str, endpoint_name: str, endpoint_update_properties: "_models.EndpointUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Endpoint": cls = kwargs.pop('cls', None) # type: ClsType["_models.Endpoint"] error_map = { @@ -367,7 +367,7 @@ async def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -388,7 +388,7 @@ async def begin_update( profile_name: str, endpoint_name: str, endpoint_update_properties: "_models.EndpointUpdateParameters", - **kwargs + **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. @@ -405,8 +405,8 @@ async def begin_update( :type endpoint_update_properties: ~azure.mgmt.cdn.models.EndpointUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Endpoint or the result of cls(response) @@ -466,7 +466,7 @@ async def _delete_initial( resource_group_name: str, profile_name: str, endpoint_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -500,7 +500,7 @@ async def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -513,7 +513,7 @@ async def begin_delete( resource_group_name: str, profile_name: str, endpoint_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing CDN endpoint with the specified endpoint name under the specified subscription, resource group and profile. @@ -526,8 +526,8 @@ async def begin_delete( :type endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -583,7 +583,7 @@ async def _start_initial( resource_group_name: str, profile_name: str, endpoint_name: str, - **kwargs + **kwargs: Any ) -> "_models.Endpoint": cls = kwargs.pop('cls', None) # type: ClsType["_models.Endpoint"] error_map = { @@ -617,7 +617,7 @@ async def _start_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -637,7 +637,7 @@ async def begin_start( resource_group_name: str, profile_name: str, endpoint_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Endpoint"]: """Starts an existing CDN endpoint that is on a stopped state. @@ -649,8 +649,8 @@ async def begin_start( :type endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Endpoint or the result of cls(response) @@ -709,7 +709,7 @@ async def _stop_initial( resource_group_name: str, profile_name: str, endpoint_name: str, - **kwargs + **kwargs: Any ) -> "_models.Endpoint": cls = kwargs.pop('cls', None) # type: ClsType["_models.Endpoint"] error_map = { @@ -743,7 +743,7 @@ async def _stop_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -763,7 +763,7 @@ async def begin_stop( resource_group_name: str, profile_name: str, endpoint_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Endpoint"]: """Stops an existing running CDN endpoint. @@ -775,8 +775,8 @@ async def begin_stop( :type endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Endpoint or the result of cls(response) @@ -836,7 +836,7 @@ async def _purge_content_initial( profile_name: str, endpoint_name: str, content_file_paths: "_models.PurgeParameters", - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -875,7 +875,7 @@ async def _purge_content_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -889,7 +889,7 @@ async def begin_purge_content( profile_name: str, endpoint_name: str, content_file_paths: "_models.PurgeParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Removes a content from CDN. @@ -905,8 +905,8 @@ async def begin_purge_content( :type content_file_paths: ~azure.mgmt.cdn.models.PurgeParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -964,7 +964,7 @@ async def _load_content_initial( profile_name: str, endpoint_name: str, content_file_paths: "_models.LoadParameters", - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -1003,7 +1003,7 @@ async def _load_content_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1017,7 +1017,7 @@ async def begin_load_content( profile_name: str, endpoint_name: str, content_file_paths: "_models.LoadParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Pre-loads a content to CDN. Available for Verizon Profiles. @@ -1032,8 +1032,8 @@ async def begin_load_content( :type content_file_paths: ~azure.mgmt.cdn.models.LoadParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -1091,7 +1091,7 @@ async def validate_custom_domain( profile_name: str, endpoint_name: str, custom_domain_properties: "_models.ValidateCustomDomainInput", - **kwargs + **kwargs: Any ) -> "_models.ValidateCustomDomainOutput": """Validates the custom domain mapping to ensure it maps to the correct CDN endpoint in DNS. @@ -1145,7 +1145,7 @@ 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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidateCustomDomainOutput', pipeline_response) @@ -1161,7 +1161,7 @@ def list_resource_usage( resource_group_name: str, profile_name: str, endpoint_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ResourceUsageListResult"]: """Checks the quota and usage of geo filters and custom domains under the given endpoint. @@ -1224,7 +1224,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/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 c6d2f59635c3..7f9ffed056a0 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 @@ -54,7 +54,7 @@ async def get_log_analytics_metrics( group_by: Optional[List[Union[str, "_models.LogMetricsGroupBy"]]] = None, continents: Optional[List[str]] = None, country_or_regions: Optional[List[str]] = None, - **kwargs + **kwargs: Any ) -> "_models.MetricsResponse": """Get log report for AFD profile. @@ -128,7 +128,7 @@ 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(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MetricsResponse', pipeline_response) @@ -149,7 +149,7 @@ async def get_log_analytics_rankings( date_time_begin: datetime.datetime, date_time_end: datetime.datetime, custom_domains: Optional[List[str]] = None, - **kwargs + **kwargs: Any ) -> "_models.RankingsResponse": """Get log analytics ranking report for AFD profile. @@ -212,7 +212,7 @@ 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(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RankingsResponse', pipeline_response) @@ -227,7 +227,7 @@ async def get_log_analytics_locations( self, resource_group_name: str, profile_name: str, - **kwargs + **kwargs: Any ) -> "_models.ContinentsResponse": """Get all available location names for AFD log analytics report. @@ -271,7 +271,7 @@ 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(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ContinentsResponse', pipeline_response) @@ -286,7 +286,7 @@ async def get_log_analytics_resources( self, resource_group_name: str, profile_name: str, - **kwargs + **kwargs: Any ) -> "_models.ResourcesResponse": """Get all endpoints and custom domains available for AFD log report. @@ -330,7 +330,7 @@ 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(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourcesResponse', pipeline_response) @@ -352,7 +352,7 @@ async def get_waf_log_analytics_metrics( 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 + **kwargs: Any ) -> "_models.WafMetricsResponse": """Get Waf related log analytics report for AFD profile. @@ -420,7 +420,7 @@ 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(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WafMetricsResponse', pipeline_response) @@ -442,7 +442,7 @@ async def get_waf_log_analytics_rankings( rankings: List[Union[str, "_models.WafRankingType"]], actions: Optional[List[Union[str, "_models.WafAction"]]] = None, rule_types: Optional[List[Union[str, "_models.WafRuleType"]]] = None, - **kwargs + **kwargs: Any ) -> "_models.WafRankingsResponse": """Get WAF log analytics charts for AFD profile. @@ -509,7 +509,7 @@ 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(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WafRankingsResponse', pipeline_response) 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 3730b2536a4e..37812ca58893 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 @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ManagedRuleSetDefinitionList"]: """Lists all available managed rule sets. @@ -97,7 +97,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/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 2f41fde63587..a7f16767f88a 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 @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationsListResult"]: """Lists all of the available CDN REST API operations. @@ -93,7 +93,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/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 ece5546c8d43..b150a70799a7 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 @@ -48,7 +48,7 @@ def list_by_endpoint( resource_group_name: str, profile_name: str, endpoint_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OriginGroupListResult"]: """Lists all of the existing origin groups within an endpoint. @@ -111,7 +111,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -128,7 +128,7 @@ async def get( profile_name: str, endpoint_name: str, origin_group_name: str, - **kwargs + **kwargs: Any ) -> "_models.OriginGroup": """Gets an existing origin group within an endpoint. @@ -178,7 +178,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('OriginGroup', pipeline_response) @@ -196,7 +196,7 @@ async def _create_initial( endpoint_name: str, origin_group_name: str, origin_group: "_models.OriginGroup", - **kwargs + **kwargs: Any ) -> "_models.OriginGroup": cls = kwargs.pop('cls', None) # type: ClsType["_models.OriginGroup"] error_map = { @@ -236,7 +236,7 @@ async def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -261,7 +261,7 @@ async def begin_create( endpoint_name: str, origin_group_name: str, origin_group: "_models.OriginGroup", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.OriginGroup"]: """Creates a new origin group within the specified endpoint. @@ -277,8 +277,8 @@ async def begin_create( :type origin_group: ~azure.mgmt.cdn.models.OriginGroup :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either OriginGroup or the result of cls(response) @@ -342,7 +342,7 @@ async def _update_initial( endpoint_name: str, origin_group_name: str, origin_group_update_properties: "_models.OriginGroupUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.OriginGroup": cls = kwargs.pop('cls', None) # type: ClsType["_models.OriginGroup"] error_map = { @@ -382,7 +382,7 @@ async def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -404,7 +404,7 @@ async def begin_update( endpoint_name: str, origin_group_name: str, origin_group_update_properties: "_models.OriginGroupUpdateParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.OriginGroup"]: """Updates an existing origin group within an endpoint. @@ -420,8 +420,8 @@ async def begin_update( :type origin_group_update_properties: ~azure.mgmt.cdn.models.OriginGroupUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either OriginGroup or the result of cls(response) @@ -484,7 +484,7 @@ async def _delete_initial( profile_name: str, endpoint_name: str, origin_group_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -519,7 +519,7 @@ async def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -533,7 +533,7 @@ async def begin_delete( profile_name: str, endpoint_name: str, origin_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing origin group within an endpoint. @@ -547,8 +547,8 @@ async def begin_delete( :type origin_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) 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 7f17a17a07d5..211349c7a0a5 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 @@ -48,7 +48,7 @@ def list_by_endpoint( resource_group_name: str, profile_name: str, endpoint_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OriginListResult"]: """Lists all of the existing origins within an endpoint. @@ -111,7 +111,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -128,7 +128,7 @@ async def get( profile_name: str, endpoint_name: str, origin_name: str, - **kwargs + **kwargs: Any ) -> "_models.Origin": """Gets an existing origin within an endpoint. @@ -178,7 +178,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Origin', pipeline_response) @@ -196,7 +196,7 @@ async def _create_initial( endpoint_name: str, origin_name: str, origin: "_models.Origin", - **kwargs + **kwargs: Any ) -> "_models.Origin": cls = kwargs.pop('cls', None) # type: ClsType["_models.Origin"] error_map = { @@ -236,7 +236,7 @@ async def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -261,7 +261,7 @@ async def begin_create( endpoint_name: str, origin_name: str, origin: "_models.Origin", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Origin"]: """Creates a new origin within the specified endpoint. @@ -277,8 +277,8 @@ async def begin_create( :type origin: ~azure.mgmt.cdn.models.Origin :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Origin or the result of cls(response) @@ -342,7 +342,7 @@ async def _update_initial( endpoint_name: str, origin_name: str, origin_update_properties: "_models.OriginUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Origin": cls = kwargs.pop('cls', None) # type: ClsType["_models.Origin"] error_map = { @@ -382,7 +382,7 @@ async def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -404,7 +404,7 @@ async def begin_update( endpoint_name: str, origin_name: str, origin_update_properties: "_models.OriginUpdateParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Origin"]: """Updates an existing origin within an endpoint. @@ -420,8 +420,8 @@ async def begin_update( :type origin_update_properties: ~azure.mgmt.cdn.models.OriginUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Origin or the result of cls(response) @@ -484,7 +484,7 @@ async def _delete_initial( profile_name: str, endpoint_name: str, origin_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -519,7 +519,7 @@ async def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -533,7 +533,7 @@ async def begin_delete( profile_name: str, endpoint_name: str, origin_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing origin within an endpoint. @@ -547,8 +547,8 @@ async def begin_delete( :type origin_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) 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 d9f50420f06f..be1f69d5e130 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 @@ -46,7 +46,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.CdnWebApplicationFirewallPolicyList"]: """Lists all of the protection policies within a resource group. @@ -103,7 +103,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -118,7 +118,7 @@ async def get( self, resource_group_name: str, policy_name: str, - **kwargs + **kwargs: Any ) -> "_models.CdnWebApplicationFirewallPolicy": """Retrieve protection policy with specified name within a resource group. @@ -162,7 +162,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CdnWebApplicationFirewallPolicy', pipeline_response) @@ -178,7 +178,7 @@ async def _create_or_update_initial( resource_group_name: str, policy_name: str, cdn_web_application_firewall_policy: "_models.CdnWebApplicationFirewallPolicy", - **kwargs + **kwargs: Any ) -> "_models.CdnWebApplicationFirewallPolicy": cls = kwargs.pop('cls', None) # type: ClsType["_models.CdnWebApplicationFirewallPolicy"] error_map = { @@ -216,7 +216,7 @@ async def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -239,7 +239,7 @@ async def begin_create_or_update( resource_group_name: str, policy_name: str, cdn_web_application_firewall_policy: "_models.CdnWebApplicationFirewallPolicy", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.CdnWebApplicationFirewallPolicy"]: """Create or update policy with specified rule set name within a resource group. @@ -251,8 +251,8 @@ async def begin_create_or_update( :type cdn_web_application_firewall_policy: ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CdnWebApplicationFirewallPolicy or the result of cls(response) @@ -310,7 +310,7 @@ async def _update_initial( resource_group_name: str, policy_name: str, cdn_web_application_firewall_policy_patch_parameters: "_models.CdnWebApplicationFirewallPolicyPatchParameters", - **kwargs + **kwargs: Any ) -> "_models.CdnWebApplicationFirewallPolicy": cls = kwargs.pop('cls', None) # type: ClsType["_models.CdnWebApplicationFirewallPolicy"] error_map = { @@ -348,7 +348,7 @@ async def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -368,7 +368,7 @@ async def begin_update( resource_group_name: str, policy_name: str, cdn_web_application_firewall_policy_patch_parameters: "_models.CdnWebApplicationFirewallPolicyPatchParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.CdnWebApplicationFirewallPolicy"]: """Update an existing CdnWebApplicationFirewallPolicy with the specified policy name under the specified subscription and resource group. @@ -382,8 +382,8 @@ async def begin_update( :type cdn_web_application_firewall_policy_patch_parameters: ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicyPatchParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either CdnWebApplicationFirewallPolicy or the result of cls(response) @@ -440,7 +440,7 @@ async def delete( self, resource_group_name: str, policy_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes Policy. 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 87b279328779..d935625af876 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 @@ -45,7 +45,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ProfileListResult"]: """Lists all of the CDN profiles within an Azure subscription. @@ -99,7 +99,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -113,7 +113,7 @@ async def get_next(next_link=None): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ProfileListResult"]: """Lists all of the CDN profiles within a resource group. @@ -170,7 +170,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -185,7 +185,7 @@ async def get( self, resource_group_name: str, profile_name: str, - **kwargs + **kwargs: Any ) -> "_models.Profile": """Gets a CDN profile with the specified profile name under the specified subscription and resource group. @@ -230,7 +230,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Profile', pipeline_response) @@ -246,7 +246,7 @@ async def _create_initial( resource_group_name: str, profile_name: str, profile: "_models.Profile", - **kwargs + **kwargs: Any ) -> "_models.Profile": cls = kwargs.pop('cls', None) # type: ClsType["_models.Profile"] error_map = { @@ -284,7 +284,7 @@ async def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -307,7 +307,7 @@ async def begin_create( resource_group_name: str, profile_name: str, profile: "_models.Profile", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Profile"]: """Creates a new CDN profile with a profile name under the specified subscription and resource group. @@ -320,8 +320,8 @@ async def begin_create( :type profile: ~azure.mgmt.cdn.models.Profile :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Profile or the result of cls(response) @@ -379,7 +379,7 @@ async def _update_initial( resource_group_name: str, profile_name: str, profile_update_parameters: "_models.ProfileUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Profile": cls = kwargs.pop('cls', None) # type: ClsType["_models.Profile"] error_map = { @@ -417,7 +417,7 @@ async def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -437,7 +437,7 @@ async def begin_update( resource_group_name: str, profile_name: str, profile_update_parameters: "_models.ProfileUpdateParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Profile"]: """Updates an existing CDN profile with the specified profile name under the specified subscription and resource group. @@ -450,8 +450,8 @@ async def begin_update( :type profile_update_parameters: ~azure.mgmt.cdn.models.ProfileUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Profile or the result of cls(response) @@ -508,7 +508,7 @@ async def _delete_initial( self, resource_group_name: str, profile_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -541,7 +541,7 @@ async def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -553,7 +553,7 @@ async def begin_delete( self, resource_group_name: str, profile_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing 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. @@ -564,8 +564,8 @@ async def begin_delete( :type profile_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -618,7 +618,7 @@ async def generate_sso_uri( self, resource_group_name: str, profile_name: str, - **kwargs + **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 @@ -666,7 +666,7 @@ async def generate_sso_uri( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SsoUri', pipeline_response) @@ -681,7 +681,7 @@ async def list_supported_optimization_types( self, resource_group_name: str, profile_name: str, - **kwargs + **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. @@ -726,7 +726,7 @@ 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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SupportedOptimizationTypesListResult', pipeline_response) @@ -741,7 +741,7 @@ def list_resource_usage( self, resource_group_name: str, profile_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ResourceUsageListResult"]: """Checks the quota and actual usage of endpoints under the given CDN profile. @@ -801,7 +801,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/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 907309022416..262425c14a14 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 @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ResourceUsageListResult"]: """Check the quota and actual usage of the CDN profiles under the given subscription. @@ -97,7 +97,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/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 9a6f742b53d3..fe9f7cbcd524 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 @@ -48,7 +48,7 @@ def list_by_endpoint( resource_group_name: str, profile_name: str, endpoint_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.RouteListResult"]: """Lists all of the existing origins within a profile. @@ -111,7 +111,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -128,7 +128,7 @@ async def get( profile_name: str, endpoint_name: str, route_name: str, - **kwargs + **kwargs: Any ) -> "_models.Route": """Gets an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. @@ -179,7 +179,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Route', pipeline_response) @@ -197,7 +197,7 @@ async def _create_initial( endpoint_name: str, route_name: str, route: "_models.Route", - **kwargs + **kwargs: Any ) -> "_models.Route": cls = kwargs.pop('cls', None) # type: ClsType["_models.Route"] error_map = { @@ -237,7 +237,7 @@ async def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -262,7 +262,7 @@ async def begin_create( endpoint_name: str, route_name: str, route: "_models.Route", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Route"]: """Creates a new route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. @@ -279,8 +279,8 @@ async def begin_create( :type route: ~azure.mgmt.cdn.models.Route :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Route or the result of cls(response) @@ -344,7 +344,7 @@ async def _update_initial( endpoint_name: str, route_name: str, route_update_properties: "_models.RouteUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Route": cls = kwargs.pop('cls', None) # type: ClsType["_models.Route"] error_map = { @@ -384,7 +384,7 @@ async def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -406,7 +406,7 @@ async def begin_update( endpoint_name: str, route_name: str, route_update_properties: "_models.RouteUpdateParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Route"]: """Updates an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. @@ -423,8 +423,8 @@ async def begin_update( :type route_update_properties: ~azure.mgmt.cdn.models.RouteUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Route or the result of cls(response) @@ -487,7 +487,7 @@ async def _delete_initial( profile_name: str, endpoint_name: str, route_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -522,7 +522,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -536,7 +536,7 @@ async def begin_delete( profile_name: str, endpoint_name: str, route_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing route with the specified route name under the specified subscription, resource group, profile, and AzureFrontDoor endpoint. @@ -551,8 +551,8 @@ async def begin_delete( :type route_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) 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 1ea7a78b877d..8ea08cb2d33f 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 @@ -47,7 +47,7 @@ def list_by_profile( self, resource_group_name: str, profile_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.RuleSetListResult"]: """Lists existing AzureFrontDoor rule sets within a profile. @@ -107,7 +107,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -123,7 +123,7 @@ async def get( resource_group_name: str, profile_name: str, rule_set_name: str, - **kwargs + **kwargs: Any ) -> "_models.RuleSet": """Gets an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. @@ -171,7 +171,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RuleSet', pipeline_response) @@ -187,7 +187,7 @@ async def _create_initial( resource_group_name: str, profile_name: str, rule_set_name: str, - **kwargs + **kwargs: Any ) -> "_models.RuleSet": cls = kwargs.pop('cls', None) # type: ClsType["_models.RuleSet"] error_map = { @@ -221,7 +221,7 @@ async def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -244,7 +244,7 @@ async def begin_create( resource_group_name: str, profile_name: str, rule_set_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.RuleSet"]: """Creates a new rule set within the specified profile. @@ -256,8 +256,8 @@ async def begin_create( :type rule_set_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either RuleSet or the result of cls(response) @@ -316,7 +316,7 @@ async def _delete_initial( resource_group_name: str, profile_name: str, rule_set_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -350,7 +350,7 @@ async def _delete_initial( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -363,7 +363,7 @@ async def begin_delete( resource_group_name: str, profile_name: str, rule_set_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing AzureFrontDoor rule set with the specified rule set name under the specified subscription, resource group and profile. @@ -376,8 +376,8 @@ async def begin_delete( :type rule_set_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -433,7 +433,7 @@ def list_resource_usage( resource_group_name: str, profile_name: str, rule_set_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.UsagesListResult"]: """Checks the quota and actual usage of endpoints under the given CDN profile. @@ -496,7 +496,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/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 78e90becd401..8fc5d33e29f1 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 @@ -48,7 +48,7 @@ def list_by_rule_set( resource_group_name: str, profile_name: str, rule_set_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.RuleListResult"]: """Lists all of the existing delivery rules within a rule set. @@ -111,7 +111,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -128,7 +128,7 @@ async def get( profile_name: str, rule_set_name: str, rule_name: str, - **kwargs + **kwargs: Any ) -> "_models.Rule": """Gets an existing delivery rule within a rule set. @@ -178,7 +178,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Rule', pipeline_response) @@ -196,7 +196,7 @@ async def _create_initial( rule_set_name: str, rule_name: str, rule: "_models.Rule", - **kwargs + **kwargs: Any ) -> "_models.Rule": cls = kwargs.pop('cls', None) # type: ClsType["_models.Rule"] error_map = { @@ -236,7 +236,7 @@ async def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -261,7 +261,7 @@ async def begin_create( rule_set_name: str, rule_name: str, rule: "_models.Rule", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Rule"]: """Creates a new delivery rule within the specified rule set. @@ -277,8 +277,8 @@ async def begin_create( :type rule: ~azure.mgmt.cdn.models.Rule :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Rule or the result of cls(response) @@ -342,7 +342,7 @@ async def _update_initial( rule_set_name: str, rule_name: str, rule_update_properties: "_models.RuleUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Rule": cls = kwargs.pop('cls', None) # type: ClsType["_models.Rule"] error_map = { @@ -382,7 +382,7 @@ async def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -404,7 +404,7 @@ async def begin_update( rule_set_name: str, rule_name: str, rule_update_properties: "_models.RuleUpdateParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Rule"]: """Updates an existing delivery rule within a rule set. @@ -420,8 +420,8 @@ async def begin_update( :type rule_update_properties: ~azure.mgmt.cdn.models.RuleUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Rule or the result of cls(response) @@ -484,7 +484,7 @@ async def _delete_initial( profile_name: str, rule_set_name: str, rule_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -519,7 +519,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -533,7 +533,7 @@ async def begin_delete( profile_name: str, rule_set_name: str, rule_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing delivery rule within a rule set. @@ -547,8 +547,8 @@ async def begin_delete( :type rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) 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 aeb5d3cfa5de..b9ca12e7c330 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 @@ -47,7 +47,7 @@ def list_by_profile( self, resource_group_name: str, profile_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SecretListResult"]: """Lists existing AzureFrontDoor secrets. @@ -107,7 +107,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -123,7 +123,7 @@ async def get( resource_group_name: str, profile_name: str, secret_name: str, - **kwargs + **kwargs: Any ) -> "_models.Secret": """Gets an existing Secret within a profile. @@ -170,7 +170,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Secret', pipeline_response) @@ -187,7 +187,7 @@ async def _create_initial( profile_name: str, secret_name: str, secret: "_models.Secret", - **kwargs + **kwargs: Any ) -> "_models.Secret": cls = kwargs.pop('cls', None) # type: ClsType["_models.Secret"] error_map = { @@ -226,7 +226,7 @@ async def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -250,7 +250,7 @@ async def begin_create( profile_name: str, secret_name: str, secret: "_models.Secret", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Secret"]: """Creates a new Secret within the specified profile. @@ -264,8 +264,8 @@ async def begin_create( :type secret: ~azure.mgmt.cdn.models.Secret :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Secret or the result of cls(response) @@ -326,7 +326,7 @@ async def _update_initial( profile_name: str, secret_name: str, secret_properties: "_models.SecretProperties", - **kwargs + **kwargs: Any ) -> "_models.Secret": cls = kwargs.pop('cls', None) # type: ClsType["_models.Secret"] error_map = { @@ -365,7 +365,7 @@ async def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -386,7 +386,7 @@ async def begin_update( profile_name: str, secret_name: str, secret_properties: "_models.SecretProperties", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Secret"]: """Updates an existing Secret within a profile. @@ -400,8 +400,8 @@ async def begin_update( :type secret_properties: ~azure.mgmt.cdn.models.SecretProperties :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Secret or the result of cls(response) @@ -461,7 +461,7 @@ async def _delete_initial( resource_group_name: str, profile_name: str, secret_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -495,7 +495,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -508,7 +508,7 @@ async def begin_delete( resource_group_name: str, profile_name: str, secret_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing Secret within profile. @@ -520,8 +520,8 @@ async def begin_delete( :type secret_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) 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 bad11f55a082..3e593dfcaf2a 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 @@ -47,7 +47,7 @@ def list_by_profile( self, resource_group_name: str, profile_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SecurityPolicyListResult"]: """Lists security policies associated with the profile. @@ -107,7 +107,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -123,7 +123,7 @@ async def get( resource_group_name: str, profile_name: str, security_policy_name: str, - **kwargs + **kwargs: Any ) -> "_models.SecurityPolicy": """Gets an existing security policy within a profile. @@ -170,7 +170,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SecurityPolicy', pipeline_response) @@ -187,7 +187,7 @@ async def _create_initial( profile_name: str, security_policy_name: str, security_policy: "_models.SecurityPolicy", - **kwargs + **kwargs: Any ) -> "_models.SecurityPolicy": cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPolicy"] error_map = { @@ -226,7 +226,7 @@ async def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -250,7 +250,7 @@ async def begin_create( profile_name: str, security_policy_name: str, security_policy: "_models.SecurityPolicy", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.SecurityPolicy"]: """Creates a new security policy within the specified profile. @@ -264,8 +264,8 @@ async def begin_create( :type security_policy: ~azure.mgmt.cdn.models.SecurityPolicy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SecurityPolicy or the result of cls(response) @@ -326,7 +326,7 @@ async def _patch_initial( profile_name: str, security_policy_name: str, security_policy_properties: "_models.SecurityPolicyProperties", - **kwargs + **kwargs: Any ) -> "_models.SecurityPolicy": cls = kwargs.pop('cls', None) # type: ClsType["_models.SecurityPolicy"] error_map = { @@ -365,7 +365,7 @@ async def _patch_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -386,7 +386,7 @@ async def begin_patch( profile_name: str, security_policy_name: str, security_policy_properties: "_models.SecurityPolicyProperties", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.SecurityPolicy"]: """Updates an existing Secret within a profile. @@ -400,8 +400,8 @@ async def begin_patch( :type security_policy_properties: ~azure.mgmt.cdn.models.SecurityPolicyProperties :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either SecurityPolicy or the result of cls(response) @@ -461,7 +461,7 @@ async def _delete_initial( resource_group_name: str, profile_name: str, security_policy_name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -495,7 +495,7 @@ async def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -508,7 +508,7 @@ async def begin_delete( resource_group_name: str, profile_name: str, security_policy_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes an existing security policy within profile. @@ -520,8 +520,8 @@ async def begin_delete( :type security_policy_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_validate_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_validate_operations.py index 13208ac6a88a..b021addb7297 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_validate_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/aio/operations/_validate_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: async def secret( self, validate_secret_input: "_models.ValidateSecretInput", - **kwargs + **kwargs: Any ) -> "_models.ValidateSecretOutput": """Validate a Secret in the profile. @@ -88,7 +88,7 @@ async def secret( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidateSecretOutput', pipeline_response) 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 ad3c0ac6c758..1d3aa4a8145c 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 @@ -457,7 +457,6 @@ DomainValidationState, EnabledState, EndpointResourceState, - Enum46, ForwardingProtocol, GeoFilterActions, HeaderAction, @@ -487,6 +486,7 @@ PolicyEnabledState, PolicyMode, PolicyResourceState, + PolicySettingsDefaultCustomBlockResponseStatusCode, PostArgsOperator, PrivateEndpointStatus, ProbeProtocol, @@ -763,7 +763,6 @@ 'DomainValidationState', 'EnabledState', 'EndpointResourceState', - 'Enum46', 'ForwardingProtocol', 'GeoFilterActions', 'HeaderAction', @@ -793,6 +792,7 @@ 'PolicyEnabledState', 'PolicyMode', 'PolicyResourceState', + 'PolicySettingsDefaultCustomBlockResponseStatusCode', 'PostArgsOperator', 'PrivateEndpointStatus', 'ProbeProtocol', 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 eda9072cd6d8..b547bf2ebbb0 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 @@ -231,17 +231,6 @@ class EndpointResourceState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)) STOPPED = "Stopped" STOPPING = "Stopping" -class Enum46(with_metaclass(_CaseInsensitiveEnumMeta, int, Enum)): - """If the action type is block, this field defines the default customer overridable http response - status code. - """ - - TWO_HUNDRED = 200 - FOUR_HUNDRED_THREE = 403 - FOUR_HUNDRED_FIVE = 405 - FOUR_HUNDRED_SIX = 406 - FOUR_HUNDRED_TWENTY_NINE = 429 - class ForwardingProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Protocol this rule will use when forwarding traffic to backends. """ @@ -488,6 +477,17 @@ class PolicyResourceState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): DISABLED = "Disabled" DELETING = "Deleting" +class PolicySettingsDefaultCustomBlockResponseStatusCode(with_metaclass(_CaseInsensitiveEnumMeta, int, Enum)): + """If the action type is block, this field defines the default customer overridable http response + status code. + """ + + TWO_HUNDRED = 200 + FOUR_HUNDRED_THREE = 403 + FOUR_HUNDRED_FIVE = 405 + FOUR_HUNDRED_SIX = 406 + FOUR_HUNDRED_TWENTY_NINE = 429 + class PostArgsOperator(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Describes operator to be matched """ 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 index 521964635f1d..fde3b035e655 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_models.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/models/_models.py @@ -50,7 +50,43 @@ def __init__( self.system_data = None -class AFDDomain(Resource): +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar system_data: Read only system data. + :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 + ): + super(ProxyResource, self).__init__(**kwargs) + + +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. @@ -617,7 +653,7 @@ def __init__( self.error = kwargs.get('error', None) -class AFDOrigin(Resource): +class AFDOrigin(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. @@ -653,7 +689,7 @@ class AFDOrigin(Resource): :type weight: int :param shared_private_link_resource: The properties of the private link resource for private origin. - :type shared_private_link_resource: object + :type shared_private_link_resource: any :param 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. Possible values include: "Enabled", "Disabled". @@ -715,7 +751,7 @@ def __init__( self.deployment_status = None -class AFDOriginGroup(Resource): +class AFDOriginGroup(ProxyResource): """AFDOrigin 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. @@ -1027,7 +1063,7 @@ class AFDOriginUpdatePropertiesParameters(msrest.serialization.Model): :type weight: int :param shared_private_link_resource: The properties of the private link resource for private origin. - :type shared_private_link_resource: object + :type shared_private_link_resource: any :param 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. Possible values include: "Enabled", "Disabled". @@ -1097,7 +1133,7 @@ class AFDOriginProperties(AFDStateProperties, AFDOriginUpdatePropertiesParameter :type weight: int :param shared_private_link_resource: The properties of the private link resource for private origin. - :type shared_private_link_resource: object + :type shared_private_link_resource: any :param 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. Possible values include: "Enabled", "Disabled". @@ -1177,7 +1213,7 @@ class AFDOriginUpdateParameters(msrest.serialization.Model): :type weight: int :param shared_private_link_resource: The properties of the private link resource for private origin. - :type shared_private_link_resource: object + :type shared_private_link_resource: any :param 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. Possible values include: "Enabled", "Disabled". @@ -1947,7 +1983,7 @@ def __init__( self.transforms = kwargs.get('transforms', None) -class CustomDomain(Resource): +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. @@ -3130,7 +3166,7 @@ def __init__( self.expiration_date = None -class EdgeNode(Resource): +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. @@ -4768,7 +4804,7 @@ def __init__( self.next_link = kwargs.get('next_link', None) -class Origin(Resource): +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. @@ -4880,7 +4916,7 @@ def __init__( self.private_endpoint_status = None -class OriginGroup(Resource): +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. @@ -5461,7 +5497,8 @@ class PolicySettings(msrest.serialization.Model): :param default_custom_block_response_status_code: If the action type is block, this field defines the default customer overridable http response status code. Possible values include: 200, 403, 405, 406, 429. - :type default_custom_block_response_status_code: str or ~azure.mgmt.cdn.models.Enum46 + :type default_custom_block_response_status_code: str or + ~azure.mgmt.cdn.models.PolicySettingsDefaultCustomBlockResponseStatusCode :param 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. :type default_custom_block_response_body: str @@ -5658,42 +5695,6 @@ def __init__( self.tags = kwargs.get('tags', None) -class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar system_data: Read only system data. - :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 - ): - super(ProxyResource, self).__init__(**kwargs) - - class PurgeParameters(msrest.serialization.Model): """Parameters required for content purge. @@ -6464,7 +6465,7 @@ def __init__( self.http_error_ranges = kwargs.get('http_error_ranges', None) -class Route(Resource): +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. @@ -6491,7 +6492,7 @@ class Route(Resource): :param patterns_to_match: The route patterns of the rule. :type patterns_to_match: list[str] :param compression_settings: compression settings. - :type compression_settings: object + :type compression_settings: any :param 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. Possible @@ -6616,7 +6617,7 @@ class RouteUpdatePropertiesParameters(msrest.serialization.Model): :param patterns_to_match: The route patterns of the rule. :type patterns_to_match: list[str] :param compression_settings: compression settings. - :type compression_settings: object + :type compression_settings: any :param 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. Possible @@ -6691,7 +6692,7 @@ class RouteProperties(AFDStateProperties, RouteUpdatePropertiesParameters): :param patterns_to_match: The route patterns of the rule. :type patterns_to_match: list[str] :param compression_settings: compression settings. - :type compression_settings: object + :type compression_settings: any :param 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. Possible @@ -6779,7 +6780,7 @@ class RouteUpdateParameters(msrest.serialization.Model): :param patterns_to_match: The route patterns of the rule. :type patterns_to_match: list[str] :param compression_settings: compression settings. - :type compression_settings: object + :type compression_settings: any :param 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. Possible @@ -6835,7 +6836,7 @@ def __init__( self.enabled_state = kwargs.get('enabled_state', None) -class Rule(Resource): +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. @@ -7025,7 +7026,7 @@ def __init__( self.deployment_status = None -class RuleSet(Resource): +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. @@ -7169,7 +7170,7 @@ def __init__( self.match_processing_behavior = kwargs.get('match_processing_behavior', None) -class Secret(Resource): +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. @@ -7284,7 +7285,7 @@ def __init__( self.parameters = kwargs.get('parameters', None) -class SecurityPolicy(Resource): +class SecurityPolicy(ProxyResource): """SecurityPolicy association for AzureFrontDoor profile. Variables are only populated by the server, and will be ignored when sending a request. 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 f320c383c29a..0b1bea6e8ef6 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 @@ -7,7 +7,7 @@ # -------------------------------------------------------------------------- import datetime -from typing import Dict, List, Optional, Union +from typing import Any, Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization @@ -55,7 +55,43 @@ def __init__( self.system_data = None -class AFDDomain(Resource): +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type. + :vartype type: str + :ivar system_data: Read only system data. + :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 + ): + super(ProxyResource, self).__init__(**kwargs) + + +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. @@ -664,7 +700,7 @@ def __init__( self.error = error -class AFDOrigin(Resource): +class AFDOrigin(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. @@ -700,7 +736,7 @@ class AFDOrigin(Resource): :type weight: int :param shared_private_link_resource: The properties of the private link resource for private origin. - :type shared_private_link_resource: object + :type shared_private_link_resource: any :param 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. Possible values include: "Enabled", "Disabled". @@ -754,7 +790,7 @@ def __init__( origin_host_header: Optional[str] = None, priority: Optional[int] = None, weight: Optional[int] = None, - shared_private_link_resource: Optional[object] = None, + shared_private_link_resource: Optional[Any] = None, enabled_state: Optional[Union[str, "EnabledState"]] = None, **kwargs ): @@ -772,7 +808,7 @@ def __init__( self.deployment_status = None -class AFDOriginGroup(Resource): +class AFDOriginGroup(ProxyResource): """AFDOrigin 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. @@ -1112,7 +1148,7 @@ class AFDOriginUpdatePropertiesParameters(msrest.serialization.Model): :type weight: int :param shared_private_link_resource: The properties of the private link resource for private origin. - :type shared_private_link_resource: object + :type shared_private_link_resource: any :param 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. Possible values include: "Enabled", "Disabled". @@ -1148,7 +1184,7 @@ def __init__( origin_host_header: Optional[str] = None, priority: Optional[int] = None, weight: Optional[int] = None, - shared_private_link_resource: Optional[object] = None, + shared_private_link_resource: Optional[Any] = None, enabled_state: Optional[Union[str, "EnabledState"]] = None, **kwargs ): @@ -1192,7 +1228,7 @@ class AFDOriginProperties(AFDStateProperties, AFDOriginUpdatePropertiesParameter :type weight: int :param shared_private_link_resource: The properties of the private link resource for private origin. - :type shared_private_link_resource: object + :type shared_private_link_resource: any :param 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. Possible values include: "Enabled", "Disabled". @@ -1238,7 +1274,7 @@ def __init__( origin_host_header: Optional[str] = None, priority: Optional[int] = None, weight: Optional[int] = None, - shared_private_link_resource: Optional[object] = None, + shared_private_link_resource: Optional[Any] = None, enabled_state: Optional[Union[str, "EnabledState"]] = None, **kwargs ): @@ -1282,7 +1318,7 @@ class AFDOriginUpdateParameters(msrest.serialization.Model): :type weight: int :param shared_private_link_resource: The properties of the private link resource for private origin. - :type shared_private_link_resource: object + :type shared_private_link_resource: any :param 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. Possible values include: "Enabled", "Disabled". @@ -1318,7 +1354,7 @@ def __init__( origin_host_header: Optional[str] = None, priority: Optional[int] = None, weight: Optional[int] = None, - shared_private_link_resource: Optional[object] = None, + shared_private_link_resource: Optional[Any] = None, enabled_state: Optional[Union[str, "EnabledState"]] = None, **kwargs ): @@ -2132,7 +2168,7 @@ def __init__( self.transforms = transforms -class CustomDomain(Resource): +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. @@ -3405,7 +3441,7 @@ def __init__( self.expiration_date = None -class EdgeNode(Resource): +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. @@ -5216,7 +5252,7 @@ def __init__( self.next_link = next_link -class Origin(Resource): +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. @@ -5340,7 +5376,7 @@ def __init__( self.private_endpoint_status = None -class OriginGroup(Resource): +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. @@ -5985,7 +6021,8 @@ class PolicySettings(msrest.serialization.Model): :param default_custom_block_response_status_code: If the action type is block, this field defines the default customer overridable http response status code. Possible values include: 200, 403, 405, 406, 429. - :type default_custom_block_response_status_code: str or ~azure.mgmt.cdn.models.Enum46 + :type default_custom_block_response_status_code: str or + ~azure.mgmt.cdn.models.PolicySettingsDefaultCustomBlockResponseStatusCode :param 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. :type default_custom_block_response_body: str @@ -6009,7 +6046,7 @@ def __init__( enabled_state: Optional[Union[str, "PolicyEnabledState"]] = None, mode: Optional[Union[str, "PolicyMode"]] = None, default_redirect_url: Optional[str] = None, - default_custom_block_response_status_code: Optional[Union[int, "Enum46"]] = None, + default_custom_block_response_status_code: Optional[Union[int, "PolicySettingsDefaultCustomBlockResponseStatusCode"]] = None, default_custom_block_response_body: Optional[str] = None, **kwargs ): @@ -6202,42 +6239,6 @@ def __init__( self.tags = tags -class ProxyResource(Resource): - """The resource model definition for a ARM proxy resource. It will have everything other than required location and tags. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Resource ID. - :vartype id: str - :ivar name: Resource name. - :vartype name: str - :ivar type: Resource type. - :vartype type: str - :ivar system_data: Read only system data. - :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 - ): - super(ProxyResource, self).__init__(**kwargs) - - class PurgeParameters(msrest.serialization.Model): """Parameters required for content purge. @@ -7093,7 +7094,7 @@ def __init__( self.http_error_ranges = http_error_ranges -class Route(Resource): +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. @@ -7120,7 +7121,7 @@ class Route(Resource): :param patterns_to_match: The route patterns of the rule. :type patterns_to_match: list[str] :param compression_settings: compression settings. - :type compression_settings: object + :type compression_settings: any :param 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. Possible @@ -7187,7 +7188,7 @@ def __init__( rule_sets: Optional[List["ResourceReference"]] = None, supported_protocols: Optional[List[Union[str, "AFDEndpointProtocols"]]] = None, patterns_to_match: Optional[List[str]] = None, - compression_settings: Optional[object] = None, + compression_settings: Optional[Any] = None, query_string_caching_behavior: Optional[Union[str, "AfdQueryStringCachingBehavior"]] = None, forwarding_protocol: Optional[Union[str, "ForwardingProtocol"]] = None, link_to_default_domain: Optional[Union[str, "LinkToDefaultDomain"]] = None, @@ -7260,7 +7261,7 @@ class RouteUpdatePropertiesParameters(msrest.serialization.Model): :param patterns_to_match: The route patterns of the rule. :type patterns_to_match: list[str] :param compression_settings: compression settings. - :type compression_settings: object + :type compression_settings: any :param 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. Possible @@ -7306,7 +7307,7 @@ def __init__( rule_sets: Optional[List["ResourceReference"]] = None, supported_protocols: Optional[List[Union[str, "AFDEndpointProtocols"]]] = None, patterns_to_match: Optional[List[str]] = None, - compression_settings: Optional[object] = None, + compression_settings: Optional[Any] = None, query_string_caching_behavior: Optional[Union[str, "AfdQueryStringCachingBehavior"]] = None, forwarding_protocol: Optional[Union[str, "ForwardingProtocol"]] = None, link_to_default_domain: Optional[Union[str, "LinkToDefaultDomain"]] = None, @@ -7348,7 +7349,7 @@ class RouteProperties(AFDStateProperties, RouteUpdatePropertiesParameters): :param patterns_to_match: The route patterns of the rule. :type patterns_to_match: list[str] :param compression_settings: compression settings. - :type compression_settings: object + :type compression_settings: any :param 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. Possible @@ -7407,7 +7408,7 @@ def __init__( rule_sets: Optional[List["ResourceReference"]] = None, supported_protocols: Optional[List[Union[str, "AFDEndpointProtocols"]]] = None, patterns_to_match: Optional[List[str]] = None, - compression_settings: Optional[object] = None, + compression_settings: Optional[Any] = None, query_string_caching_behavior: Optional[Union[str, "AfdQueryStringCachingBehavior"]] = None, forwarding_protocol: Optional[Union[str, "ForwardingProtocol"]] = None, link_to_default_domain: Optional[Union[str, "LinkToDefaultDomain"]] = None, @@ -7449,7 +7450,7 @@ class RouteUpdateParameters(msrest.serialization.Model): :param patterns_to_match: The route patterns of the rule. :type patterns_to_match: list[str] :param compression_settings: compression settings. - :type compression_settings: object + :type compression_settings: any :param 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. Possible @@ -7495,7 +7496,7 @@ def __init__( rule_sets: Optional[List["ResourceReference"]] = None, supported_protocols: Optional[List[Union[str, "AFDEndpointProtocols"]]] = None, patterns_to_match: Optional[List[str]] = None, - compression_settings: Optional[object] = None, + compression_settings: Optional[Any] = None, query_string_caching_behavior: Optional[Union[str, "AfdQueryStringCachingBehavior"]] = None, forwarding_protocol: Optional[Union[str, "ForwardingProtocol"]] = None, link_to_default_domain: Optional[Union[str, "LinkToDefaultDomain"]] = None, @@ -7518,7 +7519,7 @@ def __init__( self.enabled_state = enabled_state -class Rule(Resource): +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. @@ -7725,7 +7726,7 @@ def __init__( self.deployment_status = None -class RuleSet(Resource): +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. @@ -7876,7 +7877,7 @@ def __init__( self.match_processing_behavior = match_processing_behavior -class Secret(Resource): +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. @@ -7997,7 +7998,7 @@ def __init__( self.parameters = parameters -class SecurityPolicy(Resource): +class SecurityPolicy(ProxyResource): """SecurityPolicy association for AzureFrontDoor profile. Variables are only populated by the server, and will be ignored when sending a request. 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 795d446aa117..1e7b2f958b7a 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 @@ -112,7 +112,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -177,7 +177,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AFDDomain', pipeline_response) @@ -234,7 +234,7 @@ def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -273,8 +273,8 @@ def begin_create( :type custom_domain: ~azure.mgmt.cdn.models.AFDDomain :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AFDDomain or the result of cls(response) @@ -375,7 +375,7 @@ def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -411,8 +411,8 @@ def begin_update( :type custom_domain_update_properties: ~azure.mgmt.cdn.models.AFDDomainUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AFDDomain or the result of cls(response) @@ -507,7 +507,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -534,8 +534,8 @@ def begin_delete( :type custom_domain_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -626,7 +626,7 @@ def _refresh_validation_token_initial( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidationToken', pipeline_response) @@ -655,8 +655,8 @@ def begin_refresh_validation_token( :type custom_domain_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ValidationToken or the result of cls(response) 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 97b649eafa9a..27afd2ade910 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 @@ -112,7 +112,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -177,7 +177,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AFDEndpoint', pipeline_response) @@ -234,7 +234,7 @@ def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -274,8 +274,8 @@ def begin_create( :type endpoint: ~azure.mgmt.cdn.models.AFDEndpoint :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AFDEndpoint or the result of cls(response) @@ -376,7 +376,7 @@ def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -415,8 +415,8 @@ def begin_update( :type endpoint_update_properties: ~azure.mgmt.cdn.models.AFDEndpointUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AFDEndpoint or the result of cls(response) @@ -511,7 +511,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -538,8 +538,8 @@ def begin_delete( :type endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -636,7 +636,7 @@ def _purge_content_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -667,8 +667,8 @@ def begin_purge_content( :type contents: ~azure.mgmt.cdn.models.AfdPurgeParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -789,7 +789,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -861,7 +861,7 @@ 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(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidateCustomDomainOutput', pipeline_response) 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 25f1140808b9..8b5372964658 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 @@ -112,7 +112,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -176,7 +176,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AFDOriginGroup', pipeline_response) @@ -233,7 +233,7 @@ def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -272,8 +272,8 @@ def begin_create( :type origin_group: ~azure.mgmt.cdn.models.AFDOriginGroup :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AFDOriginGroup or the result of cls(response) @@ -374,7 +374,7 @@ def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -410,8 +410,8 @@ def begin_update( :type origin_group_update_properties: ~azure.mgmt.cdn.models.AFDOriginGroupUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AFDOriginGroup or the result of cls(response) @@ -506,7 +506,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -532,8 +532,8 @@ def begin_delete( :type origin_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -653,7 +653,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/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 98adad806df8..9ab48f15ddef 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 @@ -116,7 +116,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -184,7 +184,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('AFDOrigin', pipeline_response) @@ -243,7 +243,7 @@ def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -285,8 +285,8 @@ def begin_create( :type origin: ~azure.mgmt.cdn.models.AFDOrigin :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AFDOrigin or the result of cls(response) @@ -391,7 +391,7 @@ def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -430,8 +430,8 @@ def begin_update( :type origin_update_properties: ~azure.mgmt.cdn.models.AFDOriginUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either AFDOrigin or the result of cls(response) @@ -530,7 +530,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -559,8 +559,8 @@ def begin_delete( :type origin_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) 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 d2ede9d3baaa..c00b70725866 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 @@ -110,7 +110,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -178,7 +178,7 @@ def 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(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidateCustomDomainOutput', pipeline_response) 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 8627d6a89fd2..1938a44d6296 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 @@ -70,7 +70,7 @@ def check_name_availability( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CheckNameAvailabilityOutput', pipeline_response) @@ -131,7 +131,7 @@ def check_name_availability_with_subscription( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CheckNameAvailabilityOutput', pipeline_response) @@ -193,7 +193,7 @@ 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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidateProbeOutput', pipeline_response) 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 7f902cb800f1..573aa06d56a4 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 @@ -116,7 +116,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -184,7 +184,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CustomDomain', pipeline_response) @@ -243,7 +243,7 @@ def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -285,8 +285,8 @@ def begin_create( :type custom_domain_properties: ~azure.mgmt.cdn.models.CustomDomainParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either CustomDomain or the result of cls(response) @@ -385,7 +385,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -419,8 +419,8 @@ def begin_delete( :type custom_domain_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -476,7 +476,7 @@ def get_long_running_output(pipeline_response): return LROPoller(self._client, raw_result, get_long_running_output, polling_method) begin_delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}'} # type: ignore - def disable_custom_https( + def _disable_custom_https_initial( self, resource_group_name, # type: str profile_name, # type: str @@ -485,21 +485,6 @@ def disable_custom_https( **kwargs # type: Any ): # type: (...) -> Optional["_models.CustomDomain"] - """Disable https delivery of the custom domain. - - :param resource_group_name: Name of the Resource group within the Azure subscription. - :type resource_group_name: str - :param profile_name: Name of the CDN profile which is unique within the resource group. - :type profile_name: str - :param endpoint_name: Name of the endpoint under the profile which is unique globally. - :type endpoint_name: str - :param custom_domain_name: Name of the custom domain within an endpoint. - :type custom_domain_name: str - :keyword callable cls: A custom type or function that will be passed the direct response - :return: CustomDomain, or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CustomDomain or None - :raises: ~azure.core.exceptions.HttpResponseError - """ cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.CustomDomain"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -509,7 +494,7 @@ def disable_custom_https( accept = "application/json" # Construct URL - url = self.disable_custom_https.metadata['url'] # type: ignore + url = self._disable_custom_https_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -533,7 +518,7 @@ def disable_custom_https( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -544,19 +529,18 @@ def disable_custom_https( return cls(pipeline_response, deserialized, {}) return deserialized - disable_custom_https.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/disableCustomHttps'} # type: ignore + _disable_custom_https_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/disableCustomHttps'} # type: ignore - def enable_custom_https( + def begin_disable_custom_https( self, resource_group_name, # type: str profile_name, # type: str endpoint_name, # type: str custom_domain_name, # type: str - custom_domain_https_parameters=None, # type: Optional["_models.CustomDomainHttpsParameters"] **kwargs # type: Any ): - # type: (...) -> Optional["_models.CustomDomain"] - """Enable https delivery of the custom domain. + # type: (...) -> LROPoller["_models.CustomDomain"] + """Disable https delivery of the custom domain. :param resource_group_name: Name of the Resource group within the Azure subscription. :type resource_group_name: str @@ -566,15 +550,75 @@ def enable_custom_https( :type endpoint_name: str :param custom_domain_name: Name of the custom domain within an endpoint. :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. - :type custom_domain_https_parameters: ~azure.mgmt.cdn.models.CustomDomainHttpsParameters :keyword callable cls: A custom type or function that will be passed the direct response - :return: CustomDomain, or the result of cls(response) - :rtype: ~azure.mgmt.cdn.models.CustomDomain or None - :raises: ~azure.core.exceptions.HttpResponseError + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomDomain"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._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, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('CustomDomain', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str'), + 'endpointName': self._serialize.url("endpoint_name", endpoint_name, 'str'), + 'customDomainName': self._serialize.url("custom_domain_name", custom_domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_disable_custom_https.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/disableCustomHttps'} # type: ignore + + def _enable_custom_https_initial( + self, + resource_group_name, # type: str + profile_name, # type: str + endpoint_name, # type: str + custom_domain_name, # type: str + custom_domain_https_parameters=None, # type: Optional["_models.CustomDomainHttpsParameters"] + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.CustomDomain"] cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.CustomDomain"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError @@ -585,7 +629,7 @@ def enable_custom_https( accept = "application/json" # Construct URL - url = self.enable_custom_https.metadata['url'] # type: ignore + url = self._enable_custom_https_initial.metadata['url'] # type: ignore path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), 'profileName': self._serialize.url("profile_name", profile_name, 'str'), @@ -616,7 +660,7 @@ def enable_custom_https( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -627,4 +671,88 @@ def enable_custom_https( return cls(pipeline_response, deserialized, {}) return deserialized - enable_custom_https.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps'} # type: ignore + _enable_custom_https_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps'} # type: ignore + + def begin_enable_custom_https( + self, + resource_group_name, # type: str + profile_name, # type: str + endpoint_name, # type: str + custom_domain_name, # type: str + custom_domain_https_parameters=None, # type: Optional["_models.CustomDomainHttpsParameters"] + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.CustomDomain"] + """Enable https delivery of the custom domain. + + :param resource_group_name: Name of the Resource group within the Azure subscription. + :type resource_group_name: str + :param profile_name: Name of the CDN profile which is unique within the resource group. + :type profile_name: str + :param endpoint_name: Name of the endpoint under the profile which is unique globally. + :type endpoint_name: str + :param custom_domain_name: Name of the custom domain within an endpoint. + :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. + :type custom_domain_https_parameters: ~azure.mgmt.cdn.models.CustomDomainHttpsParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :keyword str continuation_token: A continuation token to restart a poller from a saved state. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. + :paramtype polling: bool or ~azure.core.polling.PollingMethod + :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. + :return: An instance of LROPoller that returns either None or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[None] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.CustomDomain"] + lro_delay = kwargs.pop( + 'polling_interval', + self._config.polling_interval + ) + cont_token = kwargs.pop('continuation_token', None) # type: Optional[str] + if cont_token is None: + raw_result = self._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, + cls=lambda x,y,z: x, + **kwargs + ) + + kwargs.pop('error_map', None) + kwargs.pop('content_type', None) + + def get_long_running_output(pipeline_response): + deserialized = self._deserialize('CustomDomain', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + return deserialized + + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+$'), + 'profileName': self._serialize.url("profile_name", profile_name, 'str'), + 'endpointName': self._serialize.url("endpoint_name", endpoint_name, 'str'), + 'customDomainName': self._serialize.url("custom_domain_name", custom_domain_name, 'str'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + if cont_token: + return LROPoller.from_continuation_token( + polling_method=polling_method, + continuation_token=cont_token, + client=self._client, + deserialization_callback=get_long_running_output + ) + else: + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + begin_enable_custom_https.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/endpoints/{endpointName}/customDomains/{customDomainName}/enableCustomHttps'} # 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 index 9409298acb27..6ba53b518b8b 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 @@ -99,7 +99,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/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 756eb364cea5..d7a034d3219b 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 @@ -112,7 +112,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -177,7 +177,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Endpoint', pipeline_response) @@ -234,7 +234,7 @@ def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -274,8 +274,8 @@ def begin_create( :type endpoint: ~azure.mgmt.cdn.models.Endpoint :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Endpoint or the result of cls(response) @@ -376,7 +376,7 @@ def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -415,8 +415,8 @@ def begin_update( :type endpoint_update_properties: ~azure.mgmt.cdn.models.EndpointUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Endpoint or the result of cls(response) @@ -511,7 +511,7 @@ def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -538,8 +538,8 @@ def begin_delete( :type endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -630,7 +630,7 @@ def _start_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -663,8 +663,8 @@ def begin_start( :type endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Endpoint or the result of cls(response) @@ -758,7 +758,7 @@ def _stop_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -791,8 +791,8 @@ def begin_stop( :type endpoint_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Endpoint or the result of cls(response) @@ -892,7 +892,7 @@ def _purge_content_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -923,8 +923,8 @@ def begin_purge_content( :type content_file_paths: ~azure.mgmt.cdn.models.PurgeParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -1022,7 +1022,7 @@ def _load_content_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1052,8 +1052,8 @@ def begin_load_content( :type content_file_paths: ~azure.mgmt.cdn.models.LoadParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -1166,7 +1166,7 @@ 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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidateCustomDomainOutput', pipeline_response) @@ -1246,7 +1246,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/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 08d4eb3921b1..14c38f9b4693 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 @@ -133,7 +133,7 @@ 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(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('MetricsResponse', pipeline_response) @@ -218,7 +218,7 @@ 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(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RankingsResponse', pipeline_response) @@ -278,7 +278,7 @@ 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(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ContinentsResponse', pipeline_response) @@ -338,7 +338,7 @@ 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(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ResourcesResponse', pipeline_response) @@ -429,7 +429,7 @@ 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(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WafMetricsResponse', pipeline_response) @@ -519,7 +519,7 @@ 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(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('WafRankingsResponse', pipeline_response) 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 00552854ac51..5de7ee13b043 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 @@ -102,7 +102,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_operations.py index dbf8578c17d5..1cd3ada09c0c 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 @@ -98,7 +98,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/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 517f3130ce49..2195294db5df 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 @@ -116,7 +116,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -184,7 +184,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('OriginGroup', pipeline_response) @@ -243,7 +243,7 @@ def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -285,8 +285,8 @@ def begin_create( :type origin_group: ~azure.mgmt.cdn.models.OriginGroup :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either OriginGroup or the result of cls(response) @@ -391,7 +391,7 @@ def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -430,8 +430,8 @@ def begin_update( :type origin_group_update_properties: ~azure.mgmt.cdn.models.OriginGroupUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either OriginGroup or the result of cls(response) @@ -530,7 +530,7 @@ def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -559,8 +559,8 @@ def begin_delete( :type origin_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) 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 f08639a66920..ca6e1e61129e 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 @@ -116,7 +116,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -184,7 +184,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Origin', pipeline_response) @@ -243,7 +243,7 @@ def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -285,8 +285,8 @@ def begin_create( :type origin: ~azure.mgmt.cdn.models.Origin :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Origin or the result of cls(response) @@ -391,7 +391,7 @@ def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -430,8 +430,8 @@ def begin_update( :type origin_update_properties: ~azure.mgmt.cdn.models.OriginUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Origin or the result of cls(response) @@ -530,7 +530,7 @@ def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -559,8 +559,8 @@ def begin_delete( :type origin_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) 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 8d588616174f..5007e413ec32 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 @@ -108,7 +108,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -168,7 +168,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('CdnWebApplicationFirewallPolicy', pipeline_response) @@ -223,7 +223,7 @@ def _create_or_update_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -259,8 +259,8 @@ def begin_create_or_update( :type cdn_web_application_firewall_policy: ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either CdnWebApplicationFirewallPolicy or the result of cls(response) @@ -357,7 +357,7 @@ def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -392,8 +392,8 @@ def begin_update( :type cdn_web_application_firewall_policy_patch_parameters: ~azure.mgmt.cdn.models.CdnWebApplicationFirewallPolicyPatchParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either CdnWebApplicationFirewallPolicy or the result of cls(response) 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 f8786089ce84..7a5047a52fec 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 @@ -104,7 +104,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -176,7 +176,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -237,7 +237,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Profile', pipeline_response) @@ -292,7 +292,7 @@ def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -329,8 +329,8 @@ def begin_create( :type profile: ~azure.mgmt.cdn.models.Profile :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Profile or the result of cls(response) @@ -427,7 +427,7 @@ def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -461,8 +461,8 @@ def begin_update( :type profile_update_parameters: ~azure.mgmt.cdn.models.ProfileUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Profile or the result of cls(response) @@ -553,7 +553,7 @@ def _delete_initial( if response.status_code not in [202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -577,8 +577,8 @@ def begin_delete( :type profile_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -680,7 +680,7 @@ def generate_sso_uri( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SsoUri', pipeline_response) @@ -741,7 +741,7 @@ 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(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SupportedOptimizationTypesListResult', pipeline_response) @@ -817,7 +817,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/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 3d3efd59e59d..c98b51987927 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 @@ -102,7 +102,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/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 f06d3cf5f460..a1f604b2b49c 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 @@ -116,7 +116,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -185,7 +185,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Route', pipeline_response) @@ -244,7 +244,7 @@ def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -287,8 +287,8 @@ def begin_create( :type route: ~azure.mgmt.cdn.models.Route :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Route or the result of cls(response) @@ -393,7 +393,7 @@ def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -433,8 +433,8 @@ def begin_update( :type route_update_properties: ~azure.mgmt.cdn.models.RouteUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Route or the result of cls(response) @@ -533,7 +533,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -563,8 +563,8 @@ def begin_delete( :type route_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) 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 f21499f59e1c..33f33af124ba 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 @@ -112,7 +112,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -177,7 +177,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('RuleSet', pipeline_response) @@ -228,7 +228,7 @@ def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -264,8 +264,8 @@ def begin_create( :type rule_set_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either RuleSet or the result of cls(response) @@ -359,7 +359,7 @@ def _delete_initial( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -386,8 +386,8 @@ def begin_delete( :type rule_set_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -507,7 +507,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) diff --git a/sdk/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 3f91bf505a2d..6b4ef83e2efc 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 @@ -116,7 +116,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -184,7 +184,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Rule', pipeline_response) @@ -243,7 +243,7 @@ def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -285,8 +285,8 @@ def begin_create( :type rule: ~azure.mgmt.cdn.models.Rule :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Rule or the result of cls(response) @@ -391,7 +391,7 @@ def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -430,8 +430,8 @@ def begin_update( :type rule_update_properties: ~azure.mgmt.cdn.models.RuleUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Rule or the result of cls(response) @@ -530,7 +530,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -559,8 +559,8 @@ def begin_delete( :type rule_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) 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 f3a52b4ee1cd..6d1ecd61507b 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 @@ -112,7 +112,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -176,7 +176,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('Secret', pipeline_response) @@ -233,7 +233,7 @@ def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -272,8 +272,8 @@ def begin_create( :type secret: ~azure.mgmt.cdn.models.Secret :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Secret or the result of cls(response) @@ -374,7 +374,7 @@ def _update_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -410,8 +410,8 @@ def begin_update( :type secret_properties: ~azure.mgmt.cdn.models.SecretProperties :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Secret or the result of cls(response) @@ -506,7 +506,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -532,8 +532,8 @@ def begin_delete( :type secret_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) 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 8e3b4d27bca1..c1299f83a136 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 @@ -112,7 +112,7 @@ def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) @@ -176,7 +176,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('SecurityPolicy', pipeline_response) @@ -233,7 +233,7 @@ def _create_initial( if response.status_code not in [200, 201, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -272,8 +272,8 @@ def begin_create( :type security_policy: ~azure.mgmt.cdn.models.SecurityPolicy :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SecurityPolicy or the result of cls(response) @@ -374,7 +374,7 @@ def _patch_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -410,8 +410,8 @@ def begin_patch( :type security_policy_properties: ~azure.mgmt.cdn.models.SecurityPolicyProperties :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either SecurityPolicy or the result of cls(response) @@ -506,7 +506,7 @@ def _delete_initial( if response.status_code not in [200, 202, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -532,8 +532,8 @@ def begin_delete( :type security_policy_name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) diff --git a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_validate_operations.py b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_validate_operations.py index b3545e35607f..8703ca456189 100644 --- a/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_validate_operations.py +++ b/sdk/cdn/azure-mgmt-cdn/azure/mgmt/cdn/operations/_validate_operations.py @@ -93,7 +93,7 @@ def secret( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.AfdErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.AfdErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ValidateSecretOutput', pipeline_response)