From 043626fe80027839e2d324cf7fb7d0cec84c282e Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Thu, 22 Jul 2021 06:39:12 +0000 Subject: [PATCH] CodeGen from PR 15056 in Azure/azure-rest-api-specs Merge d7bebd61577a414cfd905aff7ba28c390c943a66 into 1018cb07691071cc3444d38ebf70f8cb46f79423 --- .../azure-mgmt-apimanagement/MANIFEST.in | 1 + .../azure-mgmt-apimanagement/_meta.json | 11 + .../apimanagement/_api_management_client.py | 27 +- .../mgmt/apimanagement/_configuration.py | 2 +- .../azure/mgmt/apimanagement/_metadata.json | 205 +++ .../azure/mgmt/apimanagement/_version.py | 2 +- .../aio/_api_management_client.py | 26 +- .../mgmt/apimanagement/aio/_configuration.py | 2 +- .../apimanagement/aio/operations/__init__.py | 4 + .../operations/_api_diagnostic_operations.py | 36 +- .../aio/operations/_api_export_operations.py | 6 +- .../_api_issue_attachment_operations.py | 30 +- .../_api_issue_comment_operations.py | 30 +- .../aio/operations/_api_issue_operations.py | 36 +- .../_api_management_client_operations.py | 151 +++ .../_api_management_operations_operations.py | 6 +- .../_api_management_service_operations.py | 119 +- ..._api_management_service_skus_operations.py | 6 +- .../_api_management_skus_operations.py | 6 +- .../operations/_api_operation_operations.py | 36 +- .../_api_operation_policy_operations.py | 30 +- .../aio/operations/_api_operations.py | 48 +- .../aio/operations/_api_policy_operations.py | 30 +- .../aio/operations/_api_product_operations.py | 6 +- .../aio/operations/_api_release_operations.py | 36 +- .../operations/_api_revision_operations.py | 6 +- .../aio/operations/_api_schema_operations.py | 36 +- .../_api_tag_description_operations.py | 30 +- .../operations/_api_version_set_operations.py | 36 +- .../_authorization_server_operations.py | 42 +- .../aio/operations/_backend_operations.py | 42 +- .../aio/operations/_cache_operations.py | 36 +- .../aio/operations/_certificate_operations.py | 36 +- .../operations/_content_item_operations.py | 41 +- .../operations/_content_type_operations.py | 38 +- .../_delegation_settings_operations.py | 30 +- .../_deleted_services_operations.py | 24 +- .../aio/operations/_diagnostic_operations.py | 36 +- .../operations/_email_template_operations.py | 36 +- .../aio/operations/_gateway_api_operations.py | 24 +- ...ateway_certificate_authority_operations.py | 30 +- ...teway_hostname_configuration_operations.py | 30 +- .../aio/operations/_gateway_operations.py | 54 +- .../aio/operations/_group_operations.py | 36 +- .../aio/operations/_group_user_operations.py | 24 +- .../_identity_provider_operations.py | 42 +- .../aio/operations/_issue_operations.py | 12 +- .../aio/operations/_logger_operations.py | 36 +- .../aio/operations/_named_value_operations.py | 66 +- .../operations/_network_status_operations.py | 12 +- .../operations/_notification_operations.py | 18 +- ...notification_recipient_email_operations.py | 24 +- ..._notification_recipient_user_operations.py | 24 +- .../_open_id_connect_provider_operations.py | 42 +- .../aio/operations/_operation_operations.py | 6 +- ...twork_dependencies_endpoints_operations.py | 100 ++ .../_policy_description_operations.py | 6 +- .../aio/operations/_policy_operations.py | 30 +- .../operations/_portal_revision_operations.py | 51 +- .../operations/_portal_settings_operations.py | 6 +- .../aio/operations/_product_api_operations.py | 24 +- .../operations/_product_group_operations.py | 24 +- .../aio/operations/_product_operations.py | 42 +- .../operations/_product_policy_operations.py | 30 +- .../_product_subscriptions_operations.py | 6 +- .../_quota_by_counter_keys_operations.py | 24 +- .../_quota_by_period_keys_operations.py | 24 +- .../aio/operations/_region_operations.py | 6 +- .../aio/operations/_reports_operations.py | 48 +- .../_sign_in_settings_operations.py | 24 +- .../_sign_up_settings_operations.py | 24 +- .../operations/_subscription_operations.py | 54 +- .../aio/operations/_tag_operations.py | 126 +- .../operations/_tag_resource_operations.py | 6 +- .../_tenant_access_git_operations.py | 12 +- .../operations/_tenant_access_operations.py | 48 +- .../_tenant_configuration_operations.py | 42 +- .../operations/_tenant_settings_operations.py | 12 +- .../_user_confirmation_password_operations.py | 6 +- .../aio/operations/_user_group_operations.py | 6 +- .../operations/_user_identities_operations.py | 6 +- .../aio/operations/_user_operations.py | 48 +- .../_user_subscription_operations.py | 12 +- .../mgmt/apimanagement/models/__init__.py | 72 ++ .../models/_api_management_client_enums.py | 435 +++++-- .../mgmt/apimanagement/models/_models.py | 1029 ++++++++++++--- .../mgmt/apimanagement/models/_models_py3.py | 1146 ++++++++++++++--- .../mgmt/apimanagement/operations/__init__.py | 4 + .../operations/_api_diagnostic_operations.py | 24 +- .../operations/_api_export_operations.py | 4 +- .../_api_issue_attachment_operations.py | 20 +- .../_api_issue_comment_operations.py | 20 +- .../operations/_api_issue_operations.py | 24 +- .../_api_management_client_operations.py | 157 +++ .../_api_management_operations_operations.py | 4 +- .../_api_management_service_operations.py | 83 +- ..._api_management_service_skus_operations.py | 4 +- .../_api_management_skus_operations.py | 4 +- .../operations/_api_operation_operations.py | 24 +- .../_api_operation_policy_operations.py | 20 +- .../operations/_api_operations.py | 32 +- .../operations/_api_policy_operations.py | 20 +- .../operations/_api_product_operations.py | 4 +- .../operations/_api_release_operations.py | 24 +- .../operations/_api_revision_operations.py | 4 +- .../operations/_api_schema_operations.py | 24 +- .../_api_tag_description_operations.py | 20 +- .../operations/_api_version_set_operations.py | 24 +- .../_authorization_server_operations.py | 28 +- .../operations/_backend_operations.py | 28 +- .../operations/_cache_operations.py | 24 +- .../operations/_certificate_operations.py | 24 +- .../operations/_content_item_operations.py | 31 +- .../operations/_content_type_operations.py | 30 +- .../_delegation_settings_operations.py | 20 +- .../_deleted_services_operations.py | 16 +- .../operations/_diagnostic_operations.py | 24 +- .../operations/_email_template_operations.py | 24 +- .../operations/_gateway_api_operations.py | 16 +- ...ateway_certificate_authority_operations.py | 20 +- ...teway_hostname_configuration_operations.py | 20 +- .../operations/_gateway_operations.py | 36 +- .../operations/_group_operations.py | 24 +- .../operations/_group_user_operations.py | 16 +- .../_identity_provider_operations.py | 28 +- .../operations/_issue_operations.py | 8 +- .../operations/_logger_operations.py | 24 +- .../operations/_named_value_operations.py | 44 +- .../operations/_network_status_operations.py | 8 +- .../operations/_notification_operations.py | 12 +- ...notification_recipient_email_operations.py | 16 +- ..._notification_recipient_user_operations.py | 16 +- .../_open_id_connect_provider_operations.py | 28 +- .../operations/_operation_operations.py | 4 +- ...twork_dependencies_endpoints_operations.py | 105 ++ .../_policy_description_operations.py | 4 +- .../operations/_policy_operations.py | 20 +- .../operations/_portal_revision_operations.py | 37 +- .../operations/_portal_settings_operations.py | 4 +- .../operations/_product_api_operations.py | 16 +- .../operations/_product_group_operations.py | 16 +- .../operations/_product_operations.py | 28 +- .../operations/_product_policy_operations.py | 20 +- .../_product_subscriptions_operations.py | 4 +- .../_quota_by_counter_keys_operations.py | 20 +- .../_quota_by_period_keys_operations.py | 20 +- .../operations/_region_operations.py | 4 +- .../operations/_reports_operations.py | 32 +- .../_sign_in_settings_operations.py | 16 +- .../_sign_up_settings_operations.py | 16 +- .../operations/_subscription_operations.py | 36 +- .../operations/_tag_operations.py | 84 +- .../operations/_tag_resource_operations.py | 4 +- .../_tenant_access_git_operations.py | 8 +- .../operations/_tenant_access_operations.py | 32 +- .../_tenant_configuration_operations.py | 28 +- .../operations/_tenant_settings_operations.py | 8 +- .../_user_confirmation_password_operations.py | 4 +- .../operations/_user_group_operations.py | 4 +- .../operations/_user_identities_operations.py | 4 +- .../operations/_user_operations.py | 32 +- .../_user_subscription_operations.py | 8 +- 162 files changed, 4878 insertions(+), 2219 deletions(-) create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/_meta.json create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_metadata.json create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_client_operations.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_outbound_network_dependencies_endpoints_operations.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_client_operations.py create mode 100644 sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_outbound_network_dependencies_endpoints_operations.py diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/MANIFEST.in b/sdk/apimanagement/azure-mgmt-apimanagement/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/MANIFEST.in +++ b/sdk/apimanagement/azure-mgmt-apimanagement/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/_meta.json b/sdk/apimanagement/azure-mgmt-apimanagement/_meta.json new file mode 100644 index 000000000000..2b633acfced8 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/_meta.json @@ -0,0 +1,11 @@ +{ + "autorest": "3.4.5", + "use": [ + "@autorest/python@5.8.4", + "@autorest/modelerfour@4.19.2" + ], + "commit": "3c097280ac78f67c74995dcbba991ab09331469a", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/apimanagement/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.4 --use=@autorest/modelerfour@4.19.2 --version=3.4.5", + "readme": "specification/apimanagement/resource-manager/readme.md" +} \ No newline at end of file diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_management_client.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_management_client.py index fd1ab90d48d3..7d2a2db4dc7e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_management_client.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_api_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 ApiManagementClientConfiguration from .operations import ApiOperations @@ -62,6 +63,7 @@ from .operations import NotificationRecipientUserOperations from .operations import NotificationRecipientEmailOperations from .operations import OpenIdConnectProviderOperations +from .operations import OutboundNetworkDependenciesEndpointsOperations from .operations import PolicyOperations from .operations import PolicyDescriptionOperations from .operations import PortalRevisionOperations @@ -90,10 +92,11 @@ from .operations import UserSubscriptionOperations from .operations import UserIdentitiesOperations from .operations import UserConfirmationPasswordOperations +from .operations import ApiManagementClientOperationsMixin from . import models -class ApiManagementClient(object): +class ApiManagementClient(ApiManagementClientOperationsMixin): """ApiManagement Client. :ivar api: ApiOperations operations @@ -184,6 +187,8 @@ class ApiManagementClient(object): :vartype notification_recipient_email: azure.mgmt.apimanagement.operations.NotificationRecipientEmailOperations :ivar open_id_connect_provider: OpenIdConnectProviderOperations operations :vartype open_id_connect_provider: azure.mgmt.apimanagement.operations.OpenIdConnectProviderOperations + :ivar outbound_network_dependencies_endpoints: OutboundNetworkDependenciesEndpointsOperations operations + :vartype outbound_network_dependencies_endpoints: azure.mgmt.apimanagement.operations.OutboundNetworkDependenciesEndpointsOperations :ivar policy: PolicyOperations operations :vartype policy: azure.mgmt.apimanagement.operations.PolicyOperations :ivar policy_description: PolicyDescriptionOperations operations @@ -354,6 +359,8 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.open_id_connect_provider = OpenIdConnectProviderOperations( self._client, self._config, self._serialize, self._deserialize) + self.outbound_network_dependencies_endpoints = OutboundNetworkDependenciesEndpointsOperations( + self._client, self._config, self._serialize, self._deserialize) self.policy = PolicyOperations( self._client, self._config, self._serialize, self._deserialize) self.policy_description = PolicyDescriptionOperations( @@ -411,6 +418,24 @@ def __init__( self.user_confirmation_password = UserConfirmationPasswordOperations( 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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_configuration.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_configuration.py index 38989b8ec5c4..be3466a8cf5b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_configuration.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_configuration.py @@ -48,7 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-12-01" + self.api_version = "2021-04-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-apimanagement/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_metadata.json b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_metadata.json new file mode 100644 index 000000000000..6c8d5000d1df --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_metadata.json @@ -0,0 +1,205 @@ +{ + "chosen_version": "2021-04-01-preview", + "total_api_version_list": ["2021-04-01-preview"], + "client": { + "name": "ApiManagementClient", + "filename": "_api_management_client", + "description": "ApiManagement Client.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true, + "client_side_validation": false, + "sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"ApiManagementClientConfiguration\"], \"._operations_mixin\": [\"ApiManagementClientOperationsMixin\"]}}, \"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\": [\"ApiManagementClientConfiguration\"], \"._operations_mixin\": [\"ApiManagementClientOperationsMixin\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}" + }, + "global_parameters": { + "sync": { + "credential": { + "signature": "credential, # type: \"TokenCredential\"", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials.TokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id, # type: str", + "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + } + }, + "async": { + "credential": { + "signature": "credential: \"AsyncTokenCredential\",", + "description": "Credential needed for the client to connect to Azure.", + "docstring_type": "~azure.core.credentials_async.AsyncTokenCredential", + "required": true + }, + "subscription_id": { + "signature": "subscription_id: str,", + "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "docstring_type": "str", + "required": true + } + }, + "constant": { + }, + "call": "credential, subscription_id", + "service_client_specific": { + "sync": { + "api_version": { + "signature": "api_version=None, # type: Optional[str]", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url=None, # type: Optional[str]", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile=KnownProfiles.default, # type: KnownProfiles", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + }, + "async": { + "api_version": { + "signature": "api_version: Optional[str] = None,", + "description": "API version to use if no profile is provided, or if missing in profile.", + "docstring_type": "str", + "required": false + }, + "base_url": { + "signature": "base_url: Optional[str] = None,", + "description": "Service URL", + "docstring_type": "str", + "required": false + }, + "profile": { + "signature": "profile: KnownProfiles = KnownProfiles.default,", + "description": "A profile definition, from KnownProfiles to dict.", + "docstring_type": "azure.profiles.KnownProfiles", + "required": false + } + } + } + }, + "config": { + "credential": true, + "credential_scopes": ["https://management.azure.com/.default"], + "credential_default_policy_type": "BearerTokenCredentialPolicy", + "credential_default_policy_type_has_async_version": true, + "credential_key_header_name": null, + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" + }, + "operation_groups": { + "api": "ApiOperations", + "api_revision": "ApiRevisionOperations", + "api_release": "ApiReleaseOperations", + "api_operation": "ApiOperationOperations", + "api_operation_policy": "ApiOperationPolicyOperations", + "tag": "TagOperations", + "api_product": "ApiProductOperations", + "api_policy": "ApiPolicyOperations", + "api_schema": "ApiSchemaOperations", + "api_diagnostic": "ApiDiagnosticOperations", + "api_issue": "ApiIssueOperations", + "api_issue_comment": "ApiIssueCommentOperations", + "api_issue_attachment": "ApiIssueAttachmentOperations", + "api_tag_description": "ApiTagDescriptionOperations", + "operation": "OperationOperations", + "api_export": "ApiExportOperations", + "api_version_set": "ApiVersionSetOperations", + "authorization_server": "AuthorizationServerOperations", + "backend": "BackendOperations", + "cache": "CacheOperations", + "certificate": "CertificateOperations", + "content_type": "ContentTypeOperations", + "content_item": "ContentItemOperations", + "deleted_services": "DeletedServicesOperations", + "api_management_operations": "ApiManagementOperationsOperations", + "api_management_service_skus": "ApiManagementServiceSkusOperations", + "api_management_service": "ApiManagementServiceOperations", + "diagnostic": "DiagnosticOperations", + "email_template": "EmailTemplateOperations", + "gateway": "GatewayOperations", + "gateway_hostname_configuration": "GatewayHostnameConfigurationOperations", + "gateway_api": "GatewayApiOperations", + "gateway_certificate_authority": "GatewayCertificateAuthorityOperations", + "group": "GroupOperations", + "group_user": "GroupUserOperations", + "identity_provider": "IdentityProviderOperations", + "issue": "IssueOperations", + "logger": "LoggerOperations", + "named_value": "NamedValueOperations", + "network_status": "NetworkStatusOperations", + "notification": "NotificationOperations", + "notification_recipient_user": "NotificationRecipientUserOperations", + "notification_recipient_email": "NotificationRecipientEmailOperations", + "open_id_connect_provider": "OpenIdConnectProviderOperations", + "outbound_network_dependencies_endpoints": "OutboundNetworkDependenciesEndpointsOperations", + "policy": "PolicyOperations", + "policy_description": "PolicyDescriptionOperations", + "portal_revision": "PortalRevisionOperations", + "portal_settings": "PortalSettingsOperations", + "sign_in_settings": "SignInSettingsOperations", + "sign_up_settings": "SignUpSettingsOperations", + "delegation_settings": "DelegationSettingsOperations", + "product": "ProductOperations", + "product_api": "ProductApiOperations", + "product_group": "ProductGroupOperations", + "product_subscriptions": "ProductSubscriptionsOperations", + "product_policy": "ProductPolicyOperations", + "quota_by_counter_keys": "QuotaByCounterKeysOperations", + "quota_by_period_keys": "QuotaByPeriodKeysOperations", + "region": "RegionOperations", + "reports": "ReportsOperations", + "tenant_settings": "TenantSettingsOperations", + "api_management_skus": "ApiManagementSkusOperations", + "subscription": "SubscriptionOperations", + "tag_resource": "TagResourceOperations", + "tenant_access": "TenantAccessOperations", + "tenant_access_git": "TenantAccessGitOperations", + "tenant_configuration": "TenantConfigurationOperations", + "user": "UserOperations", + "user_group": "UserGroupOperations", + "user_subscription": "UserSubscriptionOperations", + "user_identities": "UserIdentitiesOperations", + "user_confirmation_password": "UserConfirmationPasswordOperations" + }, + "operation_mixins": { + "sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"], \"azure.core.polling\": [\"LROPoller\", \"NoPolling\", \"PollingMethod\"], \"azure.mgmt.core.polling.arm_polling\": [\"ARMPolling\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.exceptions\": [\"ClientAuthenticationError\", \"HttpResponseError\", \"ResourceExistsError\", \"ResourceNotFoundError\", \"map_error\"], \"azure.mgmt.core.exceptions\": [\"ARMErrorFormat\"], \"azure.core.pipeline\": [\"PipelineResponse\"], \"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"], \"azure.core.polling\": [\"AsyncLROPoller\", \"AsyncNoPolling\", \"AsyncPollingMethod\"], \"azure.mgmt.core.polling.async_arm_polling\": [\"AsyncARMPolling\"]}, \"stdlib\": {\"warnings\": [null]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Callable\", \"Dict\", \"Generic\", \"Optional\", \"TypeVar\", \"Union\"]}}}", + "operations": { + "_perform_connectivity_check_async_initial" : { + "sync": { + "signature": "def _perform_connectivity_check_async_initial(\n self,\n resource_group_name, # type: str\n service_name, # type: str\n connectivity_check_request_params, # type: \"_models.ConnectivityCheckRequest\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"\n\n:param resource_group_name: The name of the resource group.\n:type resource_group_name: str\n:param service_name: The name of the API Management service.\n:type service_name: str\n:param connectivity_check_request_params: Connectivity Check request parameters.\n:type connectivity_check_request_params: ~azure.mgmt.apimanagement.models.ConnectivityCheckRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ConnectivityCheckResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.apimanagement.models.ConnectivityCheckResponse or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def _perform_connectivity_check_async_initial(\n self,\n resource_group_name: str,\n service_name: str,\n connectivity_check_request_params: \"_models.ConnectivityCheckRequest\",\n **kwargs: Any\n) -\u003e Optional[\"_models.ConnectivityCheckResponse\"]:\n", + "doc": "\"\"\"\n\n:param resource_group_name: The name of the resource group.\n:type resource_group_name: str\n:param service_name: The name of the API Management service.\n:type service_name: str\n:param connectivity_check_request_params: Connectivity Check request parameters.\n:type connectivity_check_request_params: ~azure.mgmt.apimanagement.models.ConnectivityCheckRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:return: ConnectivityCheckResponse, or the result of cls(response)\n:rtype: ~azure.mgmt.apimanagement.models.ConnectivityCheckResponse or None\n:raises: ~azure.core.exceptions.HttpResponseError\n\"\"\"" + }, + "call": "resource_group_name, service_name, connectivity_check_request_params" + }, + "begin_perform_connectivity_check_async" : { + "sync": { + "signature": "def begin_perform_connectivity_check_async(\n self,\n resource_group_name, # type: str\n service_name, # type: str\n connectivity_check_request_params, # type: \"_models.ConnectivityCheckRequest\"\n **kwargs # type: Any\n):\n", + "doc": "\"\"\"Performs a connectivity check between the API Management service and a given destination, and\nreturns metrics for the connection, as well as errors encountered while trying to establish it.\n\n:param resource_group_name: The name of the resource group.\n:type resource_group_name: str\n:param service_name: The name of the API Management service.\n:type service_name: str\n:param connectivity_check_request_params: Connectivity Check request parameters.\n:type connectivity_check_request_params: ~azure.mgmt.apimanagement.models.ConnectivityCheckRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be ARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.PollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of LROPoller that returns either ConnectivityCheckResponse or the result of cls(response)\n:rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ConnectivityCheckResponse]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "async": { + "coroutine": true, + "signature": "async def begin_perform_connectivity_check_async(\n self,\n resource_group_name: str,\n service_name: str,\n connectivity_check_request_params: \"_models.ConnectivityCheckRequest\",\n **kwargs: Any\n) -\u003e AsyncLROPoller[\"_models.ConnectivityCheckResponse\"]:\n", + "doc": "\"\"\"Performs a connectivity check between the API Management service and a given destination, and\nreturns metrics for the connection, as well as errors encountered while trying to establish it.\n\n:param resource_group_name: The name of the resource group.\n:type resource_group_name: str\n:param service_name: The name of the API Management service.\n:type service_name: str\n:param connectivity_check_request_params: Connectivity Check request parameters.\n:type connectivity_check_request_params: ~azure.mgmt.apimanagement.models.ConnectivityCheckRequest\n:keyword callable cls: A custom type or function that will be passed the direct response\n:keyword str continuation_token: A continuation token to restart a poller from a saved state.\n:keyword polling: By default, your polling method will be AsyncARMPolling.\n Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.\n:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod\n:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.\n:return: An instance of AsyncLROPoller that returns either ConnectivityCheckResponse or the result of cls(response)\n:rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ConnectivityCheckResponse]\n:raises ~azure.core.exceptions.HttpResponseError:\n\"\"\"" + }, + "call": "resource_group_name, service_name, connectivity_check_request_params" + } + } + } +} \ No newline at end of file diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_version.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_version.py index 48944bf3938a..eae7c95b6fbd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_version.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "2.0.0" +VERSION = "0.1.0" diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_api_management_client.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_api_management_client.py index 2c72c10479ce..4c211ff43a0a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_api_management_client.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_api_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 @@ -60,6 +61,7 @@ from .operations import NotificationRecipientUserOperations from .operations import NotificationRecipientEmailOperations from .operations import OpenIdConnectProviderOperations +from .operations import OutboundNetworkDependenciesEndpointsOperations from .operations import PolicyOperations from .operations import PolicyDescriptionOperations from .operations import PortalRevisionOperations @@ -88,10 +90,11 @@ from .operations import UserSubscriptionOperations from .operations import UserIdentitiesOperations from .operations import UserConfirmationPasswordOperations +from .operations import ApiManagementClientOperationsMixin from .. import models -class ApiManagementClient(object): +class ApiManagementClient(ApiManagementClientOperationsMixin): """ApiManagement Client. :ivar api: ApiOperations operations @@ -182,6 +185,8 @@ class ApiManagementClient(object): :vartype notification_recipient_email: azure.mgmt.apimanagement.aio.operations.NotificationRecipientEmailOperations :ivar open_id_connect_provider: OpenIdConnectProviderOperations operations :vartype open_id_connect_provider: azure.mgmt.apimanagement.aio.operations.OpenIdConnectProviderOperations + :ivar outbound_network_dependencies_endpoints: OutboundNetworkDependenciesEndpointsOperations operations + :vartype outbound_network_dependencies_endpoints: azure.mgmt.apimanagement.aio.operations.OutboundNetworkDependenciesEndpointsOperations :ivar policy: PolicyOperations operations :vartype policy: azure.mgmt.apimanagement.aio.operations.PolicyOperations :ivar policy_description: PolicyDescriptionOperations operations @@ -351,6 +356,8 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.open_id_connect_provider = OpenIdConnectProviderOperations( self._client, self._config, self._serialize, self._deserialize) + self.outbound_network_dependencies_endpoints = OutboundNetworkDependenciesEndpointsOperations( + self._client, self._config, self._serialize, self._deserialize) self.policy = PolicyOperations( self._client, self._config, self._serialize, self._deserialize) self.policy_description = PolicyDescriptionOperations( @@ -408,6 +415,23 @@ def __init__( self.user_confirmation_password = UserConfirmationPasswordOperations( 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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_configuration.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_configuration.py index 4e5bc34cdd4f..4562df5ab1d1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_configuration.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/_configuration.py @@ -45,7 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.api_version = "2020-12-01" + self.api_version = "2021-04-01-preview" self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-apimanagement/{}'.format(VERSION)) self._configure(**kwargs) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/__init__.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/__init__.py index cd77fa38b0ba..5496279bc3ea 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/__init__.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/__init__.py @@ -50,6 +50,7 @@ from ._notification_recipient_user_operations import NotificationRecipientUserOperations from ._notification_recipient_email_operations import NotificationRecipientEmailOperations from ._open_id_connect_provider_operations import OpenIdConnectProviderOperations +from ._outbound_network_dependencies_endpoints_operations import OutboundNetworkDependenciesEndpointsOperations from ._policy_operations import PolicyOperations from ._policy_description_operations import PolicyDescriptionOperations from ._portal_revision_operations import PortalRevisionOperations @@ -78,6 +79,7 @@ from ._user_subscription_operations import UserSubscriptionOperations from ._user_identities_operations import UserIdentitiesOperations from ._user_confirmation_password_operations import UserConfirmationPasswordOperations +from ._api_management_client_operations import ApiManagementClientOperationsMixin __all__ = [ 'ApiOperations', @@ -124,6 +126,7 @@ 'NotificationRecipientUserOperations', 'NotificationRecipientEmailOperations', 'OpenIdConnectProviderOperations', + 'OutboundNetworkDependenciesEndpointsOperations', 'PolicyOperations', 'PolicyDescriptionOperations', 'PortalRevisionOperations', @@ -152,4 +155,5 @@ 'UserSubscriptionOperations', 'UserIdentitiesOperations', 'UserConfirmationPasswordOperations', + 'ApiManagementClientOperationsMixin', ] diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_diagnostic_operations.py index e40196255d6c..82a99eaaffd7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_diagnostic_operations.py @@ -49,7 +49,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DiagnosticCollection"]: """Lists all diagnostics of an API. @@ -77,7 +77,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -126,7 +126,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) @@ -143,7 +143,7 @@ async def get_entity_tag( service_name: str, api_id: str, diagnostic_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the Diagnostic for an API specified by its identifier. @@ -166,7 +166,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -194,7 +194,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -212,7 +212,7 @@ async def get( service_name: str, api_id: str, diagnostic_id: str, - **kwargs + **kwargs: Any ) -> "_models.DiagnosticContract": """Gets the details of the Diagnostic for an API specified by its identifier. @@ -235,7 +235,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -263,7 +263,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) response_headers = {} @@ -284,7 +284,7 @@ async def create_or_update( diagnostic_id: str, parameters: "_models.DiagnosticContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.DiagnosticContract": """Creates a new Diagnostic for an API or updates an existing one. @@ -312,7 +312,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -347,7 +347,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -373,7 +373,7 @@ async def update( diagnostic_id: str, if_match: str, parameters: "_models.DiagnosticContract", - **kwargs + **kwargs: Any ) -> "_models.DiagnosticContract": """Updates the details of the Diagnostic for an API specified by its identifier. @@ -401,7 +401,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -435,7 +435,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -455,7 +455,7 @@ async def delete( api_id: str, diagnostic_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified Diagnostic from an API. @@ -481,7 +481,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -510,7 +510,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_export_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_export_operations.py index 1a74ef34510e..1a4322b9e6f5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_export_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_export_operations.py @@ -47,7 +47,7 @@ async def get( api_id: str, format: Union[str, "_models.ExportFormat"], export: Union[str, "_models.ExportApi"], - **kwargs + **kwargs: Any ) -> "_models.ApiExportResult": """Gets the details of the API specified by its identifier in the format specified to the Storage Blob with SAS Key valid for 5 minutes. @@ -74,7 +74,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -103,7 +103,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('ApiExportResult', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_attachment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_attachment_operations.py index 702fe4d1db82..b38e1ec84226 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_attachment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_attachment_operations.py @@ -50,7 +50,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.IssueAttachmentCollection"]: """Lists all attachments for the Issue associated with the specified API. @@ -82,7 +82,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -132,7 +132,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) @@ -150,7 +150,7 @@ async def get_entity_tag( api_id: str, issue_id: str, attachment_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the issue Attachment for an API specified by its identifier. @@ -177,7 +177,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -206,7 +206,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -225,7 +225,7 @@ async def get( api_id: str, issue_id: str, attachment_id: str, - **kwargs + **kwargs: Any ) -> "_models.IssueAttachmentContract": """Gets the details of the issue Attachment for an API specified by its identifier. @@ -251,7 +251,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -280,7 +280,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) response_headers = {} @@ -302,7 +302,7 @@ async def create_or_update( attachment_id: str, parameters: "_models.IssueAttachmentContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.IssueAttachmentContract": """Creates a new Attachment for the Issue in an API or updates an existing one. @@ -333,7 +333,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -369,7 +369,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -395,7 +395,7 @@ async def delete( issue_id: str, attachment_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified comment from an Issue. @@ -424,7 +424,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -454,7 +454,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_comment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_comment_operations.py index b0dfd30da6fd..12c96563c68b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_comment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_comment_operations.py @@ -50,7 +50,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.IssueCommentCollection"]: """Lists all comments for the Issue associated with the specified API. @@ -82,7 +82,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -132,7 +132,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) @@ -150,7 +150,7 @@ async def get_entity_tag( api_id: str, issue_id: str, comment_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the issue Comment for an API specified by its identifier. @@ -176,7 +176,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -205,7 +205,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -224,7 +224,7 @@ async def get( api_id: str, issue_id: str, comment_id: str, - **kwargs + **kwargs: Any ) -> "_models.IssueCommentContract": """Gets the details of the issue Comment for an API specified by its identifier. @@ -249,7 +249,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -278,7 +278,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) response_headers = {} @@ -300,7 +300,7 @@ async def create_or_update( comment_id: str, parameters: "_models.IssueCommentContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.IssueCommentContract": """Creates a new Comment for the Issue in an API or updates an existing one. @@ -330,7 +330,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -366,7 +366,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -392,7 +392,7 @@ async def delete( issue_id: str, comment_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified comment from an Issue. @@ -420,7 +420,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -450,7 +450,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_operations.py index 7b51b420602d..66e4a64d46ad 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_issue_operations.py @@ -50,7 +50,7 @@ def list_by_service( expand_comments_attachments: Optional[bool] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.IssueCollection"]: """Lists all issues associated with the specified API. @@ -82,7 +82,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -133,7 +133,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) @@ -150,7 +150,7 @@ async def get_entity_tag( service_name: str, api_id: str, issue_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the Issue for an API specified by its identifier. @@ -173,7 +173,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -201,7 +201,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -220,7 +220,7 @@ async def get( api_id: str, issue_id: str, expand_comments_attachments: Optional[bool] = None, - **kwargs + **kwargs: Any ) -> "_models.IssueContract": """Gets the details of the Issue for an API specified by its identifier. @@ -245,7 +245,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -275,7 +275,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) response_headers = {} @@ -296,7 +296,7 @@ async def create_or_update( issue_id: str, parameters: "_models.IssueContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.IssueContract": """Creates a new Issue for an API or updates an existing one. @@ -324,7 +324,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -359,7 +359,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -385,7 +385,7 @@ async def update( issue_id: str, if_match: str, parameters: "_models.IssueUpdateContract", - **kwargs + **kwargs: Any ) -> "_models.IssueContract": """Updates an existing issue for an API. @@ -413,7 +413,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -447,7 +447,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -467,7 +467,7 @@ async def delete( api_id: str, issue_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified Issue from an API. @@ -493,7 +493,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -522,7 +522,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_client_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_client_operations.py new file mode 100644 index 000000000000..827e172ccafc --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_client_operations.py @@ -0,0 +1,151 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.core.polling import AsyncLROPoller, AsyncNoPolling, AsyncPollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class ApiManagementClientOperationsMixin: + + async def _perform_connectivity_check_async_initial( + self, + resource_group_name: str, + service_name: str, + connectivity_check_request_params: "_models.ConnectivityCheckRequest", + **kwargs: Any + ) -> Optional["_models.ConnectivityCheckResponse"]: + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ConnectivityCheckResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._perform_connectivity_check_async_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connectivity_check_request_params, 'ConnectivityCheckRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectivityCheckResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _perform_connectivity_check_async_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/connectivityCheck'} # type: ignore + + async def begin_perform_connectivity_check_async( + self, + resource_group_name: str, + service_name: str, + connectivity_check_request_params: "_models.ConnectivityCheckRequest", + **kwargs: Any + ) -> AsyncLROPoller["_models.ConnectivityCheckResponse"]: + """Performs a connectivity check between the API Management service and a given destination, and + returns metrics for the connection, as well as errors encountered while trying to establish it. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param connectivity_check_request_params: Connectivity Check request parameters. + :type connectivity_check_request_params: ~azure.mgmt.apimanagement.models.ConnectivityCheckRequest + :keyword callable cls: A custom type or function 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 ConnectivityCheckResponse or the result of cls(response) + :rtype: ~azure.core.polling.AsyncLROPoller[~azure.mgmt.apimanagement.models.ConnectivityCheckResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityCheckResponse"] + 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._perform_connectivity_check_async_initial( + resource_group_name=resource_group_name, + service_name=service_name, + connectivity_check_request_params=connectivity_check_request_params, + 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('ConnectivityCheckResponse', 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'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, 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_perform_connectivity_check_async.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/connectivityCheck'} # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_operations_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_operations_operations.py index d9773dc36d81..57ec72b03380 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_operations_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_operations_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationListResult"]: """Lists all of the available REST API operations of the Microsoft.ApiManagement provider. @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_operations.py index 6cce8a47733e..dea2632cc07d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_operations.py @@ -48,23 +48,23 @@ async def _restore_initial( resource_group_name: str, service_name: str, parameters: "_models.ApiManagementServiceBackupRestoreParameters", - **kwargs + **kwargs: Any ) -> Optional["_models.ApiManagementServiceResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApiManagementServiceResource"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._restore_initial.metadata['url'] # type: ignore path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -86,7 +86,7 @@ async def _restore_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -104,7 +104,7 @@ async def begin_restore( resource_group_name: str, service_name: str, parameters: "_models.ApiManagementServiceBackupRestoreParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ApiManagementServiceResource"]: """Restores a backup of an API Management service created using the ApiManagementService_Backup operation on the current service. This is a long running operation and could take several @@ -114,13 +114,12 @@ async def begin_restore( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param parameters: Parameters supplied to the Restore API Management service from backup - operation. + :param parameters: Parameters supplied to the ApiManagementService_Restore operation. :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a 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 ApiManagementServiceResource or the result of cls(response) @@ -154,9 +153,9 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) @@ -178,23 +177,23 @@ async def _backup_initial( resource_group_name: str, service_name: str, parameters: "_models.ApiManagementServiceBackupRestoreParameters", - **kwargs + **kwargs: Any ) -> Optional["_models.ApiManagementServiceResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApiManagementServiceResource"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._backup_initial.metadata['url'] # type: ignore path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -216,7 +215,7 @@ async def _backup_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) deserialized = None @@ -234,7 +233,7 @@ async def begin_backup( resource_group_name: str, service_name: str, parameters: "_models.ApiManagementServiceBackupRestoreParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ApiManagementServiceResource"]: """Creates a backup of the API Management service to the given Azure Storage Account. This is long running operation and could take several minutes to complete. @@ -247,8 +246,8 @@ async def begin_backup( :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a 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 ApiManagementServiceResource or the result of cls(response) @@ -282,9 +281,9 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) @@ -306,14 +305,14 @@ async def _create_or_update_initial( resource_group_name: str, service_name: str, parameters: "_models.ApiManagementServiceResource", - **kwargs + **kwargs: Any ) -> Optional["_models.ApiManagementServiceResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApiManagementServiceResource"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -344,7 +343,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) deserialized = None @@ -365,7 +364,7 @@ async def begin_create_or_update( resource_group_name: str, service_name: str, parameters: "_models.ApiManagementServiceResource", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ApiManagementServiceResource"]: """Creates or updates an API Management service. This is long running operation and could take several minutes to complete. @@ -378,8 +377,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a 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 ApiManagementServiceResource or the result of cls(response) @@ -437,14 +436,14 @@ async def _update_initial( resource_group_name: str, service_name: str, parameters: "_models.ApiManagementServiceUpdateParameters", - **kwargs + **kwargs: Any ) -> Optional["_models.ApiManagementServiceResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApiManagementServiceResource"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -475,7 +474,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) deserialized = None @@ -493,7 +492,7 @@ async def begin_update( resource_group_name: str, service_name: str, parameters: "_models.ApiManagementServiceUpdateParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ApiManagementServiceResource"]: """Updates an existing API Management service. @@ -505,8 +504,8 @@ async def begin_update( :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a 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 ApiManagementServiceResource or the result of cls(response) @@ -563,7 +562,7 @@ async def get( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> "_models.ApiManagementServiceResource": """Gets an API Management service resource description. @@ -581,7 +580,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -607,7 +606,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('ApiManagementServiceResource', pipeline_response) @@ -622,14 +621,14 @@ async def _delete_initial( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.ApiManagementServiceResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApiManagementServiceResource"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -655,7 +654,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 @@ -672,7 +671,7 @@ async def begin_delete( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ApiManagementServiceResource"]: """Deletes an existing API Management service. @@ -682,8 +681,8 @@ async def begin_delete( :type service_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) @@ -738,7 +737,7 @@ def get_long_running_output(pipeline_response): def list_by_resource_group( self, resource_group_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ApiManagementServiceListResult"]: """List all API Management services within a resource group. @@ -754,7 +753,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -795,7 +794,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) @@ -808,7 +807,7 @@ async def get_next(next_link=None): def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ApiManagementServiceListResult"]: """Lists all API Management services within an Azure subscription. @@ -822,7 +821,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -862,7 +861,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) @@ -877,7 +876,7 @@ async def get_sso_token( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> "_models.ApiManagementServiceGetSsoTokenResult": """Gets the Single-Sign-On token for the API Management Service which is valid for 5 Minutes. @@ -895,7 +894,7 @@ async def get_sso_token( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -921,7 +920,7 @@ async def get_sso_token( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ApiManagementServiceGetSsoTokenResult', pipeline_response) @@ -935,7 +934,7 @@ async def get_sso_token( async def check_name_availability( self, parameters: "_models.ApiManagementServiceCheckNameAvailabilityParameters", - **kwargs + **kwargs: Any ) -> "_models.ApiManagementServiceNameAvailabilityResult": """Checks availability and correctness of a name for an API Management service. @@ -951,7 +950,7 @@ async def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -980,7 +979,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('ApiManagementServiceNameAvailabilityResult', pipeline_response) @@ -993,7 +992,7 @@ async def check_name_availability( async def get_domain_ownership_identifier( self, - **kwargs + **kwargs: Any ) -> "_models.ApiManagementServiceGetDomainOwnershipIdentifierResult": """Get the custom domain ownership identifier for an API Management service. @@ -1007,7 +1006,7 @@ async def get_domain_ownership_identifier( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -1031,7 +1030,7 @@ async def get_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ApiManagementServiceGetDomainOwnershipIdentifierResult', pipeline_response) @@ -1047,14 +1046,14 @@ async def _apply_network_configuration_updates_initial( resource_group_name: str, service_name: str, parameters: Optional["_models.ApiManagementServiceApplyNetworkConfigurationParameters"] = None, - **kwargs + **kwargs: Any ) -> Optional["_models.ApiManagementServiceResource"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApiManagementServiceResource"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1088,7 +1087,7 @@ async def _apply_network_configuration_updates_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) deserialized = None @@ -1106,7 +1105,7 @@ async def begin_apply_network_configuration_updates( resource_group_name: str, service_name: str, parameters: Optional["_models.ApiManagementServiceApplyNetworkConfigurationParameters"] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ApiManagementServiceResource"]: """Updates the Microsoft.ApiManagement resource running in the Virtual network to pick the updated DNS changes. @@ -1121,8 +1120,8 @@ async def begin_apply_network_configuration_updates( :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceApplyNetworkConfigurationParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a 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 ApiManagementServiceResource or the result of cls(response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_skus_operations.py index c2a282f69554..99996906ceb6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_skus_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_service_skus_operations.py @@ -45,7 +45,7 @@ def list_available_service_skus( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ResourceSkuResults"]: """Gets available SKUs for API Management service. @@ -65,7 +65,7 @@ def list_available_service_skus( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_skus_operations.py index 459e8eb4bd89..b5265df37406 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_skus_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_management_skus_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ApiManagementSkusResult"]: """Gets the list of Microsoft.ApiManagement SKUs available for your Subscription. @@ -57,7 +57,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_operations.py index b235a476e8ce..721a6f9aa1aa 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_operations.py @@ -50,7 +50,7 @@ def list_by_api( top: Optional[int] = None, skip: Optional[int] = None, tags: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationCollection"]: """Lists a collection of the operations for the specified API. @@ -86,7 +86,7 @@ def list_by_api( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -137,7 +137,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) @@ -154,7 +154,7 @@ async def get_entity_tag( service_name: str, api_id: str, operation_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the API operation specified by its identifier. @@ -178,7 +178,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -206,7 +206,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -224,7 +224,7 @@ async def get( service_name: str, api_id: str, operation_id: str, - **kwargs + **kwargs: Any ) -> "_models.OperationContract": """Gets the details of the API Operation specified by its identifier. @@ -248,7 +248,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -276,7 +276,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) response_headers = {} @@ -297,7 +297,7 @@ async def create_or_update( operation_id: str, parameters: "_models.OperationContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.OperationContract": """Creates a new operation in the API or updates an existing one. @@ -326,7 +326,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -361,7 +361,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -387,7 +387,7 @@ async def update( operation_id: str, if_match: str, parameters: "_models.OperationUpdateContract", - **kwargs + **kwargs: Any ) -> "_models.OperationContract": """Updates the details of the operation in the API specified by its identifier. @@ -416,7 +416,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -450,7 +450,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -470,7 +470,7 @@ async def delete( api_id: str, operation_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified operation in the API. @@ -497,7 +497,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -526,7 +526,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_policy_operations.py index e750c83f782d..8a8d793e02de 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operation_policy_operations.py @@ -46,7 +46,7 @@ async def list_by_operation( service_name: str, api_id: str, operation_id: str, - **kwargs + **kwargs: Any ) -> "_models.PolicyCollection": """Get the list of policy configuration at the API Operation level. @@ -70,7 +70,7 @@ async def list_by_operation( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -98,7 +98,7 @@ async def list_by_operation( 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('PolicyCollection', pipeline_response) @@ -116,7 +116,7 @@ async def get_entity_tag( api_id: str, operation_id: str, policy_id: Union[str, "_models.PolicyIdName"], - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the API operation policy specified by its identifier. @@ -142,7 +142,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -171,7 +171,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -191,7 +191,7 @@ async def get( operation_id: str, policy_id: Union[str, "_models.PolicyIdName"], format: Optional[Union[str, "_models.PolicyExportFormat"]] = "xml", - **kwargs + **kwargs: Any ) -> "_models.PolicyContract": """Get the policy configuration at the API Operation level. @@ -219,7 +219,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -250,7 +250,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) response_headers = {} @@ -272,7 +272,7 @@ async def create_or_update( policy_id: Union[str, "_models.PolicyIdName"], parameters: "_models.PolicyContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.PolicyContract": """Creates or updates policy configuration for the API Operation level. @@ -303,7 +303,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -339,7 +339,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -365,7 +365,7 @@ async def delete( operation_id: str, policy_id: Union[str, "_models.PolicyIdName"], if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the policy configuration at the Api Operation. @@ -394,7 +394,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -424,7 +424,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operations.py index f81df506e341..8fc01f0663b6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_operations.py @@ -52,7 +52,7 @@ def list_by_service( skip: Optional[int] = None, tags: Optional[str] = None, expand_api_version_set: Optional[bool] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ApiCollection"]: """Lists all APIs of the API Management service instance. @@ -87,7 +87,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -139,7 +139,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) @@ -155,7 +155,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, api_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the API specified by its identifier. @@ -176,7 +176,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -203,7 +203,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -220,7 +220,7 @@ async def get( resource_group_name: str, service_name: str, api_id: str, - **kwargs + **kwargs: Any ) -> "_models.ApiContract": """Gets the details of the API specified by its identifier. @@ -241,7 +241,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json, application/vnd.swagger.doc+json, application/vnd.oai.openapi+json, application/vnd.sun.wadl+xml, application/wsdl+xml" # Construct URL @@ -268,7 +268,7 @@ async def get( if response.status_code not in [200, 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) response_headers = {} @@ -293,14 +293,14 @@ async def _create_or_update_initial( api_id: str, parameters: "_models.ApiCreateOrUpdateParameter", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> Optional["_models.ApiContract"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ApiContract"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -334,7 +334,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) response_headers = {} @@ -360,7 +360,7 @@ async def begin_create_or_update( api_id: str, parameters: "_models.ApiCreateOrUpdateParameter", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ApiContract"]: """Creates new or updates existing specified API of the API Management service instance. @@ -378,8 +378,8 @@ async def begin_create_or_update( :type if_match: 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 ApiContract or the result of cls(response) @@ -445,7 +445,7 @@ async def update( api_id: str, if_match: str, parameters: "_models.ApiUpdateContract", - **kwargs + **kwargs: Any ) -> "_models.ApiContract": """Updates the specified API of the API Management service instance. @@ -471,7 +471,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -504,7 +504,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -524,7 +524,7 @@ async def delete( api_id: str, if_match: str, delete_revisions: Optional[bool] = None, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified API of the API Management service instance. @@ -550,7 +550,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -580,7 +580,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -596,7 +596,7 @@ def list_by_tags( top: Optional[int] = None, skip: Optional[int] = None, include_not_tagged_apis: Optional[bool] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TagResourceCollection"]: """Lists a collection of apis associated with tags. @@ -630,7 +630,7 @@ def list_by_tags( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -680,7 +680,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_policy_operations.py index 50a82ce68482..69afdab837d4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_policy_operations.py @@ -45,7 +45,7 @@ async def list_by_api( resource_group_name: str, service_name: str, api_id: str, - **kwargs + **kwargs: Any ) -> "_models.PolicyCollection": """Get the policy configuration at the API level. @@ -66,7 +66,7 @@ async def list_by_api( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -93,7 +93,7 @@ async def list_by_api( 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('PolicyCollection', pipeline_response) @@ -110,7 +110,7 @@ async def get_entity_tag( service_name: str, api_id: str, policy_id: Union[str, "_models.PolicyIdName"], - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the API policy specified by its identifier. @@ -133,7 +133,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -161,7 +161,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -180,7 +180,7 @@ async def get( api_id: str, policy_id: Union[str, "_models.PolicyIdName"], format: Optional[Union[str, "_models.PolicyExportFormat"]] = "xml", - **kwargs + **kwargs: Any ) -> "_models.PolicyContract": """Get the policy configuration at the API level. @@ -205,7 +205,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json, application/vnd.ms-azure-apim.policy+xml, application/vnd.ms-azure-apim.policy.raw+xml" # Construct URL @@ -235,7 +235,7 @@ async def get( if response.status_code not in [200, 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) response_headers = {} @@ -261,7 +261,7 @@ async def create_or_update( policy_id: Union[str, "_models.PolicyIdName"], parameters: "_models.PolicyContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.PolicyContract": """Creates or updates policy configuration for the API. @@ -289,7 +289,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -324,7 +324,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -349,7 +349,7 @@ async def delete( api_id: str, policy_id: Union[str, "_models.PolicyIdName"], if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the policy configuration at the Api. @@ -375,7 +375,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -404,7 +404,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_product_operations.py index 6a08af1ce936..ba46be0061f1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_product_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_product_operations.py @@ -49,7 +49,7 @@ def list_by_apis( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ProductCollection"]: """Lists all Products, which the API is part of. @@ -77,7 +77,7 @@ def list_by_apis( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -126,7 +126,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_release_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_release_operations.py index a13634786c3b..347eea90c398 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_release_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_release_operations.py @@ -49,7 +49,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ApiReleaseCollection"]: """Lists all releases of an API. An API release is created when making an API Revision current. Releases are also used to rollback to previous revisions. Results will be paged and can be @@ -79,7 +79,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -128,7 +128,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) @@ -145,7 +145,7 @@ async def get_entity_tag( service_name: str, api_id: str, release_id: str, - **kwargs + **kwargs: Any ) -> bool: """Returns the etag of an API release. @@ -168,7 +168,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -196,7 +196,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -214,7 +214,7 @@ async def get( service_name: str, api_id: str, release_id: str, - **kwargs + **kwargs: Any ) -> "_models.ApiReleaseContract": """Returns the details of an API release. @@ -237,7 +237,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -265,7 +265,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) response_headers = {} @@ -286,7 +286,7 @@ async def create_or_update( release_id: str, parameters: "_models.ApiReleaseContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.ApiReleaseContract": """Creates a new Release for the API. @@ -314,7 +314,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -349,7 +349,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -375,7 +375,7 @@ async def update( release_id: str, if_match: str, parameters: "_models.ApiReleaseContract", - **kwargs + **kwargs: Any ) -> "_models.ApiReleaseContract": """Updates the details of the release of the API specified by its identifier. @@ -403,7 +403,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -437,7 +437,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -457,7 +457,7 @@ async def delete( api_id: str, release_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified release in the API. @@ -483,7 +483,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -512,7 +512,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_revision_operations.py index 01c49026f9b7..4c68dac74936 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_revision_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_revision_operations.py @@ -49,7 +49,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ApiRevisionCollection"]: """Lists all revisions of an API. @@ -77,7 +77,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -126,7 +126,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_schema_operations.py index 2f8e5a8a4bec..1f3e014c98fe 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_schema_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_schema_operations.py @@ -51,7 +51,7 @@ def list_by_api( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SchemaCollection"]: """Get the schema configuration at the API level. @@ -80,7 +80,7 @@ def list_by_api( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -129,7 +129,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) @@ -146,7 +146,7 @@ async def get_entity_tag( service_name: str, api_id: str, schema_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the schema specified by its identifier. @@ -170,7 +170,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -198,7 +198,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -216,7 +216,7 @@ async def get( service_name: str, api_id: str, schema_id: str, - **kwargs + **kwargs: Any ) -> "_models.SchemaContract": """Get the schema configuration at the API level. @@ -240,7 +240,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -268,7 +268,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) response_headers = {} @@ -289,14 +289,14 @@ async def _create_or_update_initial( schema_id: str, parameters: "_models.SchemaContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> Optional["_models.SchemaContract"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.SchemaContract"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -331,7 +331,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) response_headers = {} @@ -358,7 +358,7 @@ async def begin_create_or_update( schema_id: str, parameters: "_models.SchemaContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.SchemaContract"]: """Creates or updates schema configuration for the API. @@ -379,8 +379,8 @@ async def begin_create_or_update( :type if_match: 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 SchemaContract or the result of cls(response) @@ -449,7 +449,7 @@ async def delete( schema_id: str, if_match: str, force: Optional[bool] = None, - **kwargs + **kwargs: Any ) -> None: """Deletes the schema configuration at the Api. @@ -478,7 +478,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -509,7 +509,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tag_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tag_description_operations.py index 567913b6b646..1af2deba32a8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tag_description_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_tag_description_operations.py @@ -49,7 +49,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TagDescriptionCollection"]: """Lists all Tags descriptions in scope of API. Model similar to swagger - tagDescription is defined on API level but tag may be assigned to the Operations. @@ -80,7 +80,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -129,7 +129,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) @@ -146,7 +146,7 @@ async def get_entity_tag( service_name: str, api_id: str, tag_description_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state version of the tag specified by its identifier. @@ -170,7 +170,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -198,7 +198,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -216,7 +216,7 @@ async def get( service_name: str, api_id: str, tag_description_id: str, - **kwargs + **kwargs: Any ) -> "_models.TagDescriptionContract": """Get Tag description in scope of API. @@ -240,7 +240,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -268,7 +268,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) response_headers = {} @@ -289,7 +289,7 @@ async def create_or_update( tag_description_id: str, parameters: "_models.TagDescriptionCreateParameters", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.TagDescriptionContract": """Create/Update tag description in scope of the Api. @@ -318,7 +318,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -353,7 +353,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -378,7 +378,7 @@ async def delete( api_id: str, tag_description_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Delete tag description for the Api. @@ -405,7 +405,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -434,7 +434,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_version_set_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_version_set_operations.py index 3d55ecf63c5a..1b20e0fc041f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_version_set_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_api_version_set_operations.py @@ -48,7 +48,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ApiVersionSetCollection"]: """Lists a collection of API Version Sets in the specified service instance. @@ -73,7 +73,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -121,7 +121,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) @@ -137,7 +137,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, version_set_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the Api Version Set specified by its identifier. @@ -158,7 +158,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -185,7 +185,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -202,7 +202,7 @@ async def get( resource_group_name: str, service_name: str, version_set_id: str, - **kwargs + **kwargs: Any ) -> "_models.ApiVersionSetContract": """Gets the details of the Api Version Set specified by its identifier. @@ -223,7 +223,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -250,7 +250,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) response_headers = {} @@ -270,7 +270,7 @@ async def create_or_update( version_set_id: str, parameters: "_models.ApiVersionSetContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.ApiVersionSetContract": """Creates or Updates a Api Version Set. @@ -296,7 +296,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -330,7 +330,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -355,7 +355,7 @@ async def update( version_set_id: str, if_match: str, parameters: "_models.ApiVersionSetUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.ApiVersionSetContract": """Updates the details of the Api VersionSet specified by its identifier. @@ -381,7 +381,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -414,7 +414,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -433,7 +433,7 @@ async def delete( service_name: str, version_set_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes specific Api Version Set. @@ -457,7 +457,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -485,7 +485,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_server_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_server_operations.py index a9b984a51eb4..155e24103a01 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_server_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_authorization_server_operations.py @@ -48,7 +48,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AuthorizationServerCollection"]: """Lists a collection of authorization servers defined within a service instance. @@ -76,7 +76,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -124,7 +124,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) @@ -140,7 +140,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, authsid: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the authorizationServer specified by its identifier. @@ -160,7 +160,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -187,7 +187,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -204,7 +204,7 @@ async def get( resource_group_name: str, service_name: str, authsid: str, - **kwargs + **kwargs: Any ) -> "_models.AuthorizationServerContract": """Gets the details of the authorization server specified by its identifier. @@ -224,7 +224,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -251,7 +251,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) response_headers = {} @@ -271,7 +271,7 @@ async def create_or_update( authsid: str, parameters: "_models.AuthorizationServerContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.AuthorizationServerContract": """Creates new authorization server or updates an existing authorization server. @@ -296,7 +296,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -330,7 +330,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -355,7 +355,7 @@ async def update( authsid: str, if_match: str, parameters: "_models.AuthorizationServerUpdateContract", - **kwargs + **kwargs: Any ) -> "_models.AuthorizationServerContract": """Updates the details of the authorization server specified by its identifier. @@ -380,7 +380,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -413,7 +413,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -432,7 +432,7 @@ async def delete( service_name: str, authsid: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes specific authorization server instance. @@ -455,7 +455,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -483,7 +483,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -496,7 +496,7 @@ async def list_secrets( resource_group_name: str, service_name: str, authsid: str, - **kwargs + **kwargs: Any ) -> "_models.AuthorizationServerSecretsContract": """Gets the client secret details of the authorization server. @@ -516,7 +516,7 @@ async def list_secrets( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -543,7 +543,7 @@ async def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_backend_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_backend_operations.py index d7f4fcf4186b..74d2e8d5a290 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_backend_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_backend_operations.py @@ -48,7 +48,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.BackendCollection"]: """Lists a collection of backends in the specified service instance. @@ -76,7 +76,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -124,7 +124,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) @@ -140,7 +140,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, backend_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the backend specified by its identifier. @@ -161,7 +161,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -188,7 +188,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -205,7 +205,7 @@ async def get( resource_group_name: str, service_name: str, backend_id: str, - **kwargs + **kwargs: Any ) -> "_models.BackendContract": """Gets the details of the backend specified by its identifier. @@ -226,7 +226,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -253,7 +253,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) response_headers = {} @@ -273,7 +273,7 @@ async def create_or_update( backend_id: str, parameters: "_models.BackendContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.BackendContract": """Creates or Updates a backend. @@ -299,7 +299,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -333,7 +333,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -358,7 +358,7 @@ async def update( backend_id: str, if_match: str, parameters: "_models.BackendUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.BackendContract": """Updates an existing backend. @@ -384,7 +384,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -417,7 +417,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -436,7 +436,7 @@ async def delete( service_name: str, backend_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified backend. @@ -460,7 +460,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -488,7 +488,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -502,7 +502,7 @@ async def reconnect( service_name: str, backend_id: str, parameters: Optional["_models.BackendReconnectContract"] = None, - **kwargs + **kwargs: Any ) -> None: """Notifies the APIM proxy to create a new connection to the backend after the specified timeout. If no timeout was specified, timeout of 2 minutes is used. @@ -526,7 +526,7 @@ async def reconnect( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -561,7 +561,7 @@ async def reconnect( if response.status_code not in [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: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_cache_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_cache_operations.py index ae8a3655bd54..4b5e7611ec06 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_cache_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_cache_operations.py @@ -47,7 +47,7 @@ def list_by_service( service_name: str, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.CacheCollection"]: """Lists a collection of all external Caches in the specified service instance. @@ -69,7 +69,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -115,7 +115,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) @@ -131,7 +131,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, cache_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the Cache specified by its identifier. @@ -152,7 +152,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -179,7 +179,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -196,7 +196,7 @@ async def get( resource_group_name: str, service_name: str, cache_id: str, - **kwargs + **kwargs: Any ) -> "_models.CacheContract": """Gets the details of the Cache specified by its identifier. @@ -217,7 +217,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -244,7 +244,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) response_headers = {} @@ -264,7 +264,7 @@ async def create_or_update( cache_id: str, parameters: "_models.CacheContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.CacheContract": """Creates or updates an External Cache to be used in Api Management instance. @@ -290,7 +290,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -324,7 +324,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -349,7 +349,7 @@ async def update( cache_id: str, if_match: str, parameters: "_models.CacheUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.CacheContract": """Updates the details of the cache specified by its identifier. @@ -375,7 +375,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -408,7 +408,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -427,7 +427,7 @@ async def delete( service_name: str, cache_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes specific Cache. @@ -451,7 +451,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -479,7 +479,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_certificate_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_certificate_operations.py index 6d9067bf4311..9b8b74e079db 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_certificate_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_certificate_operations.py @@ -49,7 +49,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, is_key_vault_refresh_failed: Optional[bool] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.CertificateCollection"]: """Lists a collection of all certificates in the specified service instance. @@ -81,7 +81,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -131,7 +131,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) @@ -147,7 +147,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, certificate_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the certificate specified by its identifier. @@ -168,7 +168,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -195,7 +195,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -212,7 +212,7 @@ async def get( resource_group_name: str, service_name: str, certificate_id: str, - **kwargs + **kwargs: Any ) -> "_models.CertificateContract": """Gets the details of the certificate specified by its identifier. @@ -233,7 +233,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -260,7 +260,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) response_headers = {} @@ -280,7 +280,7 @@ async def create_or_update( certificate_id: str, parameters: "_models.CertificateCreateOrUpdateParameters", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.CertificateContract": """Creates or updates the certificate being used for authentication with the backend. @@ -306,7 +306,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -340,7 +340,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -364,7 +364,7 @@ async def delete( service_name: str, certificate_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes specific certificate. @@ -388,7 +388,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -416,7 +416,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -429,7 +429,7 @@ async def refresh_secret( resource_group_name: str, service_name: str, certificate_id: str, - **kwargs + **kwargs: Any ) -> "_models.CertificateContract": """From KeyVault, Refresh the certificate being used for authentication with the backend. @@ -450,7 +450,7 @@ async def refresh_secret( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -477,7 +477,7 @@ async def refresh_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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_item_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_item_operations.py index cf3fb3ff7dcd..c035254c7820 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_item_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_item_operations.py @@ -46,9 +46,9 @@ def list_by_service( resource_group_name: str, service_name: str, content_type_id: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ContentItemCollection"]: - """Returns list of content items. + """Lists developer portal's content items specified by the provided content type. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -66,7 +66,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -109,7 +109,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) @@ -126,9 +126,10 @@ async def get_entity_tag( service_name: str, content_type_id: str, content_item_id: str, - **kwargs + **kwargs: Any ) -> bool: - """Returns content item metadata. + """Returns the entity state (ETag) version of the developer portal's content item specified by its + identifier. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -148,7 +149,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -176,7 +177,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -194,9 +195,9 @@ async def get( service_name: str, content_type_id: str, content_item_id: str, - **kwargs + **kwargs: Any ) -> "_models.ContentItemContract": - """Returns content item details. + """Returns the developer portal's content item specified by its identifier. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -216,7 +217,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -244,7 +245,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) response_headers = {} @@ -264,9 +265,9 @@ async def create_or_update( content_type_id: str, content_item_id: str, if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.ContentItemContract": - """Creates new content item. + """Creates a new developer portal's content item specified by the provided content type. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -289,7 +290,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -319,7 +320,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -344,9 +345,9 @@ async def delete( content_type_id: str, content_item_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: - """Removes specified content item. + """Removes the specified developer portal's content item. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -369,7 +370,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -398,7 +399,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_type_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_type_operations.py index 0c849ee78763..c5e01f123574 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_type_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_content_type_operations.py @@ -45,9 +45,10 @@ def list_by_service( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ContentTypeCollection"]: - """Returns list of content types. + """Lists the developer portal's content types. Content types describe content items' properties, + validation rules, and constraints. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -63,7 +64,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -105,7 +106,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) @@ -121,9 +122,10 @@ async def get( resource_group_name: str, service_name: str, content_type_id: str, - **kwargs + **kwargs: Any ) -> "_models.ContentTypeContract": - """Gets API Management content type details. + """Gets the details of the developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -141,7 +143,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -168,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -187,9 +189,11 @@ async def create_or_update( service_name: str, content_type_id: str, if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.ContentTypeContract": - """Creates or updates an Content Type. + """Creates or updates the developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. Custom content types' identifiers need to start + with the ``c-`` prefix. Built-in content types can't be modified. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -210,7 +214,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -239,7 +243,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -263,9 +267,11 @@ async def delete( service_name: str, content_type_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: - """Removes specified content type. + """Removes the specified developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. Built-in content types (with identifiers + starting with the ``c-`` prefix) can't be removed. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -286,7 +292,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -314,7 +320,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_delegation_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_delegation_settings_operations.py index 8e03e2ca1655..a9f214032f15 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_delegation_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_delegation_settings_operations.py @@ -44,7 +44,7 @@ async def get_entity_tag( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the DelegationSettings. @@ -62,7 +62,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -88,7 +88,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -104,7 +104,7 @@ async def get( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> "_models.PortalDelegationSettings": """Get Delegation Settings for the Portal. @@ -122,7 +122,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -148,7 +148,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) response_headers = {} @@ -167,7 +167,7 @@ async def update( service_name: str, if_match: str, parameters: "_models.PortalDelegationSettings", - **kwargs + **kwargs: Any ) -> None: """Update Delegation settings. @@ -190,7 +190,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -222,7 +222,7 @@ async def update( if response.status_code not in [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: @@ -236,7 +236,7 @@ async def create_or_update( service_name: str, parameters: "_models.PortalDelegationSettings", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.PortalDelegationSettings": """Create or Update Delegation settings. @@ -259,7 +259,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -292,7 +292,7 @@ async def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PortalDelegationSettings', pipeline_response) @@ -307,7 +307,7 @@ async def list_secrets( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> "_models.PortalSettingValidationKeyContract": """Gets the secret validation key of the DelegationSettings. @@ -325,7 +325,7 @@ async def list_secrets( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -351,7 +351,7 @@ async def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PortalSettingValidationKeyContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_deleted_services_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_deleted_services_operations.py index c80e4e8b4321..fea0a196793a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_deleted_services_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_deleted_services_operations.py @@ -45,7 +45,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list_by_subscription( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DeletedServicesCollection"]: """Lists all soft-deleted services available for undelete for the given subscription. @@ -59,7 +59,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -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) @@ -114,7 +114,7 @@ async def get_by_name( self, service_name: str, location: str, - **kwargs + **kwargs: Any ) -> "_models.DeletedServiceContract": """Get soft-deleted Api Management Service by name. @@ -132,7 +132,7 @@ async def get_by_name( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -158,7 +158,7 @@ async def get_by_name( 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('DeletedServiceContract', pipeline_response) @@ -173,14 +173,14 @@ async def _purge_initial( self, service_name: str, location: str, - **kwargs + **kwargs: Any ) -> Optional["_models.DeletedServiceContract"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.DeletedServiceContract"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -206,7 +206,7 @@ async def _purge_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 @@ -223,7 +223,7 @@ async def begin_purge( self, service_name: str, location: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.DeletedServiceContract"]: """Purges Api Management Service (deletes it with no option to undelete). @@ -233,8 +233,8 @@ async def begin_purge( :type location: 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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_diagnostic_operations.py index 4a221d236564..530f21bbc0d1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_diagnostic_operations.py @@ -48,7 +48,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DiagnosticCollection"]: """Lists all diagnostics of the API Management service instance. @@ -74,7 +74,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -122,7 +122,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) @@ -138,7 +138,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, diagnostic_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the Diagnostic specified by its identifier. @@ -159,7 +159,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -186,7 +186,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -203,7 +203,7 @@ async def get( resource_group_name: str, service_name: str, diagnostic_id: str, - **kwargs + **kwargs: Any ) -> "_models.DiagnosticContract": """Gets the details of the Diagnostic specified by its identifier. @@ -224,7 +224,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -251,7 +251,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) response_headers = {} @@ -271,7 +271,7 @@ async def create_or_update( diagnostic_id: str, parameters: "_models.DiagnosticContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.DiagnosticContract": """Creates a new Diagnostic or updates an existing one. @@ -297,7 +297,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -331,7 +331,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -356,7 +356,7 @@ async def update( diagnostic_id: str, if_match: str, parameters: "_models.DiagnosticContract", - **kwargs + **kwargs: Any ) -> "_models.DiagnosticContract": """Updates the details of the Diagnostic specified by its identifier. @@ -382,7 +382,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -415,7 +415,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -434,7 +434,7 @@ async def delete( service_name: str, diagnostic_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified Diagnostic. @@ -458,7 +458,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -486,7 +486,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_email_template_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_email_template_operations.py index 42c289ef5eee..986b1c6c7fb1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_email_template_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_email_template_operations.py @@ -48,7 +48,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.EmailTemplateCollection"]: """Gets all email templates. @@ -74,7 +74,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -122,7 +122,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) @@ -138,7 +138,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, template_name: Union[str, "_models.TemplateName"], - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the email template specified by its identifier. @@ -158,7 +158,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -185,7 +185,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -202,7 +202,7 @@ async def get( resource_group_name: str, service_name: str, template_name: Union[str, "_models.TemplateName"], - **kwargs + **kwargs: Any ) -> "_models.EmailTemplateContract": """Gets the details of the email template specified by its identifier. @@ -222,7 +222,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -249,7 +249,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) response_headers = {} @@ -269,7 +269,7 @@ async def create_or_update( template_name: Union[str, "_models.TemplateName"], parameters: "_models.EmailTemplateUpdateParameters", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.EmailTemplateContract": """Updates an Email Template. @@ -294,7 +294,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -328,7 +328,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -350,7 +350,7 @@ async def update( template_name: Union[str, "_models.TemplateName"], if_match: str, parameters: "_models.EmailTemplateUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.EmailTemplateContract": """Updates API Management email template. @@ -375,7 +375,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -408,7 +408,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -427,7 +427,7 @@ async def delete( service_name: str, template_name: Union[str, "_models.TemplateName"], if_match: str, - **kwargs + **kwargs: Any ) -> None: """Reset the Email Template to default template provided by the API Management service instance. @@ -450,7 +450,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -478,7 +478,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_api_operations.py index 2341c514a214..ee27ce53392b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_api_operations.py @@ -49,7 +49,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ApiCollection"]: """Lists a collection of the APIs associated with a gateway. @@ -78,7 +78,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -127,7 +127,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) @@ -144,7 +144,7 @@ async def get_entity_tag( service_name: str, gateway_id: str, api_id: str, - **kwargs + **kwargs: Any ) -> bool: """Checks that API entity specified by identifier is associated with the Gateway entity. @@ -167,7 +167,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -195,7 +195,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -214,7 +214,7 @@ async def create_or_update( gateway_id: str, api_id: str, parameters: Optional["_models.AssociationContract"] = None, - **kwargs + **kwargs: Any ) -> "_models.ApiContract": """Adds an API to the specified Gateway. @@ -239,7 +239,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -275,7 +275,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -296,7 +296,7 @@ async def delete( service_name: str, gateway_id: str, api_id: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified API from the specified Gateway. @@ -319,7 +319,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -347,7 +347,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_certificate_authority_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_certificate_authority_operations.py index f92f45befdeb..20e5e878a312 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_certificate_authority_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_certificate_authority_operations.py @@ -49,7 +49,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.GatewayCertificateAuthorityCollection"]: """Lists the collection of Certificate Authorities for the specified Gateway entity. @@ -78,7 +78,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -127,7 +127,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) @@ -144,7 +144,7 @@ async def get_entity_tag( service_name: str, gateway_id: str, certificate_id: str, - **kwargs + **kwargs: Any ) -> bool: """Checks if Certificate entity is assigned to Gateway entity as Certificate Authority. @@ -168,7 +168,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -196,7 +196,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -214,7 +214,7 @@ async def get( service_name: str, gateway_id: str, certificate_id: str, - **kwargs + **kwargs: Any ) -> "_models.GatewayCertificateAuthorityContract": """Get assigned Gateway Certificate Authority details. @@ -238,7 +238,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -266,7 +266,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) response_headers = {} @@ -287,7 +287,7 @@ async def create_or_update( certificate_id: str, parameters: "_models.GatewayCertificateAuthorityContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.GatewayCertificateAuthorityContract": """Assign Certificate entity to Gateway entity as Certificate Authority. @@ -316,7 +316,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -351,7 +351,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -376,7 +376,7 @@ async def delete( gateway_id: str, certificate_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Remove relationship between Certificate Authority and Gateway entity. @@ -403,7 +403,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -432,7 +432,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_hostname_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_hostname_configuration_operations.py index cf819260d17b..f351342ea113 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_hostname_configuration_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_hostname_configuration_operations.py @@ -49,7 +49,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.GatewayHostnameConfigurationCollection"]: """Lists the collection of hostname configurations for the specified gateway. @@ -79,7 +79,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -128,7 +128,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) @@ -145,7 +145,7 @@ async def get_entity_tag( service_name: str, gateway_id: str, hc_id: str, - **kwargs + **kwargs: Any ) -> bool: """Checks that hostname configuration entity specified by identifier exists for specified Gateway entity. @@ -170,7 +170,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -198,7 +198,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -216,7 +216,7 @@ async def get( service_name: str, gateway_id: str, hc_id: str, - **kwargs + **kwargs: Any ) -> "_models.GatewayHostnameConfigurationContract": """Get details of a hostname configuration. @@ -240,7 +240,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -268,7 +268,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) response_headers = {} @@ -289,7 +289,7 @@ async def create_or_update( hc_id: str, parameters: "_models.GatewayHostnameConfigurationContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.GatewayHostnameConfigurationContract": """Creates of updates hostname configuration for a Gateway. @@ -318,7 +318,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -353,7 +353,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -378,7 +378,7 @@ async def delete( gateway_id: str, hc_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified hostname configuration from the specified Gateway. @@ -405,7 +405,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -434,7 +434,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_operations.py index 66b76a4a8c71..fd04ec80fcff 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_gateway_operations.py @@ -48,7 +48,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.GatewayCollection"]: """Lists a collection of gateways registered with service instance. @@ -77,7 +77,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -125,7 +125,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) @@ -141,7 +141,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, gateway_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the Gateway specified by its identifier. @@ -162,7 +162,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -189,7 +189,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -206,7 +206,7 @@ async def get( resource_group_name: str, service_name: str, gateway_id: str, - **kwargs + **kwargs: Any ) -> "_models.GatewayContract": """Gets the details of the Gateway specified by its identifier. @@ -227,7 +227,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -254,7 +254,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) response_headers = {} @@ -274,7 +274,7 @@ async def create_or_update( gateway_id: str, parameters: "_models.GatewayContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.GatewayContract": """Creates or updates a Gateway to be used in Api Management instance. @@ -300,7 +300,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -334,7 +334,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -359,7 +359,7 @@ async def update( gateway_id: str, if_match: str, parameters: "_models.GatewayContract", - **kwargs + **kwargs: Any ) -> "_models.GatewayContract": """Updates the details of the gateway specified by its identifier. @@ -385,7 +385,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -418,7 +418,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -437,7 +437,7 @@ async def delete( service_name: str, gateway_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes specific Gateway. @@ -461,7 +461,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -489,7 +489,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -502,7 +502,7 @@ async def list_keys( resource_group_name: str, service_name: str, gateway_id: str, - **kwargs + **kwargs: Any ) -> "_models.GatewayKeysContract": """Retrieves gateway keys. @@ -523,7 +523,7 @@ async def list_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -550,7 +550,7 @@ async def list_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -569,7 +569,7 @@ async def regenerate_key( service_name: str, gateway_id: str, parameters: "_models.GatewayKeyRegenerationRequestContract", - **kwargs + **kwargs: Any ) -> None: """Regenerates specified gateway key invalidating any tokens created with it. @@ -592,7 +592,7 @@ async def regenerate_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -624,7 +624,7 @@ async def regenerate_key( if response.status_code not in [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: @@ -638,7 +638,7 @@ async def generate_token( service_name: str, gateway_id: str, parameters: "_models.GatewayTokenRequestContract", - **kwargs + **kwargs: Any ) -> "_models.GatewayTokenContract": """Gets the Shared Access Authorization Token for the gateway. @@ -661,7 +661,7 @@ async def generate_token( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -693,7 +693,7 @@ async def generate_token( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('GatewayTokenContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_operations.py index ca825a3aec40..2bca9dd7cbcb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_operations.py @@ -48,7 +48,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.GroupCollection"]: """Lists a collection of groups defined within a service instance. @@ -77,7 +77,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -125,7 +125,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) @@ -141,7 +141,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, group_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the group specified by its identifier. @@ -162,7 +162,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -189,7 +189,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -206,7 +206,7 @@ async def get( resource_group_name: str, service_name: str, group_id: str, - **kwargs + **kwargs: Any ) -> "_models.GroupContract": """Gets the details of the group specified by its identifier. @@ -227,7 +227,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -254,7 +254,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) response_headers = {} @@ -274,7 +274,7 @@ async def create_or_update( group_id: str, parameters: "_models.GroupCreateParameters", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.GroupContract": """Creates or Updates a group. @@ -300,7 +300,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -334,7 +334,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -359,7 +359,7 @@ async def update( group_id: str, if_match: str, parameters: "_models.GroupUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.GroupContract": """Updates the details of the group specified by its identifier. @@ -385,7 +385,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -418,7 +418,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -437,7 +437,7 @@ async def delete( service_name: str, group_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes specific group of the API Management service instance. @@ -461,7 +461,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -489,7 +489,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_user_operations.py index e75d0e7b776f..4384812f7c38 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_group_user_operations.py @@ -49,7 +49,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.UserCollection"]: """Lists a collection of user entities associated with the group. @@ -83,7 +83,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -132,7 +132,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) @@ -149,7 +149,7 @@ async def check_entity_exists( service_name: str, group_id: str, user_id: str, - **kwargs + **kwargs: Any ) -> bool: """Checks that user entity specified by identifier is associated with the group entity. @@ -172,7 +172,7 @@ async def check_entity_exists( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -200,7 +200,7 @@ async def check_entity_exists( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -215,7 +215,7 @@ async def create( service_name: str, group_id: str, user_id: str, - **kwargs + **kwargs: Any ) -> "_models.UserContract": """Add existing user to existing group. @@ -238,7 +238,7 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -266,7 +266,7 @@ async def create( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_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: @@ -287,7 +287,7 @@ async def delete( service_name: str, group_id: str, user_id: str, - **kwargs + **kwargs: Any ) -> None: """Remove existing user from existing group. @@ -310,7 +310,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -338,7 +338,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_identity_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_identity_provider_operations.py index b095e3e6cc9f..e5a8a07613b6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_identity_provider_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_identity_provider_operations.py @@ -45,7 +45,7 @@ def list_by_service( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.IdentityProviderList"]: """Lists a collection of Identity Provider configured in the specified service instance. @@ -63,7 +63,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -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.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) @@ -121,7 +121,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, identity_provider_name: Union[str, "_models.IdentityProviderType"], - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the identityProvider specified by its identifier. @@ -141,7 +141,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -168,7 +168,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -185,7 +185,7 @@ async def get( resource_group_name: str, service_name: str, identity_provider_name: Union[str, "_models.IdentityProviderType"], - **kwargs + **kwargs: Any ) -> "_models.IdentityProviderContract": """Gets the configuration details of the identity Provider configured in specified service instance. @@ -206,7 +206,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -233,7 +233,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -253,7 +253,7 @@ async def create_or_update( identity_provider_name: Union[str, "_models.IdentityProviderType"], parameters: "_models.IdentityProviderCreateContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.IdentityProviderContract": """Creates or Updates the IdentityProvider configuration. @@ -278,7 +278,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -312,7 +312,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -337,7 +337,7 @@ async def update( identity_provider_name: Union[str, "_models.IdentityProviderType"], if_match: str, parameters: "_models.IdentityProviderUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.IdentityProviderContract": """Updates an existing IdentityProvider configuration. @@ -362,7 +362,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -395,7 +395,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -414,7 +414,7 @@ async def delete( service_name: str, identity_provider_name: Union[str, "_models.IdentityProviderType"], if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified identity provider configuration. @@ -437,7 +437,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -465,7 +465,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -478,7 +478,7 @@ async def list_secrets( resource_group_name: str, service_name: str, identity_provider_name: Union[str, "_models.IdentityProviderType"], - **kwargs + **kwargs: Any ) -> "_models.ClientSecretContract": """Gets the client secret details of the Identity Provider. @@ -498,7 +498,7 @@ async def list_secrets( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -525,7 +525,7 @@ async def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_issue_operations.py index 635e3df06369..9eb6c7cdb5bd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_issue_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_issue_operations.py @@ -48,7 +48,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.IssueCollection"]: """Lists a collection of issues in the specified service instance. @@ -79,7 +79,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -127,7 +127,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) @@ -143,7 +143,7 @@ async def get( resource_group_name: str, service_name: str, issue_id: str, - **kwargs + **kwargs: Any ) -> "_models.IssueContract": """Gets API Management issue details. @@ -164,7 +164,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -191,7 +191,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) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_logger_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_logger_operations.py index 3faae87de128..e642f831cf4a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_logger_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_logger_operations.py @@ -48,7 +48,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.LoggerCollection"]: """Lists a collection of loggers in the specified service instance. @@ -77,7 +77,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -125,7 +125,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) @@ -141,7 +141,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, logger_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the logger specified by its identifier. @@ -161,7 +161,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -188,7 +188,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -205,7 +205,7 @@ async def get( resource_group_name: str, service_name: str, logger_id: str, - **kwargs + **kwargs: Any ) -> "_models.LoggerContract": """Gets the details of the logger specified by its identifier. @@ -225,7 +225,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -252,7 +252,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) response_headers = {} @@ -272,7 +272,7 @@ async def create_or_update( logger_id: str, parameters: "_models.LoggerContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.LoggerContract": """Creates or Updates a logger. @@ -297,7 +297,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -331,7 +331,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -356,7 +356,7 @@ async def update( logger_id: str, if_match: str, parameters: "_models.LoggerUpdateContract", - **kwargs + **kwargs: Any ) -> "_models.LoggerContract": """Updates an existing logger. @@ -381,7 +381,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -414,7 +414,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -433,7 +433,7 @@ async def delete( service_name: str, logger_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified logger. @@ -456,7 +456,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -484,7 +484,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_named_value_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_named_value_operations.py index 0b07aeb0030a..2a20967b7043 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_named_value_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_named_value_operations.py @@ -51,7 +51,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, is_key_vault_refresh_failed: Optional[bool] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.NamedValueCollection"]: """Lists a collection of named values defined within a service instance. @@ -82,7 +82,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -132,7 +132,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) @@ -148,7 +148,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, named_value_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the named value specified by its identifier. @@ -168,7 +168,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -195,7 +195,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -212,7 +212,7 @@ async def get( resource_group_name: str, service_name: str, named_value_id: str, - **kwargs + **kwargs: Any ) -> "_models.NamedValueContract": """Gets the details of the named value specified by its identifier. @@ -232,7 +232,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -259,7 +259,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) response_headers = {} @@ -279,14 +279,14 @@ async def _create_or_update_initial( named_value_id: str, parameters: "_models.NamedValueCreateContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> Optional["_models.NamedValueContract"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NamedValueContract"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -320,7 +320,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) response_headers = {} @@ -346,7 +346,7 @@ async def begin_create_or_update( named_value_id: str, parameters: "_models.NamedValueCreateContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.NamedValueContract"]: """Creates or updates named value. @@ -363,8 +363,8 @@ async def begin_create_or_update( :type if_match: 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 NamedValueContract or the result of cls(response) @@ -430,14 +430,14 @@ async def _update_initial( named_value_id: str, if_match: str, parameters: "_models.NamedValueUpdateParameters", - **kwargs + **kwargs: Any ) -> Optional["_models.NamedValueContract"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NamedValueContract"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -470,7 +470,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) response_headers = {} @@ -492,7 +492,7 @@ async def begin_update( named_value_id: str, if_match: str, parameters: "_models.NamedValueUpdateParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.NamedValueContract"]: """Updates the specific named value. @@ -509,8 +509,8 @@ async def begin_update( :type parameters: ~azure.mgmt.apimanagement.models.NamedValueUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a 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 NamedValueContract or the result of cls(response) @@ -575,7 +575,7 @@ async def delete( service_name: str, named_value_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes specific named value from the API Management service instance. @@ -598,7 +598,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -626,7 +626,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -639,7 +639,7 @@ async def list_value( resource_group_name: str, service_name: str, named_value_id: str, - **kwargs + **kwargs: Any ) -> "_models.NamedValueSecretContract": """Gets the secret of the named value specified by its identifier. @@ -659,7 +659,7 @@ async def list_value( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -686,7 +686,7 @@ async def list_value( 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) response_headers = {} @@ -704,14 +704,14 @@ async def _refresh_secret_initial( resource_group_name: str, service_name: str, named_value_id: str, - **kwargs + **kwargs: Any ) -> Optional["_models.NamedValueContract"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NamedValueContract"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -738,7 +738,7 @@ async def _refresh_secret_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) response_headers = {} @@ -758,7 +758,7 @@ async def begin_refresh_secret( resource_group_name: str, service_name: str, named_value_id: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.NamedValueContract"]: """Refresh the secret of the named value specified by its identifier. @@ -770,8 +770,8 @@ async def begin_refresh_secret( :type named_value_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: 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 NamedValueContract or the result of cls(response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_network_status_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_network_status_operations.py index 4c2d11b73419..8c0e5436060a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_network_status_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_network_status_operations.py @@ -44,7 +44,7 @@ async def list_by_service( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> List["_models.NetworkStatusContractByLocation"]: """Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the @@ -64,7 +64,7 @@ async def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -90,7 +90,7 @@ async def list_by_service( 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('[NetworkStatusContractByLocation]', pipeline_response) @@ -106,7 +106,7 @@ async def list_by_location( resource_group_name: str, service_name: str, location_name: str, - **kwargs + **kwargs: Any ) -> "_models.NetworkStatusContract": """Gets the Connectivity Status to the external resources on which the Api Management service depends from inside the Cloud Service. This also returns the DNS Servers as visible to the @@ -129,7 +129,7 @@ async def list_by_location( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -156,7 +156,7 @@ async def list_by_location( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('NetworkStatusContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_operations.py index 078625bf3251..eda68cccffc2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_operations.py @@ -47,7 +47,7 @@ def list_by_service( service_name: str, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.NotificationCollection"]: """Lists a collection of properties defined within a service instance. @@ -69,7 +69,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -115,7 +115,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) @@ -131,7 +131,7 @@ async def get( resource_group_name: str, service_name: str, notification_name: Union[str, "_models.NotificationName"], - **kwargs + **kwargs: Any ) -> "_models.NotificationContract": """Gets the details of the Notification specified by its identifier. @@ -151,7 +151,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -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('NotificationContract', pipeline_response) @@ -195,7 +195,7 @@ async def create_or_update( service_name: str, notification_name: Union[str, "_models.NotificationName"], if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.NotificationContract": """Create or Update API Management publisher notification. @@ -218,7 +218,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -247,7 +247,7 @@ async def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('NotificationContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_email_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_email_operations.py index 9d21d80103b8..e3ff42d46b73 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_email_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_email_operations.py @@ -45,7 +45,7 @@ async def list_by_notification( resource_group_name: str, service_name: str, notification_name: Union[str, "_models.NotificationName"], - **kwargs + **kwargs: Any ) -> "_models.RecipientEmailCollection": """Gets the list of the Notification Recipient Emails subscribed to a notification. @@ -65,7 +65,7 @@ async def list_by_notification( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -92,7 +92,7 @@ async def list_by_notification( 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('RecipientEmailCollection', pipeline_response) @@ -109,7 +109,7 @@ async def check_entity_exists( service_name: str, notification_name: Union[str, "_models.NotificationName"], email: str, - **kwargs + **kwargs: Any ) -> bool: """Determine if Notification Recipient Email subscribed to the notification. @@ -131,7 +131,7 @@ async def check_entity_exists( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -159,7 +159,7 @@ async def check_entity_exists( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -174,7 +174,7 @@ async def create_or_update( service_name: str, notification_name: Union[str, "_models.NotificationName"], email: str, - **kwargs + **kwargs: Any ) -> "_models.RecipientEmailContract": """Adds the Email address to the list of Recipients for the Notification. @@ -196,7 +196,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -224,7 +224,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -245,7 +245,7 @@ async def delete( service_name: str, notification_name: Union[str, "_models.NotificationName"], email: str, - **kwargs + **kwargs: Any ) -> None: """Removes the email from the list of Notification. @@ -267,7 +267,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -295,7 +295,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_user_operations.py index 818f8b344ac1..5e594a0fc7b3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_notification_recipient_user_operations.py @@ -45,7 +45,7 @@ async def list_by_notification( resource_group_name: str, service_name: str, notification_name: Union[str, "_models.NotificationName"], - **kwargs + **kwargs: Any ) -> "_models.RecipientUserCollection": """Gets the list of the Notification Recipient User subscribed to the notification. @@ -65,7 +65,7 @@ async def list_by_notification( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -92,7 +92,7 @@ async def list_by_notification( 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('RecipientUserCollection', pipeline_response) @@ -109,7 +109,7 @@ async def check_entity_exists( service_name: str, notification_name: Union[str, "_models.NotificationName"], user_id: str, - **kwargs + **kwargs: Any ) -> bool: """Determine if the Notification Recipient User is subscribed to the notification. @@ -131,7 +131,7 @@ async def check_entity_exists( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -159,7 +159,7 @@ async def check_entity_exists( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -174,7 +174,7 @@ async def create_or_update( service_name: str, notification_name: Union[str, "_models.NotificationName"], user_id: str, - **kwargs + **kwargs: Any ) -> "_models.RecipientUserContract": """Adds the API Management User to the list of Recipients for the Notification. @@ -196,7 +196,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -224,7 +224,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -245,7 +245,7 @@ async def delete( service_name: str, notification_name: Union[str, "_models.NotificationName"], user_id: str, - **kwargs + **kwargs: Any ) -> None: """Removes the API Management user from the list of Notification. @@ -267,7 +267,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -295,7 +295,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_open_id_connect_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_open_id_connect_provider_operations.py index e6b251bb2eef..3f66850092a4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_open_id_connect_provider_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_open_id_connect_provider_operations.py @@ -48,7 +48,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OpenIdConnectProviderCollection"]: """Lists of all the OpenId Connect Providers. @@ -76,7 +76,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -124,7 +124,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) @@ -140,7 +140,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, opid: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the openIdConnectProvider specified by its identifier. @@ -160,7 +160,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -187,7 +187,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -204,7 +204,7 @@ async def get( resource_group_name: str, service_name: str, opid: str, - **kwargs + **kwargs: Any ) -> "_models.OpenidConnectProviderContract": """Gets specific OpenID Connect Provider without secrets. @@ -224,7 +224,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -251,7 +251,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) response_headers = {} @@ -271,7 +271,7 @@ async def create_or_update( opid: str, parameters: "_models.OpenidConnectProviderContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.OpenidConnectProviderContract": """Creates or updates the OpenID Connect Provider. @@ -296,7 +296,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -330,7 +330,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -355,7 +355,7 @@ async def update( opid: str, if_match: str, parameters: "_models.OpenidConnectProviderUpdateContract", - **kwargs + **kwargs: Any ) -> "_models.OpenidConnectProviderContract": """Updates the specific OpenID Connect Provider. @@ -380,7 +380,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -413,7 +413,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -432,7 +432,7 @@ async def delete( service_name: str, opid: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes specific OpenID Connect Provider of the API Management service instance. @@ -455,7 +455,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -483,7 +483,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -496,7 +496,7 @@ async def list_secrets( resource_group_name: str, service_name: str, opid: str, - **kwargs + **kwargs: Any ) -> "_models.ClientSecretContract": """Gets the client secret details of the OpenID Connect Provider. @@ -516,7 +516,7 @@ async def list_secrets( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -543,7 +543,7 @@ async def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_operations.py index ecda8df1cd66..b500677196eb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_operation_operations.py @@ -50,7 +50,7 @@ def list_by_tags( top: Optional[int] = None, skip: Optional[int] = None, include_not_tagged_operations: Optional[bool] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TagResourceCollection"]: """Lists a collection of operations associated with tags. @@ -87,7 +87,7 @@ def list_by_tags( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -138,7 +138,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_outbound_network_dependencies_endpoints_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_outbound_network_dependencies_endpoints_operations.py new file mode 100644 index 000000000000..cf69ca85e7e9 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_outbound_network_dependencies_endpoints_operations.py @@ -0,0 +1,100 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class OutboundNetworkDependenciesEndpointsOperations: + """OutboundNetworkDependenciesEndpointsOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.apimanagement.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def list_by_service( + self, + resource_group_name: str, + service_name: str, + **kwargs: Any + ) -> "_models.OutboundEnvironmentEndpointList": + """Gets the network endpoints of all outbound dependencies of a ApiManagement service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OutboundEnvironmentEndpointList, or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.OutboundEnvironmentEndpointList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01-preview" + accept = "application/json" + + # Construct URL + url = self.list_by_service.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OutboundEnvironmentEndpointList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/outboundNetworkDependenciesEndpoints'} # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_description_operations.py index 446375360fc8..196a639fb1b3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_description_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_description_operations.py @@ -45,7 +45,7 @@ async def list_by_service( resource_group_name: str, service_name: str, scope: Optional[Union[str, "_models.PolicyScopeContract"]] = None, - **kwargs + **kwargs: Any ) -> "_models.PolicyDescriptionCollection": """Lists all policy descriptions. @@ -65,7 +65,7 @@ async def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -93,7 +93,7 @@ async def list_by_service( 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('PolicyDescriptionCollection', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_operations.py index a42de63fc47c..5546d6fc6267 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_operations.py @@ -44,7 +44,7 @@ async def list_by_service( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> "_models.PolicyCollection": """Lists all the Global Policy definitions of the Api Management service. @@ -62,7 +62,7 @@ async def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -88,7 +88,7 @@ async def list_by_service( 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('PolicyCollection', pipeline_response) @@ -104,7 +104,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, policy_id: Union[str, "_models.PolicyIdName"], - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the Global policy definition in the Api Management service. @@ -125,7 +125,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -152,7 +152,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -170,7 +170,7 @@ async def get( service_name: str, policy_id: Union[str, "_models.PolicyIdName"], format: Optional[Union[str, "_models.PolicyExportFormat"]] = "xml", - **kwargs + **kwargs: Any ) -> "_models.PolicyContract": """Get the Global policy definition of the Api Management service. @@ -192,7 +192,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -221,7 +221,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) response_headers = {} @@ -241,7 +241,7 @@ async def create_or_update( policy_id: Union[str, "_models.PolicyIdName"], parameters: "_models.PolicyContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.PolicyContract": """Creates or updates the global policy configuration of the Api Management service. @@ -266,7 +266,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -300,7 +300,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -324,7 +324,7 @@ async def delete( service_name: str, policy_id: Union[str, "_models.PolicyIdName"], if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the global policy configuration of the Api Management Service. @@ -347,7 +347,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -375,7 +375,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_revision_operations.py index 297e836b2d9c..f65524190013 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_revision_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_revision_operations.py @@ -50,9 +50,9 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.PortalRevisionCollection"]: - """Lists a collection of developer portal revision entities. + """Lists developer portal's revisions. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -85,7 +85,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -133,7 +133,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) @@ -149,9 +149,9 @@ async def get_entity_tag( resource_group_name: str, service_name: str, portal_revision_id: str, - **kwargs + **kwargs: Any ) -> bool: - """Gets developer portal revision specified by its identifier. + """Gets the developer portal revision specified by its identifier. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -170,7 +170,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -197,7 +197,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -214,9 +214,9 @@ async def get( resource_group_name: str, service_name: str, portal_revision_id: str, - **kwargs + **kwargs: Any ) -> "_models.PortalRevisionContract": - """Gets developer portal revision specified by its identifier. + """Gets the developer portal's revision specified by its identifier. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -235,7 +235,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -262,7 +262,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) response_headers = {} @@ -281,14 +281,14 @@ async def _create_or_update_initial( service_name: str, portal_revision_id: str, parameters: "_models.PortalRevisionContract", - **kwargs + **kwargs: Any ) -> Optional["_models.PortalRevisionContract"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PortalRevisionContract"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -320,7 +320,7 @@ async def _create_or_update_initial( if response.status_code not in [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) response_headers = {} @@ -341,9 +341,10 @@ async def begin_create_or_update( service_name: str, portal_revision_id: str, parameters: "_models.PortalRevisionContract", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.PortalRevisionContract"]: - """Creates a new developer portal revision. + """Creates a new developer portal's revision by running the portal's publishing. The ``isCurrent`` + property indicates if the revision is publicly accessible. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -356,8 +357,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a 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 PortalRevisionContract or the result of cls(response) @@ -422,14 +423,14 @@ async def _update_initial( portal_revision_id: str, if_match: str, parameters: "_models.PortalRevisionContract", - **kwargs + **kwargs: Any ) -> Optional["_models.PortalRevisionContract"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PortalRevisionContract"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -462,7 +463,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) response_headers = {} @@ -484,7 +485,7 @@ async def begin_update( portal_revision_id: str, if_match: str, parameters: "_models.PortalRevisionContract", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.PortalRevisionContract"]: """Updates the description of specified portal revision or makes it current. @@ -502,8 +503,8 @@ async def begin_update( :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a 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 PortalRevisionContract or the result of cls(response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_settings_operations.py index 7faa2d28c18a..360987630bcb 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_portal_settings_operations.py @@ -44,7 +44,7 @@ async def list_by_service( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> "_models.PortalSettingsCollection": """Lists a collection of portalsettings defined within a service instance.. @@ -62,7 +62,7 @@ async def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -88,7 +88,7 @@ async def list_by_service( 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('PortalSettingsCollection', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_operations.py index 96fdbcded8fc..bb12988433d6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_api_operations.py @@ -49,7 +49,7 @@ def list_by_product( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ApiCollection"]: """Lists a collection of the APIs associated with a product. @@ -83,7 +83,7 @@ def list_by_product( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -132,7 +132,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) @@ -149,7 +149,7 @@ async def check_entity_exists( service_name: str, product_id: str, api_id: str, - **kwargs + **kwargs: Any ) -> bool: """Checks that API entity specified by identifier is associated with the Product entity. @@ -173,7 +173,7 @@ async def check_entity_exists( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -201,7 +201,7 @@ async def check_entity_exists( if response.status_code not in [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: @@ -216,7 +216,7 @@ async def create_or_update( service_name: str, product_id: str, api_id: str, - **kwargs + **kwargs: Any ) -> "_models.ApiContract": """Adds an API to the specified product. @@ -240,7 +240,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -268,7 +268,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -289,7 +289,7 @@ async def delete( service_name: str, product_id: str, api_id: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified API from the specified product. @@ -313,7 +313,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -341,7 +341,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_operations.py index adb835af31a7..03dac3adb2ad 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_group_operations.py @@ -49,7 +49,7 @@ def list_by_product( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.GroupCollection"]: """Lists the collection of developer groups associated with the specified product. @@ -79,7 +79,7 @@ def list_by_product( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -128,7 +128,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) @@ -145,7 +145,7 @@ async def check_entity_exists( service_name: str, product_id: str, group_id: str, - **kwargs + **kwargs: Any ) -> bool: """Checks that Group entity specified by identifier is associated with the Product entity. @@ -169,7 +169,7 @@ async def check_entity_exists( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -197,7 +197,7 @@ async def check_entity_exists( if response.status_code not in [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: @@ -212,7 +212,7 @@ async def create_or_update( service_name: str, product_id: str, group_id: str, - **kwargs + **kwargs: Any ) -> "_models.GroupContract": """Adds the association between the specified developer group with the specified product. @@ -236,7 +236,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -264,7 +264,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.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,7 +285,7 @@ async def delete( service_name: str, product_id: str, group_id: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the association between the specified group and product. @@ -309,7 +309,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -337,7 +337,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_operations.py index 26348c37b5ab..667fd8a67b6f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_operations.py @@ -50,7 +50,7 @@ def list_by_service( skip: Optional[int] = None, expand_groups: Optional[bool] = None, tags: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ProductCollection"]: """Lists a collection of products in the specified service instance. @@ -85,7 +85,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -137,7 +137,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) @@ -153,7 +153,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, product_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the product specified by its identifier. @@ -174,7 +174,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -201,7 +201,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -218,7 +218,7 @@ async def get( resource_group_name: str, service_name: str, product_id: str, - **kwargs + **kwargs: Any ) -> "_models.ProductContract": """Gets the details of the product specified by its identifier. @@ -239,7 +239,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -266,7 +266,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) response_headers = {} @@ -286,7 +286,7 @@ async def create_or_update( product_id: str, parameters: "_models.ProductContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.ProductContract": """Creates or Updates a product. @@ -312,7 +312,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -346,7 +346,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -371,7 +371,7 @@ async def update( product_id: str, if_match: str, parameters: "_models.ProductUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.ProductContract": """Update existing product details. @@ -397,7 +397,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -430,7 +430,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -450,7 +450,7 @@ async def delete( product_id: str, if_match: str, delete_subscriptions: Optional[bool] = None, - **kwargs + **kwargs: Any ) -> None: """Delete product. @@ -476,7 +476,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -506,7 +506,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -522,7 +522,7 @@ def list_by_tags( top: Optional[int] = None, skip: Optional[int] = None, include_not_tagged_products: Optional[bool] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TagResourceCollection"]: """Lists a collection of products associated with tags. @@ -554,7 +554,7 @@ def list_by_tags( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -604,7 +604,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_policy_operations.py index 841f5a308ac9..cf5bdc2f1f58 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_policy_operations.py @@ -45,7 +45,7 @@ async def list_by_product( resource_group_name: str, service_name: str, product_id: str, - **kwargs + **kwargs: Any ) -> "_models.PolicyCollection": """Get the policy configuration at the Product level. @@ -66,7 +66,7 @@ async def list_by_product( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -93,7 +93,7 @@ async def list_by_product( 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('PolicyCollection', pipeline_response) @@ -110,7 +110,7 @@ async def get_entity_tag( service_name: str, product_id: str, policy_id: Union[str, "_models.PolicyIdName"], - **kwargs + **kwargs: Any ) -> bool: """Get the ETag of the policy configuration at the Product level. @@ -133,7 +133,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -161,7 +161,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -180,7 +180,7 @@ async def get( product_id: str, policy_id: Union[str, "_models.PolicyIdName"], format: Optional[Union[str, "_models.PolicyExportFormat"]] = "xml", - **kwargs + **kwargs: Any ) -> "_models.PolicyContract": """Get the policy configuration at the Product level. @@ -205,7 +205,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -235,7 +235,7 @@ async def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -256,7 +256,7 @@ async def create_or_update( policy_id: Union[str, "_models.PolicyIdName"], parameters: "_models.PolicyContract", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.PolicyContract": """Creates or updates policy configuration for the Product. @@ -284,7 +284,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -319,7 +319,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -344,7 +344,7 @@ async def delete( product_id: str, policy_id: Union[str, "_models.PolicyIdName"], if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the policy configuration at the Product. @@ -370,7 +370,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -399,7 +399,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_subscriptions_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_subscriptions_operations.py index 0e571562917e..d06cf4d60516 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_subscriptions_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_product_subscriptions_operations.py @@ -49,7 +49,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SubscriptionCollection"]: """Lists the collection of subscriptions to the specified product. @@ -86,7 +86,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -135,7 +135,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_counter_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_counter_keys_operations.py index 6e0cc4227388..0ae32893b697 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_counter_keys_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_counter_keys_operations.py @@ -45,7 +45,7 @@ async def list_by_service( resource_group_name: str, service_name: str, quota_counter_key: str, - **kwargs + **kwargs: Any ) -> "_models.QuotaCounterCollection": """Lists a collection of current quota counter periods associated with the counter-key configured in the policy on the specified service instance. The api does not support paging yet. @@ -55,9 +55,9 @@ async def list_by_service( :param service_name: The name of the API Management service. :type service_name: str :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify counter- - key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as - counter-key="@("b"+"a")" then it will be accessible by "ba" key. + in counter-key attribute of the quota-by-key policy.For Example, if you specify + counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined + as counter-key="@("b"+"a")" then it will be accessible by "ba" key. :type quota_counter_key: str :keyword callable cls: A custom type or function that will be passed the direct response :return: QuotaCounterCollection, or the result of cls(response) @@ -69,7 +69,7 @@ async def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -96,7 +96,7 @@ async def list_by_service( 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('QuotaCounterCollection', pipeline_response) @@ -113,7 +113,7 @@ async def update( service_name: str, quota_counter_key: str, parameters: "_models.QuotaCounterValueUpdateContract", - **kwargs + **kwargs: Any ) -> "_models.QuotaCounterCollection": """Updates all the quota counter values specified with the existing quota counter key to a value in the specified service instance. This should be used for reset of the quota counter values. @@ -123,9 +123,9 @@ async def update( :param service_name: The name of the API Management service. :type service_name: str :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify counter- - key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as - counter-key="@("b"+"a")" then it will be accessible by "ba" key. + in counter-key attribute of the quota-by-key policy.For Example, if you specify + counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined + as counter-key="@("b"+"a")" then it will be accessible by "ba" key. :type quota_counter_key: str :param parameters: The value of the quota counter to be applied to all quota counter periods. :type parameters: ~azure.mgmt.apimanagement.models.QuotaCounterValueUpdateContract @@ -139,7 +139,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -171,7 +171,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('QuotaCounterCollection', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_period_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_period_keys_operations.py index 372643281016..d10e0bbc4d35 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_period_keys_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_quota_by_period_keys_operations.py @@ -46,7 +46,7 @@ async def get( service_name: str, quota_counter_key: str, quota_period_key: str, - **kwargs + **kwargs: Any ) -> "_models.QuotaCounterContract": """Gets the value of the quota counter associated with the counter-key in the policy for the specific period in service instance. @@ -56,9 +56,9 @@ async def get( :param service_name: The name of the API Management service. :type service_name: str :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify counter- - key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as - counter-key="@("b"+"a")" then it will be accessible by "ba" key. + in counter-key attribute of the quota-by-key policy.For Example, if you specify + counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined + as counter-key="@("b"+"a")" then it will be accessible by "ba" key. :type quota_counter_key: str :param quota_period_key: Quota period key identifier. :type quota_period_key: str @@ -72,7 +72,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -100,7 +100,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('QuotaCounterContract', pipeline_response) @@ -118,7 +118,7 @@ async def update( quota_counter_key: str, quota_period_key: str, parameters: "_models.QuotaCounterValueUpdateContract", - **kwargs + **kwargs: Any ) -> "_models.QuotaCounterContract": """Updates an existing quota counter value in the specified service instance. @@ -127,9 +127,9 @@ async def update( :param service_name: The name of the API Management service. :type service_name: str :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify counter- - key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as - counter-key="@("b"+"a")" then it will be accessible by "ba" key. + in counter-key attribute of the quota-by-key policy.For Example, if you specify + counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined + as counter-key="@("b"+"a")" then it will be accessible by "ba" key. :type quota_counter_key: str :param quota_period_key: Quota period key identifier. :type quota_period_key: str @@ -145,7 +145,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -178,7 +178,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('QuotaCounterContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_region_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_region_operations.py index 7dff9bbf3e53..d02b3072b8e4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_region_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_region_operations.py @@ -45,7 +45,7 @@ def list_by_service( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.RegionListResult"]: """Lists all azure regions in which the service exists. @@ -63,7 +63,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -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.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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_reports_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_reports_operations.py index 6ed5bab4015f..7412b68812b6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_reports_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_reports_operations.py @@ -50,7 +50,7 @@ def list_by_api( top: Optional[int] = None, skip: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ReportCollection"]: """Lists report records by API. @@ -76,7 +76,7 @@ def list_by_api( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -125,7 +125,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) @@ -144,7 +144,7 @@ def list_by_user( top: Optional[int] = None, skip: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ReportCollection"]: """Lists report records by User. @@ -182,7 +182,7 @@ def list_by_user( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -231,7 +231,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) @@ -250,7 +250,7 @@ def list_by_operation( top: Optional[int] = None, skip: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ReportCollection"]: """Lists report records by API Operations. @@ -288,7 +288,7 @@ def list_by_operation( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -337,7 +337,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) @@ -356,7 +356,7 @@ def list_by_product( top: Optional[int] = None, skip: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ReportCollection"]: """Lists report records by Product. @@ -393,7 +393,7 @@ def list_by_product( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -442,7 +442,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.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) @@ -460,7 +460,7 @@ def list_by_geo( filter: str, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ReportCollection"]: """Lists report records by geography. @@ -496,7 +496,7 @@ def list_by_geo( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -543,7 +543,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) @@ -562,7 +562,7 @@ def list_by_subscription( top: Optional[int] = None, skip: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ReportCollection"]: """Lists report records by subscription. @@ -599,7 +599,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -648,7 +648,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) @@ -668,7 +668,7 @@ def list_by_time( top: Optional[int] = None, skip: Optional[int] = None, orderby: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ReportCollection"]: """Lists report records by Time. @@ -710,7 +710,7 @@ def list_by_time( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -760,7 +760,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) @@ -778,7 +778,7 @@ def list_by_request( filter: str, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.RequestReportCollection"]: """Lists report records by Request. @@ -806,7 +806,7 @@ def list_by_request( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -853,7 +853,7 @@ async def get_next(next_link=None): response = pipeline_response.http_response if response.status_code not in [200]: - error = self._deserialize(_models.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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_in_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_in_settings_operations.py index e9bc02464ffe..3012a32eb9f5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_in_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_in_settings_operations.py @@ -44,7 +44,7 @@ async def get_entity_tag( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the SignInSettings. @@ -62,7 +62,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -88,7 +88,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -104,7 +104,7 @@ async def get( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> "_models.PortalSigninSettings": """Get Sign In Settings for the Portal. @@ -122,7 +122,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -148,7 +148,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) response_headers = {} @@ -167,7 +167,7 @@ async def update( service_name: str, if_match: str, parameters: "_models.PortalSigninSettings", - **kwargs + **kwargs: Any ) -> None: """Update Sign-In settings. @@ -190,7 +190,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -222,7 +222,7 @@ async def update( if response.status_code not in [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: @@ -236,7 +236,7 @@ async def create_or_update( service_name: str, parameters: "_models.PortalSigninSettings", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.PortalSigninSettings": """Create or Update Sign-In settings. @@ -259,7 +259,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -292,7 +292,7 @@ async def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PortalSigninSettings', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_up_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_up_settings_operations.py index 053ffe6e99c0..7b0093c033f2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_up_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_sign_up_settings_operations.py @@ -44,7 +44,7 @@ async def get_entity_tag( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the SignUpSettings. @@ -62,7 +62,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -88,7 +88,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -104,7 +104,7 @@ async def get( self, resource_group_name: str, service_name: str, - **kwargs + **kwargs: Any ) -> "_models.PortalSignupSettings": """Get Sign Up Settings for the Portal. @@ -122,7 +122,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -148,7 +148,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) response_headers = {} @@ -167,7 +167,7 @@ async def update( service_name: str, if_match: str, parameters: "_models.PortalSignupSettings", - **kwargs + **kwargs: Any ) -> None: """Update Sign-Up settings. @@ -190,7 +190,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -222,7 +222,7 @@ async def update( if response.status_code not in [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: @@ -236,7 +236,7 @@ async def create_or_update( service_name: str, parameters: "_models.PortalSignupSettings", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.PortalSignupSettings": """Create or Update Sign-Up settings. @@ -259,7 +259,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -292,7 +292,7 @@ async def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PortalSignupSettings', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_subscription_operations.py index d3e4cecdfc00..c75f081d4137 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_subscription_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_subscription_operations.py @@ -48,7 +48,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SubscriptionCollection"]: """Lists all subscriptions of the API Management service instance. @@ -82,7 +82,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -130,7 +130,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) @@ -146,7 +146,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, sid: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the apimanagement subscription specified by its identifier. @@ -168,7 +168,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -195,7 +195,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -212,7 +212,7 @@ async def get( resource_group_name: str, service_name: str, sid: str, - **kwargs + **kwargs: Any ) -> "_models.SubscriptionContract": """Gets the specified Subscription entity. @@ -233,7 +233,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -260,7 +260,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) response_headers = {} @@ -282,7 +282,7 @@ async def create_or_update( notify: Optional[bool] = None, if_match: Optional[str] = None, app_type: Optional[Union[str, "_models.AppType"]] = None, - **kwargs + **kwargs: Any ) -> "_models.SubscriptionContract": """Creates or updates the subscription of specified user to the specified product. @@ -317,7 +317,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -355,7 +355,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -382,7 +382,7 @@ async def update( parameters: "_models.SubscriptionUpdateParameters", notify: Optional[bool] = None, app_type: Optional[Union[str, "_models.AppType"]] = None, - **kwargs + **kwargs: Any ) -> "_models.SubscriptionContract": """Updates the details of a subscription specified by its identifier. @@ -417,7 +417,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -454,7 +454,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -473,7 +473,7 @@ async def delete( service_name: str, sid: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified subscription. @@ -497,7 +497,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -525,7 +525,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -538,7 +538,7 @@ async def regenerate_primary_key( resource_group_name: str, service_name: str, sid: str, - **kwargs + **kwargs: Any ) -> None: """Regenerates primary key of existing subscription of the API Management service instance. @@ -559,7 +559,7 @@ async def regenerate_primary_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -586,7 +586,7 @@ async def regenerate_primary_key( if response.status_code not in [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: @@ -599,7 +599,7 @@ async def regenerate_secondary_key( resource_group_name: str, service_name: str, sid: str, - **kwargs + **kwargs: Any ) -> None: """Regenerates secondary key of existing subscription of the API Management service instance. @@ -620,7 +620,7 @@ async def regenerate_secondary_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -647,7 +647,7 @@ async def regenerate_secondary_key( if response.status_code not in [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: @@ -660,7 +660,7 @@ async def list_secrets( resource_group_name: str, service_name: str, sid: str, - **kwargs + **kwargs: Any ) -> "_models.SubscriptionKeysContract": """Gets the specified Subscription keys. @@ -681,7 +681,7 @@ async def list_secrets( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -708,7 +708,7 @@ async def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operations.py index 125215384a02..9d10d8deeb8f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_operations.py @@ -50,7 +50,7 @@ def list_by_operation( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TagCollection"]: """Lists all Tags associated with the Operation. @@ -83,7 +83,7 @@ def list_by_operation( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -133,7 +133,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) @@ -151,7 +151,7 @@ async def get_entity_state_by_operation( api_id: str, operation_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state version of the tag specified by its identifier. @@ -177,7 +177,7 @@ async def get_entity_state_by_operation( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -206,7 +206,7 @@ async def get_entity_state_by_operation( 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) response_headers = {} @@ -225,7 +225,7 @@ async def get_by_operation( api_id: str, operation_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> "_models.TagContract": """Get tag associated with the Operation. @@ -251,7 +251,7 @@ async def get_by_operation( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -280,7 +280,7 @@ async def get_by_operation( 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) response_headers = {} @@ -300,7 +300,7 @@ async def assign_to_operation( api_id: str, operation_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> "_models.TagContract": """Assign tag to the Operation. @@ -326,7 +326,7 @@ async def assign_to_operation( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -355,7 +355,7 @@ async def assign_to_operation( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -377,7 +377,7 @@ async def detach_from_operation( api_id: str, operation_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> None: """Detach the tag from the Operation. @@ -403,7 +403,7 @@ async def detach_from_operation( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -432,7 +432,7 @@ async def detach_from_operation( 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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -448,7 +448,7 @@ def list_by_api( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TagCollection"]: """Lists all Tags associated with the API. @@ -478,7 +478,7 @@ def list_by_api( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -527,7 +527,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) @@ -544,7 +544,7 @@ async def get_entity_state_by_api( service_name: str, api_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state version of the tag specified by its identifier. @@ -567,7 +567,7 @@ async def get_entity_state_by_api( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -595,7 +595,7 @@ async def get_entity_state_by_api( 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) response_headers = {} @@ -613,7 +613,7 @@ async def get_by_api( service_name: str, api_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> "_models.TagContract": """Get tag associated with the API. @@ -636,7 +636,7 @@ async def get_by_api( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -664,7 +664,7 @@ async def get_by_api( 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) response_headers = {} @@ -683,7 +683,7 @@ async def assign_to_api( service_name: str, api_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> "_models.TagContract": """Assign tag to the Api. @@ -706,7 +706,7 @@ async def assign_to_api( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -734,7 +734,7 @@ async def assign_to_api( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -758,7 +758,7 @@ async def detach_from_api( service_name: str, api_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> None: """Detach the tag from the Api. @@ -781,7 +781,7 @@ async def detach_from_api( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -809,7 +809,7 @@ async def detach_from_api( 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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -825,7 +825,7 @@ def list_by_product( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TagCollection"]: """Lists all Tags associated with the Product. @@ -855,7 +855,7 @@ def list_by_product( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -904,7 +904,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) @@ -921,7 +921,7 @@ async def get_entity_state_by_product( service_name: str, product_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state version of the tag specified by its identifier. @@ -944,7 +944,7 @@ async def get_entity_state_by_product( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -972,7 +972,7 @@ async def get_entity_state_by_product( 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) response_headers = {} @@ -990,7 +990,7 @@ async def get_by_product( service_name: str, product_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> "_models.TagContract": """Get tag associated with the Product. @@ -1013,7 +1013,7 @@ async def get_by_product( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -1041,7 +1041,7 @@ async def get_by_product( 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) response_headers = {} @@ -1060,7 +1060,7 @@ async def assign_to_product( service_name: str, product_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> "_models.TagContract": """Assign tag to the Product. @@ -1083,7 +1083,7 @@ async def assign_to_product( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -1111,7 +1111,7 @@ async def assign_to_product( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1132,7 +1132,7 @@ async def detach_from_product( service_name: str, product_id: str, tag_id: str, - **kwargs + **kwargs: Any ) -> None: """Detach the tag from the Product. @@ -1155,7 +1155,7 @@ async def detach_from_product( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -1183,7 +1183,7 @@ async def detach_from_product( 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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1199,7 +1199,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, scope: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TagCollection"]: """Lists a collection of tags defined within a service instance. @@ -1229,7 +1229,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -1279,7 +1279,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) @@ -1295,7 +1295,7 @@ async def get_entity_state( resource_group_name: str, service_name: str, tag_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state version of the tag specified by its identifier. @@ -1315,7 +1315,7 @@ async def get_entity_state( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -1342,7 +1342,7 @@ async def get_entity_state( 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) response_headers = {} @@ -1359,7 +1359,7 @@ async def get( resource_group_name: str, service_name: str, tag_id: str, - **kwargs + **kwargs: Any ) -> "_models.TagContract": """Gets the details of the tag specified by its identifier. @@ -1379,7 +1379,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -1406,7 +1406,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) response_headers = {} @@ -1426,7 +1426,7 @@ async def create_or_update( tag_id: str, parameters: "_models.TagCreateUpdateParameters", if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.TagContract": """Creates a tag. @@ -1451,7 +1451,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1485,7 +1485,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1510,7 +1510,7 @@ async def update( tag_id: str, if_match: str, parameters: "_models.TagCreateUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.TagContract": """Updates the details of the tag specified by its identifier. @@ -1535,7 +1535,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1568,7 +1568,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1587,7 +1587,7 @@ async def delete( service_name: str, tag_id: str, if_match: str, - **kwargs + **kwargs: Any ) -> None: """Deletes specific tag of the API Management service instance. @@ -1610,7 +1610,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -1638,7 +1638,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_resource_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_resource_operations.py index f66be3be5052..d7d057266f82 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_resource_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tag_resource_operations.py @@ -48,7 +48,7 @@ def list_by_service( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TagResourceCollection"]: """Lists a collection of resources associated with tags. @@ -86,7 +86,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -134,7 +134,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_git_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_git_operations.py index 4abc9aeb96f5..65d6f4947732 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_git_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_git_operations.py @@ -45,7 +45,7 @@ async def regenerate_primary_key( resource_group_name: str, service_name: str, access_name: Union[str, "_models.AccessIdName"], - **kwargs + **kwargs: Any ) -> None: """Regenerate primary access key for GIT. @@ -65,7 +65,7 @@ async def regenerate_primary_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -92,7 +92,7 @@ async def regenerate_primary_key( if response.status_code not in [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: @@ -105,7 +105,7 @@ async def regenerate_secondary_key( resource_group_name: str, service_name: str, access_name: Union[str, "_models.AccessIdName"], - **kwargs + **kwargs: Any ) -> None: """Regenerate secondary access key for GIT. @@ -125,7 +125,7 @@ async def regenerate_secondary_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -152,7 +152,7 @@ async def regenerate_secondary_key( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_operations.py index d69fb1916d9a..d5deb39ea65a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_access_operations.py @@ -46,7 +46,7 @@ def list_by_service( resource_group_name: str, service_name: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.AccessInformationCollection"]: """Returns list of access infos - for Git and Management endpoints. @@ -66,7 +66,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -110,7 +110,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) @@ -126,7 +126,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, access_name: Union[str, "_models.AccessIdName"], - **kwargs + **kwargs: Any ) -> bool: """Tenant access metadata. @@ -146,7 +146,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -173,7 +173,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -190,7 +190,7 @@ async def get( resource_group_name: str, service_name: str, access_name: Union[str, "_models.AccessIdName"], - **kwargs + **kwargs: Any ) -> "_models.AccessInformationContract": """Get tenant access information details without secrets. @@ -210,7 +210,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -237,7 +237,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) response_headers = {} @@ -257,7 +257,7 @@ async def create( access_name: Union[str, "_models.AccessIdName"], if_match: str, parameters: "_models.AccessInformationCreateParameters", - **kwargs + **kwargs: Any ) -> "_models.AccessInformationContract": """Update tenant access information details. @@ -282,7 +282,7 @@ async def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -315,7 +315,7 @@ async def create( 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) response_headers = {} @@ -335,7 +335,7 @@ async def update( access_name: Union[str, "_models.AccessIdName"], if_match: str, parameters: "_models.AccessInformationUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.AccessInformationContract": """Update tenant access information details. @@ -360,7 +360,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -393,7 +393,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -411,7 +411,7 @@ async def regenerate_primary_key( resource_group_name: str, service_name: str, access_name: Union[str, "_models.AccessIdName"], - **kwargs + **kwargs: Any ) -> None: """Regenerate primary access key. @@ -431,7 +431,7 @@ async def regenerate_primary_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -458,7 +458,7 @@ async def regenerate_primary_key( if response.status_code not in [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: @@ -471,7 +471,7 @@ async def regenerate_secondary_key( resource_group_name: str, service_name: str, access_name: Union[str, "_models.AccessIdName"], - **kwargs + **kwargs: Any ) -> None: """Regenerate secondary access key. @@ -491,7 +491,7 @@ async def regenerate_secondary_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -518,7 +518,7 @@ async def regenerate_secondary_key( if response.status_code not in [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: @@ -531,7 +531,7 @@ async def list_secrets( resource_group_name: str, service_name: str, access_name: Union[str, "_models.AccessIdName"], - **kwargs + **kwargs: Any ) -> "_models.AccessInformationSecretsContract": """Get tenant access information details. @@ -551,7 +551,7 @@ async def list_secrets( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -578,7 +578,7 @@ async def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_configuration_operations.py index 93101fb0d039..2ea56046b4a0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_configuration_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_configuration_operations.py @@ -48,14 +48,14 @@ async def _deploy_initial( service_name: str, configuration_name: Union[str, "_models.ConfigurationIdName"], parameters: "_models.DeployConfigurationParameters", - **kwargs + **kwargs: Any ) -> Optional["_models.OperationResultContract"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationResultContract"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -87,7 +87,7 @@ async def _deploy_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) deserialized = None @@ -106,7 +106,7 @@ async def begin_deploy( service_name: str, configuration_name: Union[str, "_models.ConfigurationIdName"], parameters: "_models.DeployConfigurationParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.OperationResultContract"]: """This operation applies changes from the specified Git branch to the configuration database. This is a long running operation and could take several minutes to complete. @@ -121,8 +121,8 @@ async def begin_deploy( :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a 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 OperationResultContract or the result of cls(response) @@ -183,14 +183,14 @@ async def _save_initial( service_name: str, configuration_name: Union[str, "_models.ConfigurationIdName"], parameters: "_models.SaveConfigurationParameter", - **kwargs + **kwargs: Any ) -> Optional["_models.OperationResultContract"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationResultContract"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -222,7 +222,7 @@ async def _save_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) deserialized = None @@ -241,7 +241,7 @@ async def begin_save( service_name: str, configuration_name: Union[str, "_models.ConfigurationIdName"], parameters: "_models.SaveConfigurationParameter", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.OperationResultContract"]: """This operation creates a commit with the current configuration snapshot to the specified branch in the repository. This is a long running operation and could take several minutes to complete. @@ -256,8 +256,8 @@ async def begin_save( :type parameters: ~azure.mgmt.apimanagement.models.SaveConfigurationParameter :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a 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 OperationResultContract or the result of cls(response) @@ -318,14 +318,14 @@ async def _validate_initial( service_name: str, configuration_name: Union[str, "_models.ConfigurationIdName"], parameters: "_models.DeployConfigurationParameters", - **kwargs + **kwargs: Any ) -> Optional["_models.OperationResultContract"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.OperationResultContract"]] error_map = { 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -357,7 +357,7 @@ async def _validate_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) deserialized = None @@ -376,7 +376,7 @@ async def begin_validate( service_name: str, configuration_name: Union[str, "_models.ConfigurationIdName"], parameters: "_models.DeployConfigurationParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.OperationResultContract"]: """This operation validates the changes in the specified Git branch. This is a long running operation and could take several minutes to complete. @@ -391,8 +391,8 @@ async def begin_validate( :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a 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 OperationResultContract or the result of cls(response) @@ -452,7 +452,7 @@ async def get_sync_state( resource_group_name: str, service_name: str, configuration_name: Union[str, "_models.ConfigurationIdName"], - **kwargs + **kwargs: Any ) -> "_models.TenantConfigurationSyncStateContract": """Gets the status of the most recent synchronization between the configuration database and the Git repository. @@ -473,7 +473,7 @@ async def get_sync_state( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -500,7 +500,7 @@ async def get_sync_state( 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('TenantConfigurationSyncStateContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_settings_operations.py index 11c4f90375d3..b819714683e3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_tenant_settings_operations.py @@ -46,7 +46,7 @@ def list_by_service( resource_group_name: str, service_name: str, filter: Optional[str] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.TenantSettingsCollection"]: """Public settings. @@ -66,7 +66,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -110,7 +110,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) @@ -126,7 +126,7 @@ async def get( resource_group_name: str, service_name: str, settings_type: Union[str, "_models.SettingsTypeName"], - **kwargs + **kwargs: Any ) -> "_models.TenantSettingsContract": """Get tenant settings. @@ -146,7 +146,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -173,7 +173,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) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_confirmation_password_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_confirmation_password_operations.py index 411be604d90d..844187acca9f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_confirmation_password_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_confirmation_password_operations.py @@ -46,7 +46,7 @@ async def send( service_name: str, user_id: str, app_type: Optional[Union[str, "_models.AppType"]] = None, - **kwargs + **kwargs: Any ) -> None: """Sends confirmation. @@ -69,7 +69,7 @@ async def send( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -98,7 +98,7 @@ async def send( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_group_operations.py index bcc3796d7d1c..6ca8f021c1a7 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_group_operations.py @@ -49,7 +49,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.GroupCollection"]: """Lists all user groups. @@ -81,7 +81,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -130,7 +130,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_identities_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_identities_operations.py index 62565b808a51..54c4eea551b9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_identities_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_identities_operations.py @@ -46,7 +46,7 @@ def list( resource_group_name: str, service_name: str, user_id: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.UserIdentityCollection"]: """List of all user identities. @@ -66,7 +66,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -109,7 +109,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_operations.py index edd45048c8ee..44c5d43de587 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_operations.py @@ -49,7 +49,7 @@ def list_by_service( top: Optional[int] = None, skip: Optional[int] = None, expand_groups: Optional[bool] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.UserCollection"]: """Lists a collection of registered users in the specified service instance. @@ -83,7 +83,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -133,7 +133,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) @@ -149,7 +149,7 @@ async def get_entity_tag( resource_group_name: str, service_name: str, user_id: str, - **kwargs + **kwargs: Any ) -> bool: """Gets the entity state (Etag) version of the user specified by its identifier. @@ -169,7 +169,7 @@ async def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -196,7 +196,7 @@ async def get_entity_tag( 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) response_headers = {} @@ -213,7 +213,7 @@ async def get( resource_group_name: str, service_name: str, user_id: str, - **kwargs + **kwargs: Any ) -> "_models.UserContract": """Gets the details of the user specified by its identifier. @@ -233,7 +233,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -260,7 +260,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) response_headers = {} @@ -281,7 +281,7 @@ async def create_or_update( parameters: "_models.UserCreateParameters", notify: Optional[bool] = None, if_match: Optional[str] = None, - **kwargs + **kwargs: Any ) -> "_models.UserContract": """Creates or Updates a user. @@ -308,7 +308,7 @@ async def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -344,7 +344,7 @@ async def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -369,7 +369,7 @@ async def update( user_id: str, if_match: str, parameters: "_models.UserUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.UserContract": """Updates the details of the user specified by its identifier. @@ -394,7 +394,7 @@ async def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -427,7 +427,7 @@ async def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -449,7 +449,7 @@ async def delete( delete_subscriptions: Optional[bool] = None, notify: Optional[bool] = None, app_type: Optional[Union[str, "_models.AppType"]] = None, - **kwargs + **kwargs: Any ) -> None: """Deletes specific user. @@ -479,7 +479,7 @@ async def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -513,7 +513,7 @@ async def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -526,7 +526,7 @@ async def generate_sso_url( resource_group_name: str, service_name: str, user_id: str, - **kwargs + **kwargs: Any ) -> "_models.GenerateSsoUrlResult": """Retrieves a redirection URL containing an authentication token for signing a given user into the developer portal. @@ -547,7 +547,7 @@ async def generate_sso_url( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -574,7 +574,7 @@ async def generate_sso_url( 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('GenerateSsoUrlResult', pipeline_response) @@ -591,7 +591,7 @@ async def get_shared_access_token( service_name: str, user_id: str, parameters: "_models.UserTokenParameters", - **kwargs + **kwargs: Any ) -> "_models.UserTokenResult": """Gets the Shared Access Authorization Token for the User. @@ -613,7 +613,7 @@ async def get_shared_access_token( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -645,7 +645,7 @@ async def get_shared_access_token( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('UserTokenResult', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_subscription_operations.py index 8fe578e64424..7a5183201af9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_subscription_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_user_subscription_operations.py @@ -49,7 +49,7 @@ def list( filter: Optional[str] = None, top: Optional[int] = None, skip: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SubscriptionCollection"]: """Lists the collection of subscriptions of the specified user. @@ -84,7 +84,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -133,7 +133,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) @@ -150,7 +150,7 @@ async def get( service_name: str, user_id: str, sid: str, - **kwargs + **kwargs: Any ) -> "_models.SubscriptionContract": """Gets the specified Subscription entity associated with a particular user. @@ -173,7 +173,7 @@ async def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -201,7 +201,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) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py index e329c40fad4e..d424922d2c32 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/__init__.py @@ -14,6 +14,7 @@ from ._models_py3 import AccessInformationUpdateParameters from ._models_py3 import AdditionalLocation from ._models_py3 import ApiCollection + from ._models_py3 import ApiContactInformation from ._models_py3 import ApiContract from ._models_py3 import ApiContractProperties from ._models_py3 import ApiContractUpdateProperties @@ -23,6 +24,7 @@ from ._models_py3 import ApiEntityBaseContract from ._models_py3 import ApiExportResult from ._models_py3 import ApiExportResultValue + from ._models_py3 import ApiLicenseInformation from ._models_py3 import ApiManagementServiceApplyNetworkConfigurationParameters from ._models_py3 import ApiManagementServiceBackupRestoreParameters from ._models_py3 import ApiManagementServiceBaseProperties @@ -94,6 +96,14 @@ from ._models_py3 import CertificateCreateOrUpdateParameters from ._models_py3 import CertificateInformation from ._models_py3 import ClientSecretContract + from ._models_py3 import ConnectivityCheckRequest + from ._models_py3 import ConnectivityCheckRequestDestination + from ._models_py3 import ConnectivityCheckRequestProtocolConfiguration + from ._models_py3 import ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration + from ._models_py3 import ConnectivityCheckRequestSource + from ._models_py3 import ConnectivityCheckResponse + from ._models_py3 import ConnectivityHop + from ._models_py3 import ConnectivityIssue from ._models_py3 import ConnectivityStatusContract from ._models_py3 import ContentItemCollection from ._models_py3 import ContentItemContract @@ -110,6 +120,8 @@ from ._models_py3 import EmailTemplateContract from ._models_py3 import EmailTemplateParametersContractProperties from ._models_py3 import EmailTemplateUpdateParameters + from ._models_py3 import EndpointDependency + from ._models_py3 import EndpointDetail from ._models_py3 import ErrorFieldContract from ._models_py3 import ErrorResponse from ._models_py3 import ErrorResponseBody @@ -129,6 +141,7 @@ from ._models_py3 import GroupContractProperties from ._models_py3 import GroupCreateParameters from ._models_py3 import GroupUpdateParameters + from ._models_py3 import HTTPHeader from ._models_py3 import HostnameConfiguration from ._models_py3 import HttpMessageDiagnostic from ._models_py3 import IdentityProviderBaseParameters @@ -185,6 +198,8 @@ from ._models_py3 import OperationTagResourceContractProperties from ._models_py3 import OperationUpdateContract from ._models_py3 import OperationUpdateContractProperties + from ._models_py3 import OutboundEnvironmentEndpoint + from ._models_py3 import OutboundEnvironmentEndpointList from ._models_py3 import ParameterContract from ._models_py3 import PipelineDiagnosticSettings from ._models_py3 import PolicyCollection @@ -243,6 +258,7 @@ from ._models_py3 import SubscriptionKeysContract from ._models_py3 import SubscriptionUpdateParameters from ._models_py3 import SubscriptionsDelegationSettingsProperties + from ._models_py3 import SystemData from ._models_py3 import TagCollection from ._models_py3 import TagContract from ._models_py3 import TagCreateUpdateParameters @@ -282,6 +298,7 @@ from ._models import AccessInformationUpdateParameters # type: ignore from ._models import AdditionalLocation # type: ignore from ._models import ApiCollection # type: ignore + from ._models import ApiContactInformation # type: ignore from ._models import ApiContract # type: ignore from ._models import ApiContractProperties # type: ignore from ._models import ApiContractUpdateProperties # type: ignore @@ -291,6 +308,7 @@ from ._models import ApiEntityBaseContract # type: ignore from ._models import ApiExportResult # type: ignore from ._models import ApiExportResultValue # type: ignore + from ._models import ApiLicenseInformation # type: ignore from ._models import ApiManagementServiceApplyNetworkConfigurationParameters # type: ignore from ._models import ApiManagementServiceBackupRestoreParameters # type: ignore from ._models import ApiManagementServiceBaseProperties # type: ignore @@ -362,6 +380,14 @@ from ._models import CertificateCreateOrUpdateParameters # type: ignore from ._models import CertificateInformation # type: ignore from ._models import ClientSecretContract # type: ignore + from ._models import ConnectivityCheckRequest # type: ignore + from ._models import ConnectivityCheckRequestDestination # type: ignore + from ._models import ConnectivityCheckRequestProtocolConfiguration # type: ignore + from ._models import ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration # type: ignore + from ._models import ConnectivityCheckRequestSource # type: ignore + from ._models import ConnectivityCheckResponse # type: ignore + from ._models import ConnectivityHop # type: ignore + from ._models import ConnectivityIssue # type: ignore from ._models import ConnectivityStatusContract # type: ignore from ._models import ContentItemCollection # type: ignore from ._models import ContentItemContract # type: ignore @@ -378,6 +404,8 @@ from ._models import EmailTemplateContract # type: ignore from ._models import EmailTemplateParametersContractProperties # type: ignore from ._models import EmailTemplateUpdateParameters # type: ignore + from ._models import EndpointDependency # type: ignore + from ._models import EndpointDetail # type: ignore from ._models import ErrorFieldContract # type: ignore from ._models import ErrorResponse # type: ignore from ._models import ErrorResponseBody # type: ignore @@ -397,6 +425,7 @@ from ._models import GroupContractProperties # type: ignore from ._models import GroupCreateParameters # type: ignore from ._models import GroupUpdateParameters # type: ignore + from ._models import HTTPHeader # type: ignore from ._models import HostnameConfiguration # type: ignore from ._models import HttpMessageDiagnostic # type: ignore from ._models import IdentityProviderBaseParameters # type: ignore @@ -453,6 +482,8 @@ from ._models import OperationTagResourceContractProperties # type: ignore from ._models import OperationUpdateContract # type: ignore from ._models import OperationUpdateContractProperties # type: ignore + from ._models import OutboundEnvironmentEndpoint # type: ignore + from ._models import OutboundEnvironmentEndpointList # type: ignore from ._models import ParameterContract # type: ignore from ._models import PipelineDiagnosticSettings # type: ignore from ._models import PolicyCollection # type: ignore @@ -511,6 +542,7 @@ from ._models import SubscriptionKeysContract # type: ignore from ._models import SubscriptionUpdateParameters # type: ignore from ._models import SubscriptionsDelegationSettingsProperties # type: ignore + from ._models import SystemData # type: ignore from ._models import TagCollection # type: ignore from ._models import TagContract # type: ignore from ._models import TagCreateUpdateParameters # type: ignore @@ -545,6 +577,7 @@ from ._api_management_client_enums import ( AccessIdName, + AccessType, AlwaysLog, ApiManagementSkuCapacityScaleType, ApiManagementSkuRestrictionsReasonCode, @@ -559,11 +592,16 @@ BearerTokenSendingMethod, BearerTokenSendingMethods, CertificateConfigurationStoreName, + CertificateSource, + CertificateStatus, ClientAuthenticationMethod, ConfigurationIdName, Confirmation, + ConnectionStatus, + ConnectivityCheckProtocol, ConnectivityStatusType, ContentFormat, + CreatedByType, DataMaskingMode, ExportApi, ExportFormat, @@ -573,21 +611,27 @@ HostnameType, HttpCorrelationProtocol, IdentityProviderType, + IssueType, KeyType, LoggerType, + Method, NameAvailabilityReason, NotificationName, OperationNameFormat, + Origin, PolicyContentFormat, PolicyExportFormat, PolicyIdName, PolicyScopeContract, PortalRevisionStatus, + PreferredIPVersion, ProductState, Protocol, + PublicNetworkAccess, ResourceSkuCapacityScaleType, SamplingType, SettingsTypeName, + Severity, SkuType, SoapApiType, State, @@ -607,6 +651,7 @@ 'AccessInformationUpdateParameters', 'AdditionalLocation', 'ApiCollection', + 'ApiContactInformation', 'ApiContract', 'ApiContractProperties', 'ApiContractUpdateProperties', @@ -616,6 +661,7 @@ 'ApiEntityBaseContract', 'ApiExportResult', 'ApiExportResultValue', + 'ApiLicenseInformation', 'ApiManagementServiceApplyNetworkConfigurationParameters', 'ApiManagementServiceBackupRestoreParameters', 'ApiManagementServiceBaseProperties', @@ -687,6 +733,14 @@ 'CertificateCreateOrUpdateParameters', 'CertificateInformation', 'ClientSecretContract', + 'ConnectivityCheckRequest', + 'ConnectivityCheckRequestDestination', + 'ConnectivityCheckRequestProtocolConfiguration', + 'ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration', + 'ConnectivityCheckRequestSource', + 'ConnectivityCheckResponse', + 'ConnectivityHop', + 'ConnectivityIssue', 'ConnectivityStatusContract', 'ContentItemCollection', 'ContentItemContract', @@ -703,6 +757,8 @@ 'EmailTemplateContract', 'EmailTemplateParametersContractProperties', 'EmailTemplateUpdateParameters', + 'EndpointDependency', + 'EndpointDetail', 'ErrorFieldContract', 'ErrorResponse', 'ErrorResponseBody', @@ -722,6 +778,7 @@ 'GroupContractProperties', 'GroupCreateParameters', 'GroupUpdateParameters', + 'HTTPHeader', 'HostnameConfiguration', 'HttpMessageDiagnostic', 'IdentityProviderBaseParameters', @@ -778,6 +835,8 @@ 'OperationTagResourceContractProperties', 'OperationUpdateContract', 'OperationUpdateContractProperties', + 'OutboundEnvironmentEndpoint', + 'OutboundEnvironmentEndpointList', 'ParameterContract', 'PipelineDiagnosticSettings', 'PolicyCollection', @@ -836,6 +895,7 @@ 'SubscriptionKeysContract', 'SubscriptionUpdateParameters', 'SubscriptionsDelegationSettingsProperties', + 'SystemData', 'TagCollection', 'TagContract', 'TagCreateUpdateParameters', @@ -868,6 +928,7 @@ 'VirtualNetworkConfiguration', 'X509CertificateName', 'AccessIdName', + 'AccessType', 'AlwaysLog', 'ApiManagementSkuCapacityScaleType', 'ApiManagementSkuRestrictionsReasonCode', @@ -882,11 +943,16 @@ 'BearerTokenSendingMethod', 'BearerTokenSendingMethods', 'CertificateConfigurationStoreName', + 'CertificateSource', + 'CertificateStatus', 'ClientAuthenticationMethod', 'ConfigurationIdName', 'Confirmation', + 'ConnectionStatus', + 'ConnectivityCheckProtocol', 'ConnectivityStatusType', 'ContentFormat', + 'CreatedByType', 'DataMaskingMode', 'ExportApi', 'ExportFormat', @@ -896,21 +962,27 @@ 'HostnameType', 'HttpCorrelationProtocol', 'IdentityProviderType', + 'IssueType', 'KeyType', 'LoggerType', + 'Method', 'NameAvailabilityReason', 'NotificationName', 'OperationNameFormat', + 'Origin', 'PolicyContentFormat', 'PolicyExportFormat', 'PolicyIdName', 'PolicyScopeContract', 'PortalRevisionStatus', + 'PreferredIPVersion', 'ProductState', 'Protocol', + 'PublicNetworkAccess', 'ResourceSkuCapacityScaleType', 'SamplingType', 'SettingsTypeName', + 'Severity', 'SkuType', 'SoapApiType', 'State', diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_api_management_client_enums.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_api_management_client_enums.py index a82fada00c3c..2cdb1446f299 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_api_management_client_enums.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_api_management_client_enums.py @@ -31,11 +31,23 @@ class AccessIdName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ACCESS = "access" GIT_ACCESS = "gitAccess" +class AccessType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of access to be used for the storage account. + """ + + #: Use access key. + ACCESS_KEY = "AccessKey" + #: Use system assigned managed identity. + SYSTEM_ASSIGNED_MANAGED_IDENTITY = "SystemAssignedManagedIdentity" + #: Use user assigned managed identity. + USER_ASSIGNED_MANAGED_IDENTITY = "UserAssignedManagedIdentity" + class AlwaysLog(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Specifies for what type of messages sampling settings should not apply. """ - ALL_ERRORS = "allErrors" #: Always log all erroneous request regardless of sampling settings. + #: Always log all erroneous request regardless of sampling settings. + ALL_ERRORS = "allErrors" class ApiManagementSkuCapacityScaleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The scale type applicable to the sku. @@ -76,6 +88,8 @@ class ApiType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): HTTP = "http" SOAP = "soap" + WEBSOCKET = "websocket" + GRAPHQL = "graphql" class ApiVersionSetContractDetailsVersioningScheme(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """An value that determines where the API Version identifier will be located in a HTTP request. @@ -87,8 +101,10 @@ class ApiVersionSetContractDetailsVersioningScheme(with_metaclass(_CaseInsensiti class AppType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - PORTAL = "portal" #: User create request was sent by legacy developer portal. - DEVELOPER_PORTAL = "developerPortal" #: User create request was sent by new developer portal. + #: User create request was sent by legacy developer portal. + PORTAL = "portal" + #: User create request was sent by new developer portal. + DEVELOPER_PORTAL = "developerPortal" class AsyncOperationStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Status of an async operation. @@ -114,8 +130,10 @@ class BackendProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Backend communication protocol. """ - HTTP = "http" #: The Backend is a RESTful service. - SOAP = "soap" #: The Backend is a SOAP service. + #: The Backend is a RESTful service. + HTTP = "http" + #: The Backend is a SOAP service. + SOAP = "soap" class BearerTokenSendingMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): @@ -126,8 +144,10 @@ class BearerTokenSendingMethods(with_metaclass(_CaseInsensitiveEnumMeta, str, En """Form of an authorization grant, which the client uses to request the access token. """ - AUTHORIZATION_HEADER = "authorizationHeader" #: Access token will be transmitted in the Authorization header using Bearer schema. - QUERY = "query" #: Access token will be transmitted as query parameters. + #: Access token will be transmitted in the Authorization header using Bearer schema. + AUTHORIZATION_HEADER = "authorizationHeader" + #: Access token will be transmitted as query parameters. + QUERY = "query" class CertificateConfigurationStoreName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The System.Security.Cryptography.x509certificates.StoreName certificate store location. Only @@ -137,10 +157,29 @@ class CertificateConfigurationStoreName(with_metaclass(_CaseInsensitiveEnumMeta, CERTIFICATE_AUTHORITY = "CertificateAuthority" ROOT = "Root" +class CertificateSource(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Certificate Source. + """ + + MANAGED = "Managed" + KEY_VAULT = "KeyVault" + CUSTOM = "Custom" + BUILT_IN = "BuiltIn" + +class CertificateStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Certificate Status. + """ + + COMPLETED = "Completed" + FAILED = "Failed" + IN_PROGRESS = "InProgress" + class ClientAuthenticationMethod(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - BASIC = "Basic" #: Basic Client Authentication method. - BODY = "Body" #: Body based Authentication method. + #: Basic Client Authentication method. + BASIC = "Basic" + #: Body based Authentication method. + BODY = "Body" class ConfigurationIdName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): @@ -150,8 +189,28 @@ class Confirmation(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Determines the type of confirmation e-mail that will be sent to the newly created user. """ - SIGNUP = "signup" #: Send an e-mail to the user confirming they have successfully signed up. - INVITE = "invite" #: Send an e-mail inviting the user to sign-up and complete registration. + #: Send an e-mail to the user confirming they have successfully signed up. + SIGNUP = "signup" + #: Send an e-mail inviting the user to sign-up and complete registration. + INVITE = "invite" + +class ConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The connection status. + """ + + UNKNOWN = "Unknown" + CONNECTED = "Connected" + DISCONNECTED = "Disconnected" + DEGRADED = "Degraded" + +class ConnectivityCheckProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The request's protocol. Specific protocol configuration can be available based on this + selection. The specified destination address must be coherent with this value. + """ + + TCP = "TCP" + HTTP = "HTTP" + HTTPS = "HTTPS" class ConnectivityStatusType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Resource Connectivity Status Type identifier. @@ -165,23 +224,46 @@ class ContentFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Format of the Content in which the API is getting imported. """ - WADL_XML = "wadl-xml" #: The contents are inline and Content type is a WADL document. - WADL_LINK_JSON = "wadl-link-json" #: The WADL document is hosted on a publicly accessible internet address. - SWAGGER_JSON = "swagger-json" #: The contents are inline and Content Type is a OpenAPI 2.0 JSON Document. - SWAGGER_LINK_JSON = "swagger-link-json" #: The OpenAPI 2.0 JSON document is hosted on a publicly accessible internet address. - WSDL = "wsdl" #: The contents are inline and the document is a WSDL/Soap document. - WSDL_LINK = "wsdl-link" #: The WSDL document is hosted on a publicly accessible internet address. - OPENAPI = "openapi" #: The contents are inline and Content Type is a OpenAPI 3.0 YAML Document. - OPENAPI_JSON = "openapi+json" #: The contents are inline and Content Type is a OpenAPI 3.0 JSON Document. - OPENAPI_LINK = "openapi-link" #: The OpenAPI 3.0 YAML document is hosted on a publicly accessible internet address. - OPENAPI_JSON_LINK = "openapi+json-link" #: The OpenAPI 3.0 JSON document is hosted on a publicly accessible internet address. + #: The contents are inline and Content type is a WADL document. + WADL_XML = "wadl-xml" + #: The WADL document is hosted on a publicly accessible internet address. + WADL_LINK_JSON = "wadl-link-json" + #: The contents are inline and Content Type is a OpenAPI 2.0 JSON Document. + SWAGGER_JSON = "swagger-json" + #: The OpenAPI 2.0 JSON document is hosted on a publicly accessible internet address. + SWAGGER_LINK_JSON = "swagger-link-json" + #: The contents are inline and the document is a WSDL/Soap document. + WSDL = "wsdl" + #: The WSDL document is hosted on a publicly accessible internet address. + WSDL_LINK = "wsdl-link" + #: The contents are inline and Content Type is a OpenAPI 3.0 YAML Document. + OPENAPI = "openapi" + #: The contents are inline and Content Type is a OpenAPI 3.0 JSON Document. + OPENAPI_JSON = "openapi+json" + #: The OpenAPI 3.0 YAML document is hosted on a publicly accessible internet address. + OPENAPI_LINK = "openapi-link" + #: The OpenAPI 3.0 JSON document is hosted on a publicly accessible internet address. + OPENAPI_JSON_LINK = "openapi+json-link" + #: The GraphQL API endpoint hosted on a publicly accessible internet address. + GRAPHQL_LINK = "graphql-link" + +class CreatedByType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of identity that created the resource. + """ + + USER = "User" + APPLICATION = "Application" + MANAGED_IDENTITY = "ManagedIdentity" + KEY = "Key" class DataMaskingMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Data masking mode. """ - MASK = "Mask" #: Mask the value of an entity. - HIDE = "Hide" #: Hide the presence of an entity. + #: Mask the value of an entity. + MASK = "Mask" + #: Hide the presence of an entity. + HIDE = "Hide" class ExportApi(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): @@ -189,28 +271,44 @@ class ExportApi(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): class ExportFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - SWAGGER = "swagger-link" #: Export the Api Definition in OpenAPI 2.0 Specification as JSON document to the Storage Blob. - WSDL = "wsdl-link" #: Export the Api Definition in WSDL Schema to Storage Blob. This is only supported for APIs of Type ``soap``. - WADL = "wadl-link" #: Export the Api Definition in WADL Schema to Storage Blob. - OPENAPI = "openapi-link" #: Export the Api Definition in OpenAPI 3.0 Specification as YAML document to Storage Blob. - OPENAPI_JSON = "openapi+json-link" #: Export the Api Definition in OpenAPI 3.0 Specification as JSON document to Storage Blob. + #: Export the Api Definition in OpenAPI 2.0 Specification as JSON document to the Storage Blob. + SWAGGER = "swagger-link" + #: Export the Api Definition in WSDL Schema to Storage Blob. This is only supported for APIs of + #: Type ``soap``. + WSDL = "wsdl-link" + #: Export the Api Definition in WADL Schema to Storage Blob. + WADL = "wadl-link" + #: Export the Api Definition in OpenAPI 3.0 Specification as YAML document to Storage Blob. + OPENAPI = "openapi-link" + #: Export the Api Definition in OpenAPI 3.0 Specification as JSON document to Storage Blob. + OPENAPI_JSON = "openapi+json-link" class ExportResultFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Format in which the Api Details are exported to the Storage Blob with Sas Key valid for 5 + """Format in which the API Details are exported to the Storage Blob with Sas Key valid for 5 minutes. """ - SWAGGER = "swagger-link-json" #: The Api Definition is exported in OpenApi Specification 2.0 format to the Storage Blob. - WSDL = "wsdl-link+xml" #: The Api Definition is exported in WSDL Schema to Storage Blob. This is only supported for APIs of Type ``soap``. - WADL = "wadl-link-json" #: Export the Api Definition in WADL Schema to Storage Blob. - OPEN_API = "openapi-link" #: Export the Api Definition in OpenApi Specification 3.0 to Storage Blob. + #: The API Definition is exported in OpenAPI Specification 2.0 format to the Storage Blob. + SWAGGER = "swagger-link-json" + #: The API Definition is exported in WSDL Schema to Storage Blob. This is only supported for APIs + #: of Type ``soap``. + WSDL = "wsdl-link+xml" + #: Export the API Definition in WADL Schema to Storage Blob. + WADL = "wadl-link-json" + #: Export the API Definition in OpenAPI Specification 3.0 to Storage Blob. + OPEN_API = "openapi-link" class GrantType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - AUTHORIZATION_CODE = "authorizationCode" #: Authorization Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.1. - IMPLICIT = "implicit" #: Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2. - RESOURCE_OWNER_PASSWORD = "resourceOwnerPassword" #: Resource Owner Password Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.3. - CLIENT_CREDENTIALS = "clientCredentials" #: Client Credentials Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.4. + #: Authorization Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.1. + AUTHORIZATION_CODE = "authorizationCode" + #: Implicit Code Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.2. + IMPLICIT = "implicit" + #: Resource Owner Password Grant flow as described + #: https://tools.ietf.org/html/rfc6749#section-4.3. + RESOURCE_OWNER_PASSWORD = "resourceOwnerPassword" + #: Client Credentials Grant flow as described https://tools.ietf.org/html/rfc6749#section-4.4. + CLIENT_CREDENTIALS = "clientCredentials" class GroupType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Group type. @@ -234,18 +332,42 @@ class HttpCorrelationProtocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum """Sets correlation protocol to use for Application Insights diagnostics. """ - NONE = "None" #: Do not read and inject correlation headers. - LEGACY = "Legacy" #: Inject Request-Id and Request-Context headers with request correlation data. See https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md. - W3_C = "W3C" #: Inject Trace Context headers. See https://w3c.github.io/trace-context. + #: Do not read and inject correlation headers. + NONE = "None" + #: Inject Request-Id and Request-Context headers with request correlation data. See + #: https://github.com/dotnet/corefx/blob/master/src/System.Diagnostics.DiagnosticSource/src/HttpCorrelationProtocol.md. + LEGACY = "Legacy" + #: Inject Trace Context headers. See https://w3c.github.io/trace-context. + W3_C = "W3C" class IdentityProviderType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - FACEBOOK = "facebook" #: Facebook as Identity provider. - GOOGLE = "google" #: Google as Identity provider. - MICROSOFT = "microsoft" #: Microsoft Live as Identity provider. - TWITTER = "twitter" #: Twitter as Identity provider. - AAD = "aad" #: Azure Active Directory as Identity provider. - AAD_B2_C = "aadB2C" #: Azure Active Directory B2C as Identity provider. + #: Facebook as Identity provider. + FACEBOOK = "facebook" + #: Google as Identity provider. + GOOGLE = "google" + #: Microsoft Live as Identity provider. + MICROSOFT = "microsoft" + #: Twitter as Identity provider. + TWITTER = "twitter" + #: Azure Active Directory as Identity provider. + AAD = "aad" + #: Azure Active Directory B2C as Identity provider. + AAD_B2_C = "aadB2C" + +class IssueType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of issue. + """ + + UNKNOWN = "Unknown" + AGENT_STOPPED = "AgentStopped" + GUEST_FIREWALL = "GuestFirewall" + DNS_RESOLUTION = "DnsResolution" + SOCKET_BIND = "SocketBind" + NETWORK_SECURITY_RULE = "NetworkSecurityRule" + USER_DEFINED_ROUTE = "UserDefinedRoute" + PORT_THROTTLED = "PortThrottled" + PLATFORM = "Platform" class KeyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The Key to be used to generate token for user. @@ -258,9 +380,19 @@ class LoggerType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Logger type. """ - AZURE_EVENT_HUB = "azureEventHub" #: Azure Event Hub as log destination. - APPLICATION_INSIGHTS = "applicationInsights" #: Azure Application Insights as log destination. - AZURE_MONITOR = "azureMonitor" #: Azure Monitor. + #: Azure Event Hub as log destination. + AZURE_EVENT_HUB = "azureEventHub" + #: Azure Application Insights as log destination. + APPLICATION_INSIGHTS = "applicationInsights" + #: Azure Monitor. + AZURE_MONITOR = "azureMonitor" + +class Method(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The HTTP method to be used. + """ + + GET = "GET" + POST = "POST" class NameAvailabilityReason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Invalid indicates the name provided does not match the resource provider’s naming requirements @@ -274,34 +406,65 @@ class NameAvailabilityReason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum) class NotificationName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - REQUEST_PUBLISHER_NOTIFICATION_MESSAGE = "RequestPublisherNotificationMessage" #: The following email recipients and users will receive email notifications about subscription requests for API products requiring approval. - PURCHASE_PUBLISHER_NOTIFICATION_MESSAGE = "PurchasePublisherNotificationMessage" #: The following email recipients and users will receive email notifications about new API product subscriptions. - NEW_APPLICATION_NOTIFICATION_MESSAGE = "NewApplicationNotificationMessage" #: The following email recipients and users will receive email notifications when new applications are submitted to the application gallery. - BCC = "BCC" #: The following recipients will receive blind carbon copies of all emails sent to developers. - NEW_ISSUE_PUBLISHER_NOTIFICATION_MESSAGE = "NewIssuePublisherNotificationMessage" #: The following email recipients and users will receive email notifications when a new issue or comment is submitted on the developer portal. - ACCOUNT_CLOSED_PUBLISHER = "AccountClosedPublisher" #: The following email recipients and users will receive email notifications when developer closes his account. - QUOTA_LIMIT_APPROACHING_PUBLISHER_NOTIFICATION_MESSAGE = "QuotaLimitApproachingPublisherNotificationMessage" #: The following email recipients and users will receive email notifications when subscription usage gets close to usage quota. + #: The following email recipients and users will receive email notifications about subscription + #: requests for API products requiring approval. + REQUEST_PUBLISHER_NOTIFICATION_MESSAGE = "RequestPublisherNotificationMessage" + #: The following email recipients and users will receive email notifications about new API product + #: subscriptions. + PURCHASE_PUBLISHER_NOTIFICATION_MESSAGE = "PurchasePublisherNotificationMessage" + #: The following email recipients and users will receive email notifications when new applications + #: are submitted to the application gallery. + NEW_APPLICATION_NOTIFICATION_MESSAGE = "NewApplicationNotificationMessage" + #: The following recipients will receive blind carbon copies of all emails sent to developers. + BCC = "BCC" + #: The following email recipients and users will receive email notifications when a new issue or + #: comment is submitted on the developer portal. + NEW_ISSUE_PUBLISHER_NOTIFICATION_MESSAGE = "NewIssuePublisherNotificationMessage" + #: The following email recipients and users will receive email notifications when developer closes + #: his account. + ACCOUNT_CLOSED_PUBLISHER = "AccountClosedPublisher" + #: The following email recipients and users will receive email notifications when subscription + #: usage gets close to usage quota. + QUOTA_LIMIT_APPROACHING_PUBLISHER_NOTIFICATION_MESSAGE = "QuotaLimitApproachingPublisherNotificationMessage" class OperationNameFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The format of the Operation Name for Application Insights telemetries. Default is Name. """ - NAME = "Name" #: API_NAME;rev=API_REVISION - OPERATION_NAME. - URL = "Url" #: HTTP_VERB URL. + #: API_NAME;rev=API_REVISION - OPERATION_NAME. + NAME = "Name" + #: HTTP_VERB URL. + URL = "Url" + +class Origin(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The origin of the issue. + """ + + LOCAL = "Local" + INBOUND = "Inbound" + OUTBOUND = "Outbound" class PolicyContentFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Format of the policyContent. """ - XML = "xml" #: The contents are inline and Content type is an XML document. - XML_LINK = "xml-link" #: The policy XML document is hosted on a http endpoint accessible from the API Management service. - RAWXML = "rawxml" #: The contents are inline and Content type is a non XML encoded policy document. - RAWXML_LINK = "rawxml-link" #: The policy document is not Xml encoded and is hosted on a http endpoint accessible from the API Management service. + #: The contents are inline and Content type is an XML document. + XML = "xml" + #: The policy XML document is hosted on a http endpoint accessible from the API Management + #: service. + XML_LINK = "xml-link" + #: The contents are inline and Content type is a non XML encoded policy document. + RAWXML = "rawxml" + #: The policy document is not Xml encoded and is hosted on a http endpoint accessible from the API + #: Management service. + RAWXML_LINK = "rawxml-link" class PolicyExportFormat(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - XML = "xml" #: The contents are inline and Content type is an XML document. - RAWXML = "rawxml" #: The contents are inline and Content type is a non XML encoded policy document. + #: The contents are inline and Content type is an XML document. + XML = "xml" + #: The contents are inline and Content type is a non XML encoded policy document. + RAWXML = "rawxml" class PolicyIdName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): @@ -316,13 +479,23 @@ class PolicyScopeContract(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ALL = "All" class PortalRevisionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Portal revision publishing status + """Status of the portal's revision. + """ + + #: Portal's revision has been queued. + PENDING = "pending" + #: Portal's revision is being published. + PUBLISHING = "publishing" + #: Portal's revision publishing completed. + COMPLETED = "completed" + #: Portal's revision publishing failed. + FAILED = "failed" + +class PreferredIPVersion(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The IP version to be used. Only IPv4 is supported for now. """ - PENDING = "pending" #: Portal revision publishing is pending. - PUBLISHING = "publishing" #: Portal revision is publishing. - COMPLETED = "completed" #: Portal revision publishing completed. - FAILED = "failed" #: Portal revision publishing failed. + I_PV4 = "IPv4" class ProductState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """whether product is published or not. Published products are discoverable by users of developer @@ -337,56 +510,97 @@ class Protocol(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): HTTP = "http" HTTPS = "https" + WS = "ws" + WSS = "wss" + +class PublicNetworkAccess(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """Whether or not public endpoint access is allowed for this API Management service. Value is + optional but if passed in, must be 'Enabled' or 'Disabled'. If 'Disabled', private endpoints + are the exclusive access method. Default value is 'Enabled' + """ + + ENABLED = "Enabled" + DISABLED = "Disabled" class ResourceSkuCapacityScaleType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The scale type applicable to the sku. """ - AUTOMATIC = "automatic" #: Supported scale type automatic. - MANUAL = "manual" #: Supported scale type manual. - NONE = "none" #: Scaling not supported. + #: Supported scale type automatic. + AUTOMATIC = "automatic" + #: Supported scale type manual. + MANUAL = "manual" + #: Scaling not supported. + NONE = "none" class SamplingType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Sampling type. """ - FIXED = "fixed" #: Fixed-rate sampling. + #: Fixed-rate sampling. + FIXED = "fixed" class SettingsTypeName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): PUBLIC = "public" +class Severity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The severity of the issue. + """ + + ERROR = "Error" + WARNING = "Warning" + class SkuType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Name of the Sku. """ - DEVELOPER = "Developer" #: Developer SKU of Api Management. - STANDARD = "Standard" #: Standard SKU of Api Management. - PREMIUM = "Premium" #: Premium SKU of Api Management. - BASIC = "Basic" #: Basic SKU of Api Management. - CONSUMPTION = "Consumption" #: Consumption SKU of Api Management. - ISOLATED = "Isolated" #: Isolated SKU of Api Management. + #: Developer SKU of Api Management. + DEVELOPER = "Developer" + #: Standard SKU of Api Management. + STANDARD = "Standard" + #: Premium SKU of Api Management. + PREMIUM = "Premium" + #: Basic SKU of Api Management. + BASIC = "Basic" + #: Consumption SKU of Api Management. + CONSUMPTION = "Consumption" + #: Isolated SKU of Api Management. + ISOLATED = "Isolated" class SoapApiType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - """Type of Api to create. + """Type of API to create. - * ``http`` creates a SOAP to REST API - * ``soap`` creates a SOAP pass-through API . + * ``http`` creates a REST API + * ``soap`` creates a SOAP pass-through API + * ``websocket`` creates websocket API + * ``graphql`` creates GraphQL API. """ - SOAP_TO_REST = "http" #: Imports a SOAP API having a RESTful front end. - SOAP_PASS_THROUGH = "soap" #: Imports the Soap API having a SOAP front end. + #: Imports a SOAP API having a RESTful front end. + SOAP_TO_REST = "http" + #: Imports the SOAP API having a SOAP front end. + SOAP_PASS_THROUGH = "soap" + #: Imports the API having a Websocket front end. + WEB_SOCKET = "websocket" + #: Imports the API having a GraphQL front end. + GRAPH_QL = "graphql" class State(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Status of the issue. """ - PROPOSED = "proposed" #: The issue is proposed. - OPEN = "open" #: The issue is opened. - REMOVED = "removed" #: The issue was removed. - RESOLVED = "resolved" #: The issue is now resolved. - CLOSED = "closed" #: The issue was closed. + #: The issue is proposed. + PROPOSED = "proposed" + #: The issue is opened. + OPEN = "open" + #: The issue was removed. + REMOVED = "removed" + #: The issue is now resolved. + RESOLVED = "resolved" + #: The issue was closed. + CLOSED = "closed" class SubscriptionState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Subscription state. Possible states are * active – the subscription is active, * suspended – @@ -426,26 +640,39 @@ class UserState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): into the developer portal or call any APIs of subscribed products. Default state is Active. """ - ACTIVE = "active" #: User state is active. - BLOCKED = "blocked" #: User is blocked. Blocked users cannot authenticate at developer portal or call API. - PENDING = "pending" #: User account is pending. Requires identity confirmation before it can be made active. - DELETED = "deleted" #: User account is closed. All identities and related entities are removed. + #: User state is active. + ACTIVE = "active" + #: User is blocked. Blocked users cannot authenticate at developer portal or call API. + BLOCKED = "blocked" + #: User account is pending. Requires identity confirmation before it can be made active. + PENDING = "pending" + #: User account is closed. All identities and related entities are removed. + DELETED = "deleted" class Verbosity(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The verbosity level applied to traces emitted by trace policies. """ - VERBOSE = "verbose" #: All the traces emitted by trace policies will be sent to the logger attached to this diagnostic instance. - INFORMATION = "information" #: Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to this diagnostic instance. - ERROR = "error" #: Only traces with 'severity' set to 'error' will be sent to the logger attached to this diagnostic instance. + #: All the traces emitted by trace policies will be sent to the logger attached to this diagnostic + #: instance. + VERBOSE = "verbose" + #: Traces with 'severity' set to 'information' and 'error' will be sent to the logger attached to + #: this diagnostic instance. + INFORMATION = "information" + #: Only traces with 'severity' set to 'error' will be sent to the logger attached to this + #: diagnostic instance. + ERROR = "error" class VersioningScheme(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """An value that determines where the API Version identifier will be located in a HTTP request. """ - SEGMENT = "Segment" #: The API Version is passed in a path segment. - QUERY = "Query" #: The API Version is passed in a query parameter. - HEADER = "Header" #: The API Version is passed in a HTTP header. + #: The API Version is passed in a path segment. + SEGMENT = "Segment" + #: The API Version is passed in a query parameter. + QUERY = "Query" + #: The API Version is passed in a HTTP header. + HEADER = "Header" class VirtualNetworkType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The type of VPN in which API Management service needs to be configured in. None (Default Value) @@ -455,6 +682,10 @@ class VirtualNetworkType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): Intranet Facing Endpoint only. """ - NONE = "None" #: The service is not part of any Virtual Network. - EXTERNAL = "External" #: The service is part of Virtual Network and it is accessible from Internet. - INTERNAL = "Internal" #: The service is part of Virtual Network and it is only accessible from within the virtual network. + #: The service is not part of any Virtual Network. + NONE = "None" + #: The service is part of Virtual Network and it is accessible from Internet. + EXTERNAL = "External" + #: The service is part of Virtual Network and it is only accessible from within the virtual + #: network. + INTERNAL = "Internal" diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py index 46b0504cf0b1..c24d28c2e2a9 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models.py @@ -234,6 +234,10 @@ class AdditionalLocation(msrest.serialization.Model): service which is deployed in an Internal Virtual Network in a particular additional location. Available only for Basic, Standard, Premium and Isolated SKU. :vartype private_ip_addresses: list[str] + :param public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with + Virtual Network deployed service in the location. Supported only for Premium SKU being deployed + in Virtual Network. + :type public_ip_address_id: str :param virtual_network_configuration: Virtual network configuration for the location. :type virtual_network_configuration: ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration @@ -258,6 +262,7 @@ class AdditionalLocation(msrest.serialization.Model): 'zones': {'key': 'zones', 'type': '[str]'}, 'public_ip_addresses': {'key': 'publicIPAddresses', 'type': '[str]'}, 'private_ip_addresses': {'key': 'privateIPAddresses', 'type': '[str]'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, 'virtual_network_configuration': {'key': 'virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, 'gateway_regional_url': {'key': 'gatewayRegionalUrl', 'type': 'str'}, 'disable_gateway': {'key': 'disableGateway', 'type': 'bool'}, @@ -273,13 +278,14 @@ def __init__( self.zones = kwargs.get('zones', None) self.public_ip_addresses = None self.private_ip_addresses = None + self.public_ip_address_id = kwargs.get('public_ip_address_id', None) self.virtual_network_configuration = kwargs.get('virtual_network_configuration', None) self.gateway_regional_url = None self.disable_gateway = kwargs.get('disable_gateway', False) class ApiCollection(msrest.serialization.Model): - """Paged Api list representation. + """Paged API list representation. Variables are only populated by the server, and will be ignored when sending a request. @@ -312,8 +318,36 @@ def __init__( self.next_link = None +class ApiContactInformation(msrest.serialization.Model): + """API contact information. + + :param name: The identifying name of the contact person/organization. + :type name: str + :param url: The URL pointing to the contact information. MUST be in the format of a URL. + :type url: str + :param email: The email address of the contact person/organization. MUST be in the format of an + email address. + :type email: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'email': {'key': 'email', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApiContactInformation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.url = kwargs.get('url', None) + self.email = kwargs.get('email', None) + + class ApiContract(Resource): - """Api details. + """API details. Variables are only populated by the server, and will be ignored when sending a request. @@ -330,26 +364,33 @@ class ApiContract(Resource): :param subscription_key_parameter_names: Protocols over which API is made available. :type subscription_key_parameter_names: ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: "http", "soap". + :param api_type: Type of API. Possible values include: "http", "soap", "websocket", "graphql". :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is provided, default + :param api_revision: Describes the revision of the API. If no value is provided, default revision 1 is created. :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API is versioned. + :param api_version: Indicates the version identifier of the API if the API is versioned. :type api_version: str :param is_current: Indicates if API revision is current api revision. :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. + :param api_revision_description: Description of the API Revision. :type api_revision_description: str - :param api_version_description: Description of the Api Version. + :param api_version_description: Description of the API Version. :type api_version_description: str :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str :param subscription_required: Specifies whether an API or Product subscription is required for accessing the API. :type subscription_required: bool + :param terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format + of a URL. + :type terms_of_service_url: str + :param contact: Contact information for the API. + :type contact: ~azure.mgmt.apimanagement.models.ApiContactInformation + :param license: License information for the API. + :type license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation :param source_api_id: API identifier of the source API. :type source_api_id: str :param display_name: API name. Must be 1 to 300 characters long. @@ -397,6 +438,9 @@ class ApiContract(Resource): 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, + 'terms_of_service_url': {'key': 'properties.termsOfServiceUrl', 'type': 'str'}, + 'contact': {'key': 'properties.contact', 'type': 'ApiContactInformation'}, + 'license': {'key': 'properties.license', 'type': 'ApiLicenseInformation'}, 'source_api_id': {'key': 'properties.sourceApiId', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, @@ -422,6 +466,9 @@ def __init__( self.api_version_description = kwargs.get('api_version_description', None) self.api_version_set_id = kwargs.get('api_version_set_id', None) self.subscription_required = kwargs.get('subscription_required', None) + self.terms_of_service_url = kwargs.get('terms_of_service_url', None) + self.contact = kwargs.get('contact', None) + self.license = kwargs.get('license', None) self.source_api_id = kwargs.get('source_api_id', None) self.display_name = kwargs.get('display_name', None) self.service_url = kwargs.get('service_url', None) @@ -442,26 +489,33 @@ class ApiEntityBaseContract(msrest.serialization.Model): :param subscription_key_parameter_names: Protocols over which API is made available. :type subscription_key_parameter_names: ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: "http", "soap". + :param api_type: Type of API. Possible values include: "http", "soap", "websocket", "graphql". :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is provided, default + :param api_revision: Describes the revision of the API. If no value is provided, default revision 1 is created. :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API is versioned. + :param api_version: Indicates the version identifier of the API if the API is versioned. :type api_version: str :param is_current: Indicates if API revision is current api revision. :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. + :param api_revision_description: Description of the API Revision. :type api_revision_description: str - :param api_version_description: Description of the Api Version. + :param api_version_description: Description of the API Version. :type api_version_description: str :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str :param subscription_required: Specifies whether an API or Product subscription is required for accessing the API. :type subscription_required: bool + :param terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format + of a URL. + :type terms_of_service_url: str + :param contact: Contact information for the API. + :type contact: ~azure.mgmt.apimanagement.models.ApiContactInformation + :param license: License information for the API. + :type license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation """ _validation = { @@ -485,6 +539,9 @@ class ApiEntityBaseContract(msrest.serialization.Model): 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, + 'terms_of_service_url': {'key': 'termsOfServiceUrl', 'type': 'str'}, + 'contact': {'key': 'contact', 'type': 'ApiContactInformation'}, + 'license': {'key': 'license', 'type': 'ApiLicenseInformation'}, } def __init__( @@ -504,10 +561,13 @@ def __init__( self.api_version_description = kwargs.get('api_version_description', None) self.api_version_set_id = kwargs.get('api_version_set_id', None) self.subscription_required = kwargs.get('subscription_required', None) + self.terms_of_service_url = kwargs.get('terms_of_service_url', None) + self.contact = kwargs.get('contact', None) + self.license = kwargs.get('license', None) class ApiContractProperties(ApiEntityBaseContract): - """Api Entity Properties. + """API Entity Properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -520,26 +580,33 @@ class ApiContractProperties(ApiEntityBaseContract): :param subscription_key_parameter_names: Protocols over which API is made available. :type subscription_key_parameter_names: ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: "http", "soap". + :param api_type: Type of API. Possible values include: "http", "soap", "websocket", "graphql". :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is provided, default + :param api_revision: Describes the revision of the API. If no value is provided, default revision 1 is created. :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API is versioned. + :param api_version: Indicates the version identifier of the API if the API is versioned. :type api_version: str :param is_current: Indicates if API revision is current api revision. :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. + :param api_revision_description: Description of the API Revision. :type api_revision_description: str - :param api_version_description: Description of the Api Version. + :param api_version_description: Description of the API Version. :type api_version_description: str :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str :param subscription_required: Specifies whether an API or Product subscription is required for accessing the API. :type subscription_required: bool + :param terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format + of a URL. + :type terms_of_service_url: str + :param contact: Contact information for the API. + :type contact: ~azure.mgmt.apimanagement.models.ApiContactInformation + :param license: License information for the API. + :type license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation :param source_api_id: API identifier of the source API. :type source_api_id: str :param display_name: API name. Must be 1 to 300 characters long. @@ -581,6 +648,9 @@ class ApiContractProperties(ApiEntityBaseContract): 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, + 'terms_of_service_url': {'key': 'termsOfServiceUrl', 'type': 'str'}, + 'contact': {'key': 'contact', 'type': 'ApiContactInformation'}, + 'license': {'key': 'license', 'type': 'ApiLicenseInformation'}, 'source_api_id': {'key': 'sourceApiId', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, 'service_url': {'key': 'serviceUrl', 'type': 'str'}, @@ -614,26 +684,33 @@ class ApiContractUpdateProperties(ApiEntityBaseContract): :param subscription_key_parameter_names: Protocols over which API is made available. :type subscription_key_parameter_names: ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: "http", "soap". + :param api_type: Type of API. Possible values include: "http", "soap", "websocket", "graphql". :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is provided, default + :param api_revision: Describes the revision of the API. If no value is provided, default revision 1 is created. :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API is versioned. + :param api_version: Indicates the version identifier of the API if the API is versioned. :type api_version: str :param is_current: Indicates if API revision is current api revision. :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. + :param api_revision_description: Description of the API Revision. :type api_revision_description: str - :param api_version_description: Description of the Api Version. + :param api_version_description: Description of the API Version. :type api_version_description: str :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str :param subscription_required: Specifies whether an API or Product subscription is required for accessing the API. :type subscription_required: bool + :param terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format + of a URL. + :type terms_of_service_url: str + :param contact: Contact information for the API. + :type contact: ~azure.mgmt.apimanagement.models.ApiContactInformation + :param license: License information for the API. + :type license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation :param display_name: API name. :type display_name: str :param service_url: Absolute URL of the backend service implementing this API. @@ -670,6 +747,9 @@ class ApiContractUpdateProperties(ApiEntityBaseContract): 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, + 'terms_of_service_url': {'key': 'termsOfServiceUrl', 'type': 'str'}, + 'contact': {'key': 'contact', 'type': 'ApiContactInformation'}, + 'license': {'key': 'license', 'type': 'ApiLicenseInformation'}, 'display_name': {'key': 'displayName', 'type': 'str'}, 'service_url': {'key': 'serviceUrl', 'type': 'str'}, 'path': {'key': 'path', 'type': 'str'}, @@ -699,26 +779,33 @@ class ApiCreateOrUpdateParameter(msrest.serialization.Model): :param subscription_key_parameter_names: Protocols over which API is made available. :type subscription_key_parameter_names: ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: "http", "soap". + :param api_type: Type of API. Possible values include: "http", "soap", "websocket", "graphql". :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is provided, default + :param api_revision: Describes the revision of the API. If no value is provided, default revision 1 is created. :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API is versioned. + :param api_version: Indicates the version identifier of the API if the API is versioned. :type api_version: str :param is_current: Indicates if API revision is current api revision. :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. + :param api_revision_description: Description of the API Revision. :type api_revision_description: str - :param api_version_description: Description of the Api Version. + :param api_version_description: Description of the API Version. :type api_version_description: str :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str :param subscription_required: Specifies whether an API or Product subscription is required for accessing the API. :type subscription_required: bool + :param terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format + of a URL. + :type terms_of_service_url: str + :param contact: Contact information for the API. + :type contact: ~azure.mgmt.apimanagement.models.ApiContactInformation + :param license: License information for the API. + :type license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation :param source_api_id: API identifier of the source API. :type source_api_id: str :param display_name: API name. Must be 1 to 300 characters long. @@ -737,16 +824,19 @@ class ApiCreateOrUpdateParameter(msrest.serialization.Model): :param value: Content value when Importing an API. :type value: str :param format: Format of the Content in which the API is getting imported. Possible values - include: "wadl-xml", "wadl-link-json", "swagger-json", "swagger-link-json", "wsdl", "wsdl- - link", "openapi", "openapi+json", "openapi-link", "openapi+json-link". + include: "wadl-xml", "wadl-link-json", "swagger-json", "swagger-link-json", "wsdl", + "wsdl-link", "openapi", "openapi+json", "openapi-link", "openapi+json-link", "graphql-link". :type format: str or ~azure.mgmt.apimanagement.models.ContentFormat :param wsdl_selector: Criteria to limit import of WSDL to a subset of the document. :type wsdl_selector: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector - :param soap_api_type: Type of Api to create. + :param soap_api_type: Type of API to create. - * ``http`` creates a SOAP to REST API - * ``soap`` creates a SOAP pass-through API . Possible values include: "http", "soap". + * ``http`` creates a REST API + * ``soap`` creates a SOAP pass-through API + * ``websocket`` creates websocket API + * ``graphql`` creates GraphQL API. Possible values include: "http", "soap", "websocket", + "graphql". :type soap_api_type: str or ~azure.mgmt.apimanagement.models.SoapApiType """ @@ -774,6 +864,9 @@ class ApiCreateOrUpdateParameter(msrest.serialization.Model): 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, + 'terms_of_service_url': {'key': 'properties.termsOfServiceUrl', 'type': 'str'}, + 'contact': {'key': 'properties.contact', 'type': 'ApiContactInformation'}, + 'license': {'key': 'properties.license', 'type': 'ApiLicenseInformation'}, 'source_api_id': {'key': 'properties.sourceApiId', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, @@ -803,6 +896,9 @@ def __init__( self.api_version_description = kwargs.get('api_version_description', None) self.api_version_set_id = kwargs.get('api_version_set_id', None) self.subscription_required = kwargs.get('subscription_required', None) + self.terms_of_service_url = kwargs.get('terms_of_service_url', None) + self.contact = kwargs.get('contact', None) + self.license = kwargs.get('license', None) self.source_api_id = kwargs.get('source_api_id', None) self.display_name = kwargs.get('display_name', None) self.service_url = kwargs.get('service_url', None) @@ -816,7 +912,7 @@ def __init__( class ApiCreateOrUpdateProperties(ApiContractProperties): - """Api Create or Update Properties. + """API Create or Update Properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -829,26 +925,33 @@ class ApiCreateOrUpdateProperties(ApiContractProperties): :param subscription_key_parameter_names: Protocols over which API is made available. :type subscription_key_parameter_names: ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: "http", "soap". + :param api_type: Type of API. Possible values include: "http", "soap", "websocket", "graphql". :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is provided, default + :param api_revision: Describes the revision of the API. If no value is provided, default revision 1 is created. :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API is versioned. + :param api_version: Indicates the version identifier of the API if the API is versioned. :type api_version: str :param is_current: Indicates if API revision is current api revision. :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. + :param api_revision_description: Description of the API Revision. :type api_revision_description: str - :param api_version_description: Description of the Api Version. + :param api_version_description: Description of the API Version. :type api_version_description: str :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str :param subscription_required: Specifies whether an API or Product subscription is required for accessing the API. :type subscription_required: bool + :param terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format + of a URL. + :type terms_of_service_url: str + :param contact: Contact information for the API. + :type contact: ~azure.mgmt.apimanagement.models.ApiContactInformation + :param license: License information for the API. + :type license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation :param source_api_id: API identifier of the source API. :type source_api_id: str :param display_name: API name. Must be 1 to 300 characters long. @@ -867,16 +970,19 @@ class ApiCreateOrUpdateProperties(ApiContractProperties): :param value: Content value when Importing an API. :type value: str :param format: Format of the Content in which the API is getting imported. Possible values - include: "wadl-xml", "wadl-link-json", "swagger-json", "swagger-link-json", "wsdl", "wsdl- - link", "openapi", "openapi+json", "openapi-link", "openapi+json-link". + include: "wadl-xml", "wadl-link-json", "swagger-json", "swagger-link-json", "wsdl", + "wsdl-link", "openapi", "openapi+json", "openapi-link", "openapi+json-link", "graphql-link". :type format: str or ~azure.mgmt.apimanagement.models.ContentFormat :param wsdl_selector: Criteria to limit import of WSDL to a subset of the document. :type wsdl_selector: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector - :param soap_api_type: Type of Api to create. + :param soap_api_type: Type of API to create. - * ``http`` creates a SOAP to REST API - * ``soap`` creates a SOAP pass-through API . Possible values include: "http", "soap". + * ``http`` creates a REST API + * ``soap`` creates a SOAP pass-through API + * ``websocket`` creates websocket API + * ``graphql`` creates GraphQL API. Possible values include: "http", "soap", "websocket", + "graphql". :type soap_api_type: str or ~azure.mgmt.apimanagement.models.SoapApiType """ @@ -904,6 +1010,9 @@ class ApiCreateOrUpdateProperties(ApiContractProperties): 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, + 'terms_of_service_url': {'key': 'termsOfServiceUrl', 'type': 'str'}, + 'contact': {'key': 'contact', 'type': 'ApiContactInformation'}, + 'license': {'key': 'license', 'type': 'ApiLicenseInformation'}, 'source_api_id': {'key': 'sourceApiId', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, 'service_url': {'key': 'serviceUrl', 'type': 'str'}, @@ -955,11 +1064,11 @@ class ApiExportResult(msrest.serialization.Model): :param id: ResourceId of the API which was exported. :type id: str - :param export_result_format: Format in which the Api Details are exported to the Storage Blob - with Sas Key valid for 5 minutes. Possible values include: "swagger-link-json", "wsdl- - link+xml", "wadl-link-json", "openapi-link". + :param export_result_format: Format in which the API Details are exported to the Storage Blob + with Sas Key valid for 5 minutes. Possible values include: "swagger-link-json", + "wsdl-link+xml", "wadl-link-json", "openapi-link". :type export_result_format: str or ~azure.mgmt.apimanagement.models.ExportResultFormat - :param value: The object defining the schema of the exported Api Detail. + :param value: The object defining the schema of the exported API Detail. :type value: ~azure.mgmt.apimanagement.models.ApiExportResultValue """ @@ -980,7 +1089,7 @@ def __init__( class ApiExportResultValue(msrest.serialization.Model): - """The object defining the schema of the exported Api Detail. + """The object defining the schema of the exported API Detail. :param link: Link to the Storage Blob containing the result of the export operation. The Blob Uri is only valid for 5 minutes. @@ -999,6 +1108,29 @@ def __init__( self.link = kwargs.get('link', None) +class ApiLicenseInformation(msrest.serialization.Model): + """API license information. + + :param name: The license name used for the API. + :type name: str + :param url: A URL to the license used for the API. MUST be in the format of a URL. + :type url: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(ApiLicenseInformation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.url = kwargs.get('url', None) + + class ApiManagementServiceApplyNetworkConfigurationParameters(msrest.serialization.Model): """Parameter supplied to the Apply Network configuration operation. @@ -1024,31 +1156,39 @@ class ApiManagementServiceBackupRestoreParameters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param storage_account: Required. Azure Cloud Storage account (used to place/retrieve the - backup) name. + :param storage_account: Required. The name of the Azure storage account (used to place/retrieve + the backup). :type storage_account: str - :param access_key: Required. Azure Cloud Storage account (used to place/retrieve the backup) - access key. - :type access_key: str - :param container_name: Required. Azure Cloud Storage blob container name used to place/retrieve - the backup. + :param container_name: Required. The name of the blob container (used to place/retrieve the + backup). :type container_name: str - :param backup_name: Required. The name of the backup file to create. + :param backup_name: Required. The name of the backup file to create/retrieve. :type backup_name: str + :param access_type: The type of access to be used for the storage account. Possible values + include: "AccessKey", "SystemAssignedManagedIdentity", "UserAssignedManagedIdentity". Default + value: "AccessKey". + :type access_type: str or ~azure.mgmt.apimanagement.models.AccessType + :param access_key: Storage account access key. Required only if ``accessType`` is set to + ``AccessKey``. + :type access_key: str + :param client_id: The Client ID of user assigned managed identity. Required only if + ``accessType`` is set to ``UserAssignedManagedIdentity``. + :type client_id: str """ _validation = { 'storage_account': {'required': True}, - 'access_key': {'required': True}, 'container_name': {'required': True}, 'backup_name': {'required': True}, } _attribute_map = { 'storage_account': {'key': 'storageAccount', 'type': 'str'}, - 'access_key': {'key': 'accessKey', 'type': 'str'}, 'container_name': {'key': 'containerName', 'type': 'str'}, 'backup_name': {'key': 'backupName', 'type': 'str'}, + 'access_type': {'key': 'accessType', 'type': 'str'}, + 'access_key': {'key': 'accessKey', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, } def __init__( @@ -1057,9 +1197,11 @@ def __init__( ): super(ApiManagementServiceBackupRestoreParameters, self).__init__(**kwargs) self.storage_account = kwargs['storage_account'] - self.access_key = kwargs['access_key'] self.container_name = kwargs['container_name'] self.backup_name = kwargs['backup_name'] + self.access_type = kwargs.get('access_type', "AccessKey") + self.access_key = kwargs.get('access_key', None) + self.client_id = kwargs.get('client_id', None) class ApiManagementServiceBaseProperties(msrest.serialization.Model): @@ -1100,6 +1242,15 @@ class ApiManagementServiceBaseProperties(msrest.serialization.Model): service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. :vartype private_ip_addresses: list[str] + :param public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with + Virtual Network deployed service in the region. Supported only for Developer and Premium SKU + being deployed in Virtual Network. + :type public_ip_address_id: str + :param public_network_access: Whether or not public endpoint access is allowed for this API + Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If + 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + Possible values include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.apimanagement.models.PublicNetworkAccess :param virtual_network_configuration: Virtual network configuration of the API Management service. :type virtual_network_configuration: @@ -1188,6 +1339,8 @@ class ApiManagementServiceBaseProperties(msrest.serialization.Model): 'hostname_configurations': {'key': 'hostnameConfigurations', 'type': '[HostnameConfiguration]'}, 'public_ip_addresses': {'key': 'publicIPAddresses', 'type': '[str]'}, 'private_ip_addresses': {'key': 'privateIPAddresses', 'type': '[str]'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, 'virtual_network_configuration': {'key': 'virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, 'additional_locations': {'key': 'additionalLocations', 'type': '[AdditionalLocation]'}, 'custom_properties': {'key': 'customProperties', 'type': '{str}'}, @@ -1217,6 +1370,8 @@ def __init__( self.hostname_configurations = kwargs.get('hostname_configurations', None) self.public_ip_addresses = None self.private_ip_addresses = None + self.public_ip_address_id = kwargs.get('public_ip_address_id', None) + self.public_network_access = kwargs.get('public_network_access', None) self.virtual_network_configuration = kwargs.get('virtual_network_configuration', None) self.additional_locations = kwargs.get('additional_locations', None) self.custom_properties = kwargs.get('custom_properties', None) @@ -1457,6 +1612,15 @@ class ApiManagementServiceProperties(ApiManagementServiceBaseProperties): service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. :vartype private_ip_addresses: list[str] + :param public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with + Virtual Network deployed service in the region. Supported only for Developer and Premium SKU + being deployed in Virtual Network. + :type public_ip_address_id: str + :param public_network_access: Whether or not public endpoint access is allowed for this API + Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If + 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + Possible values include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.apimanagement.models.PublicNetworkAccess :param virtual_network_configuration: Virtual network configuration of the API Management service. :type virtual_network_configuration: @@ -1551,6 +1715,8 @@ class ApiManagementServiceProperties(ApiManagementServiceBaseProperties): 'hostname_configurations': {'key': 'hostnameConfigurations', 'type': '[HostnameConfiguration]'}, 'public_ip_addresses': {'key': 'publicIPAddresses', 'type': '[str]'}, 'private_ip_addresses': {'key': 'privateIPAddresses', 'type': '[str]'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, 'virtual_network_configuration': {'key': 'virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, 'additional_locations': {'key': 'additionalLocations', 'type': '[AdditionalLocation]'}, 'custom_properties': {'key': 'customProperties', 'type': '{str}'}, @@ -1631,6 +1797,8 @@ class ApiManagementServiceResource(ApimResource): :type sku: ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties :param identity: Managed service identity of the Api Management service. :type identity: ~azure.mgmt.apimanagement.models.ApiManagementServiceIdentity + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData :param location: Required. Resource location. :type location: str :ivar etag: ETag of the resource. @@ -1670,6 +1838,15 @@ class ApiManagementServiceResource(ApimResource): service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. :vartype private_ip_addresses: list[str] + :param public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with + Virtual Network deployed service in the region. Supported only for Developer and Premium SKU + being deployed in Virtual Network. + :type public_ip_address_id: str + :param public_network_access: Whether or not public endpoint access is allowed for this API + Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If + 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + Possible values include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.apimanagement.models.PublicNetworkAccess :param virtual_network_configuration: Virtual network configuration of the API Management service. :type virtual_network_configuration: @@ -1738,6 +1915,7 @@ class ApiManagementServiceResource(ApimResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'sku': {'required': True}, + 'system_data': {'readonly': True}, 'location': {'required': True}, 'etag': {'readonly': True}, 'notification_sender_email': {'max_length': 100, 'min_length': 0}, @@ -1763,6 +1941,7 @@ class ApiManagementServiceResource(ApimResource): 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'ApiManagementServiceSkuProperties'}, 'identity': {'key': 'identity', 'type': 'ApiManagementServiceIdentity'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'location': {'key': 'location', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'zones': {'key': 'zones', 'type': '[str]'}, @@ -1779,6 +1958,8 @@ class ApiManagementServiceResource(ApimResource): 'hostname_configurations': {'key': 'properties.hostnameConfigurations', 'type': '[HostnameConfiguration]'}, 'public_ip_addresses': {'key': 'properties.publicIPAddresses', 'type': '[str]'}, 'private_ip_addresses': {'key': 'properties.privateIPAddresses', 'type': '[str]'}, + 'public_ip_address_id': {'key': 'properties.publicIpAddressId', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'virtual_network_configuration': {'key': 'properties.virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, 'additional_locations': {'key': 'properties.additionalLocations', 'type': '[AdditionalLocation]'}, 'custom_properties': {'key': 'properties.customProperties', 'type': '{str}'}, @@ -1799,6 +1980,7 @@ def __init__( super(ApiManagementServiceResource, self).__init__(**kwargs) self.sku = kwargs['sku'] self.identity = kwargs.get('identity', None) + self.system_data = None self.location = kwargs['location'] self.etag = None self.zones = kwargs.get('zones', None) @@ -1815,6 +1997,8 @@ def __init__( self.hostname_configurations = kwargs.get('hostname_configurations', None) self.public_ip_addresses = None self.private_ip_addresses = None + self.public_ip_address_id = kwargs.get('public_ip_address_id', None) + self.public_network_access = kwargs.get('public_network_access', None) self.virtual_network_configuration = kwargs.get('virtual_network_configuration', None) self.additional_locations = kwargs.get('additional_locations', None) self.custom_properties = kwargs.get('custom_properties', None) @@ -1912,6 +2096,15 @@ class ApiManagementServiceUpdateParameters(ApimResource): service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. :vartype private_ip_addresses: list[str] + :param public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with + Virtual Network deployed service in the region. Supported only for Developer and Premium SKU + being deployed in Virtual Network. + :type public_ip_address_id: str + :param public_network_access: Whether or not public endpoint access is allowed for this API + Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If + 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + Possible values include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.apimanagement.models.PublicNetworkAccess :param virtual_network_configuration: Virtual network configuration of the API Management service. :type virtual_network_configuration: @@ -2017,6 +2210,8 @@ class ApiManagementServiceUpdateParameters(ApimResource): 'hostname_configurations': {'key': 'properties.hostnameConfigurations', 'type': '[HostnameConfiguration]'}, 'public_ip_addresses': {'key': 'properties.publicIPAddresses', 'type': '[str]'}, 'private_ip_addresses': {'key': 'properties.privateIPAddresses', 'type': '[str]'}, + 'public_ip_address_id': {'key': 'properties.publicIpAddressId', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'virtual_network_configuration': {'key': 'properties.virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, 'additional_locations': {'key': 'properties.additionalLocations', 'type': '[AdditionalLocation]'}, 'custom_properties': {'key': 'properties.customProperties', 'type': '{str}'}, @@ -2051,6 +2246,8 @@ def __init__( self.hostname_configurations = kwargs.get('hostname_configurations', None) self.public_ip_addresses = None self.private_ip_addresses = None + self.public_ip_address_id = kwargs.get('public_ip_address_id', None) + self.public_network_access = kwargs.get('public_network_access', None) self.virtual_network_configuration = kwargs.get('virtual_network_configuration', None) self.additional_locations = kwargs.get('additional_locations', None) self.custom_properties = kwargs.get('custom_properties', None) @@ -2102,6 +2299,15 @@ class ApiManagementServiceUpdateProperties(ApiManagementServiceBaseProperties): service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. :vartype private_ip_addresses: list[str] + :param public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with + Virtual Network deployed service in the region. Supported only for Developer and Premium SKU + being deployed in Virtual Network. + :type public_ip_address_id: str + :param public_network_access: Whether or not public endpoint access is allowed for this API + Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If + 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + Possible values include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.apimanagement.models.PublicNetworkAccess :param virtual_network_configuration: Virtual network configuration of the API Management service. :type virtual_network_configuration: @@ -2196,6 +2402,8 @@ class ApiManagementServiceUpdateProperties(ApiManagementServiceBaseProperties): 'hostname_configurations': {'key': 'hostnameConfigurations', 'type': '[HostnameConfiguration]'}, 'public_ip_addresses': {'key': 'publicIPAddresses', 'type': '[str]'}, 'private_ip_addresses': {'key': 'privateIPAddresses', 'type': '[str]'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, 'virtual_network_configuration': {'key': 'virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, 'additional_locations': {'key': 'additionalLocations', 'type': '[AdditionalLocation]'}, 'custom_properties': {'key': 'customProperties', 'type': '{str}'}, @@ -2671,7 +2879,7 @@ def __init__( class ApiRevisionCollection(msrest.serialization.Model): - """Paged Api Revision list representation. + """Paged API Revision list representation. Variables are only populated by the server, and will be ignored when sending a request. @@ -2814,26 +3022,33 @@ class ApiTagResourceContractProperties(ApiEntityBaseContract): :param subscription_key_parameter_names: Protocols over which API is made available. :type subscription_key_parameter_names: ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: "http", "soap". + :param api_type: Type of API. Possible values include: "http", "soap", "websocket", "graphql". :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is provided, default + :param api_revision: Describes the revision of the API. If no value is provided, default revision 1 is created. :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API is versioned. + :param api_version: Indicates the version identifier of the API if the API is versioned. :type api_version: str :param is_current: Indicates if API revision is current api revision. :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. + :param api_revision_description: Description of the API Revision. :type api_revision_description: str - :param api_version_description: Description of the Api Version. + :param api_version_description: Description of the API Version. :type api_version_description: str :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str :param subscription_required: Specifies whether an API or Product subscription is required for accessing the API. :type subscription_required: bool + :param terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format + of a URL. + :type terms_of_service_url: str + :param contact: Contact information for the API. + :type contact: ~azure.mgmt.apimanagement.models.ApiContactInformation + :param license: License information for the API. + :type license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation :param id: API identifier in the form /apis/{apiId}. :type id: str :param name: API name. @@ -2872,6 +3087,9 @@ class ApiTagResourceContractProperties(ApiEntityBaseContract): 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, + 'terms_of_service_url': {'key': 'termsOfServiceUrl', 'type': 'str'}, + 'contact': {'key': 'contact', 'type': 'ApiContactInformation'}, + 'license': {'key': 'license', 'type': 'ApiLicenseInformation'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'service_url': {'key': 'serviceUrl', 'type': 'str'}, @@ -2903,26 +3121,33 @@ class ApiUpdateContract(msrest.serialization.Model): :param subscription_key_parameter_names: Protocols over which API is made available. :type subscription_key_parameter_names: ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: "http", "soap". + :param api_type: Type of API. Possible values include: "http", "soap", "websocket", "graphql". :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is provided, default + :param api_revision: Describes the revision of the API. If no value is provided, default revision 1 is created. :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API is versioned. + :param api_version: Indicates the version identifier of the API if the API is versioned. :type api_version: str :param is_current: Indicates if API revision is current api revision. :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. + :param api_revision_description: Description of the API Revision. :type api_revision_description: str - :param api_version_description: Description of the Api Version. + :param api_version_description: Description of the API Version. :type api_version_description: str :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str :param subscription_required: Specifies whether an API or Product subscription is required for accessing the API. :type subscription_required: bool + :param terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format + of a URL. + :type terms_of_service_url: str + :param contact: Contact information for the API. + :type contact: ~azure.mgmt.apimanagement.models.ApiContactInformation + :param license: License information for the API. + :type license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation :param display_name: API name. :type display_name: str :param service_url: Absolute URL of the backend service implementing this API. @@ -2959,6 +3184,9 @@ class ApiUpdateContract(msrest.serialization.Model): 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, + 'terms_of_service_url': {'key': 'properties.termsOfServiceUrl', 'type': 'str'}, + 'contact': {'key': 'properties.contact', 'type': 'ApiContactInformation'}, + 'license': {'key': 'properties.license', 'type': 'ApiLicenseInformation'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, 'path': {'key': 'properties.path', 'type': 'str'}, @@ -2982,6 +3210,9 @@ def __init__( self.api_version_description = kwargs.get('api_version_description', None) self.api_version_set_id = kwargs.get('api_version_set_id', None) self.subscription_required = kwargs.get('subscription_required', None) + self.terms_of_service_url = kwargs.get('terms_of_service_url', None) + self.contact = kwargs.get('contact', None) + self.license = kwargs.get('license', None) self.display_name = kwargs.get('display_name', None) self.service_url = kwargs.get('service_url', None) self.path = kwargs.get('path', None) @@ -3009,7 +3240,7 @@ def __init__( class ApiVersionSetCollection(msrest.serialization.Model): - """Paged Api Version Set list representation. + """Paged API Version Set list representation. :param value: Page values. :type value: list[~azure.mgmt.apimanagement.models.ApiVersionSetContract] @@ -3036,7 +3267,7 @@ def __init__( class ApiVersionSetContract(Resource): - """Api Version Set Contract details. + """API Version Set Contract details. Variables are only populated by the server, and will be ignored when sending a request. @@ -3138,7 +3369,7 @@ def __init__( class ApiVersionSetEntityBase(msrest.serialization.Model): - """Api Version set base parameters. + """API Version set base parameters. :param description: Description of API Version Set. :type description: str @@ -3216,7 +3447,7 @@ def __init__( class ApiVersionSetUpdateParameters(msrest.serialization.Model): - """Parameters to update or create an Api Version Set Contract. + """Parameters to update or create an API Version Set Contract. :param description: Description of API Version Set. :type description: str @@ -3311,15 +3542,15 @@ class AssociationContract(Resource): :vartype name: str :ivar type: Resource type for API Management resource. :vartype type: str - :ivar provisioning_state: Provisioning state. Default value: "created". - :vartype provisioning_state: str + :param provisioning_state: Provisioning state. The only acceptable values to pass in are None + and "created". The default value is None. + :type provisioning_state: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'provisioning_state': {'constant': True}, } _attribute_map = { @@ -3329,13 +3560,12 @@ class AssociationContract(Resource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - provisioning_state = "created" - def __init__( self, **kwargs ): super(AssociationContract, self).__init__(**kwargs) + self.provisioning_state = kwargs.get('provisioning_state', None) class AuthenticationSettingsContract(msrest.serialization.Model): @@ -3421,8 +3651,8 @@ class AuthorizationServerContract(Resource): security. :type support_state: bool :param default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing space- - delimited values. + overridden at the API level. Should be provided in the form of a string containing + space-delimited values. :type default_scope: str :param bearer_token_sending_methods: Specifies the mechanism by which access token is passed to the API. @@ -3531,8 +3761,8 @@ class AuthorizationServerContractBaseProperties(msrest.serialization.Model): security. :type support_state: bool :param default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing space- - delimited values. + overridden at the API level. Should be provided in the form of a string containing + space-delimited values. :type default_scope: str :param bearer_token_sending_methods: Specifies the mechanism by which access token is passed to the API. @@ -3603,8 +3833,8 @@ class AuthorizationServerContractProperties(AuthorizationServerContractBasePrope security. :type support_state: bool :param default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing space- - delimited values. + overridden at the API level. Should be provided in the form of a string containing + space-delimited values. :type default_scope: str :param bearer_token_sending_methods: Specifies the mechanism by which access token is passed to the API. @@ -3738,8 +3968,8 @@ class AuthorizationServerUpdateContract(Resource): security. :type support_state: bool :param default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing space- - delimited values. + overridden at the API level. Should be provided in the form of a string containing + space-delimited values. :type default_scope: str :param bearer_token_sending_methods: Specifies the mechanism by which access token is passed to the API. @@ -3848,8 +4078,8 @@ class AuthorizationServerUpdateContractProperties(AuthorizationServerContractBas security. :type support_state: bool :param default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing space- - delimited values. + overridden at the API level. Should be provided in the form of a string containing + space-delimited values. :type default_scope: str :param bearer_token_sending_methods: Specifies the mechanism by which access token is passed to the API. @@ -3955,7 +4185,7 @@ class BackendBaseParameters(msrest.serialization.Model): :param description: Backend Description. :type description: str :param resource_id: Management Uri of the Resource in External System. This url can be the Arm - Resource Id of Logic Apps, Function Apps or Api Apps. + Resource Id of Logic Apps, Function Apps or API Apps. :type resource_id: str :param properties: Backend Properties contract. :type properties: ~azure.mgmt.apimanagement.models.BackendProperties @@ -4040,7 +4270,7 @@ class BackendContract(Resource): :param description: Backend Description. :type description: str :param resource_id: Management Uri of the Resource in External System. This url can be the Arm - Resource Id of Logic Apps, Function Apps or Api Apps. + Resource Id of Logic Apps, Function Apps or API Apps. :type resource_id: str :param properties: Backend Properties contract. :type properties: ~azure.mgmt.apimanagement.models.BackendProperties @@ -4107,7 +4337,7 @@ class BackendContractProperties(BackendBaseParameters): :param description: Backend Description. :type description: str :param resource_id: Management Uri of the Resource in External System. This url can be the Arm - Resource Id of Logic Apps, Function Apps or Api Apps. + Resource Id of Logic Apps, Function Apps or API Apps. :type resource_id: str :param properties: Backend Properties contract. :type properties: ~azure.mgmt.apimanagement.models.BackendProperties @@ -4366,7 +4596,7 @@ class BackendUpdateParameterProperties(BackendBaseParameters): :param description: Backend Description. :type description: str :param resource_id: Management Uri of the Resource in External System. This url can be the Arm - Resource Id of Logic Apps, Function Apps or Api Apps. + Resource Id of Logic Apps, Function Apps or API Apps. :type resource_id: str :param properties: Backend Properties contract. :type properties: ~azure.mgmt.apimanagement.models.BackendProperties @@ -4418,7 +4648,7 @@ class BackendUpdateParameters(msrest.serialization.Model): :param description: Backend Description. :type description: str :param resource_id: Management Uri of the Resource in External System. This url can be the Arm - Resource Id of Logic Apps, Function Apps or Api Apps. + Resource Id of Logic Apps, Function Apps or API Apps. :type resource_id: str :param properties: Backend Properties contract. :type properties: ~azure.mgmt.apimanagement.models.BackendProperties @@ -4808,6 +5038,307 @@ def __init__( self.client_secret = kwargs.get('client_secret', None) +class ConnectivityCheckRequest(msrest.serialization.Model): + """A request to perform the connectivity check operation on a API Management service. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. Definitions about the connectivity check origin. + :type source: ~azure.mgmt.apimanagement.models.ConnectivityCheckRequestSource + :param destination: Required. The connectivity check operation destination. + :type destination: ~azure.mgmt.apimanagement.models.ConnectivityCheckRequestDestination + :param preferred_ip_version: The IP version to be used. Only IPv4 is supported for now. + Possible values include: "IPv4". + :type preferred_ip_version: str or ~azure.mgmt.apimanagement.models.PreferredIPVersion + :param protocol: The request's protocol. Specific protocol configuration can be available based + on this selection. The specified destination address must be coherent with this value. Possible + values include: "TCP", "HTTP", "HTTPS". + :type protocol: str or ~azure.mgmt.apimanagement.models.ConnectivityCheckProtocol + :param protocol_configuration: Protocol-specific configuration. + :type protocol_configuration: + ~azure.mgmt.apimanagement.models.ConnectivityCheckRequestProtocolConfiguration + """ + + _validation = { + 'source': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'ConnectivityCheckRequestSource'}, + 'destination': {'key': 'destination', 'type': 'ConnectivityCheckRequestDestination'}, + 'preferred_ip_version': {'key': 'preferredIPVersion', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'protocol_configuration': {'key': 'protocolConfiguration', 'type': 'ConnectivityCheckRequestProtocolConfiguration'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityCheckRequest, self).__init__(**kwargs) + self.source = kwargs['source'] + self.destination = kwargs['destination'] + self.preferred_ip_version = kwargs.get('preferred_ip_version', None) + self.protocol = kwargs.get('protocol', None) + self.protocol_configuration = kwargs.get('protocol_configuration', None) + + +class ConnectivityCheckRequestDestination(msrest.serialization.Model): + """The connectivity check operation destination. + + All required parameters must be populated in order to send to Azure. + + :param address: Required. Destination address. Can either be an IP address or a FQDN. + :type address: str + :param port: Required. Destination port. + :type port: long + """ + + _validation = { + 'address': {'required': True}, + 'port': {'required': True}, + } + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityCheckRequestDestination, self).__init__(**kwargs) + self.address = kwargs['address'] + self.port = kwargs['port'] + + +class ConnectivityCheckRequestProtocolConfiguration(msrest.serialization.Model): + """Protocol-specific configuration. + + :param http_configuration: Configuration for HTTP or HTTPS requests. + :type http_configuration: + ~azure.mgmt.apimanagement.models.ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration + """ + + _attribute_map = { + 'http_configuration': {'key': 'HTTPConfiguration', 'type': 'ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityCheckRequestProtocolConfiguration, self).__init__(**kwargs) + self.http_configuration = kwargs.get('http_configuration', None) + + +class ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration(msrest.serialization.Model): + """Configuration for HTTP or HTTPS requests. + + :param method: The HTTP method to be used. Possible values include: "GET", "POST". + :type method: str or ~azure.mgmt.apimanagement.models.Method + :param valid_status_codes: List of HTTP status codes considered valid for the request response. + :type valid_status_codes: list[long] + :param headers: List of headers to be included in the request. + :type headers: list[~azure.mgmt.apimanagement.models.HTTPHeader] + """ + + _attribute_map = { + 'method': {'key': 'method', 'type': 'str'}, + 'valid_status_codes': {'key': 'validStatusCodes', 'type': '[long]'}, + 'headers': {'key': 'headers', 'type': '[HTTPHeader]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration, self).__init__(**kwargs) + self.method = kwargs.get('method', None) + self.valid_status_codes = kwargs.get('valid_status_codes', None) + self.headers = kwargs.get('headers', None) + + +class ConnectivityCheckRequestSource(msrest.serialization.Model): + """Definitions about the connectivity check origin. + + All required parameters must be populated in order to send to Azure. + + :param region: Required. The API Management service region from where to start the connectivity + check operation. + :type region: str + :param instance: The particular VMSS instance from which to fire the request. + :type instance: long + """ + + _validation = { + 'region': {'required': True}, + } + + _attribute_map = { + 'region': {'key': 'region', 'type': 'str'}, + 'instance': {'key': 'instance', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityCheckRequestSource, self).__init__(**kwargs) + self.region = kwargs['region'] + self.instance = kwargs.get('instance', None) + + +class ConnectivityCheckResponse(msrest.serialization.Model): + """Information on the connectivity status. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar hops: List of hops between the source and the destination. + :vartype hops: list[~azure.mgmt.apimanagement.models.ConnectivityHop] + :ivar connection_status: The connection status. Possible values include: "Unknown", + "Connected", "Disconnected", "Degraded". + :vartype connection_status: str or ~azure.mgmt.apimanagement.models.ConnectionStatus + :ivar avg_latency_in_ms: Average latency in milliseconds. + :vartype avg_latency_in_ms: long + :ivar min_latency_in_ms: Minimum latency in milliseconds. + :vartype min_latency_in_ms: long + :ivar max_latency_in_ms: Maximum latency in milliseconds. + :vartype max_latency_in_ms: long + :ivar probes_sent: Total number of probes sent. + :vartype probes_sent: long + :ivar probes_failed: Number of failed probes. + :vartype probes_failed: long + """ + + _validation = { + 'hops': {'readonly': True}, + 'connection_status': {'readonly': True}, + 'avg_latency_in_ms': {'readonly': True}, + 'min_latency_in_ms': {'readonly': True}, + 'max_latency_in_ms': {'readonly': True}, + 'probes_sent': {'readonly': True}, + 'probes_failed': {'readonly': True}, + } + + _attribute_map = { + 'hops': {'key': 'hops', 'type': '[ConnectivityHop]'}, + 'connection_status': {'key': 'connectionStatus', 'type': 'str'}, + 'avg_latency_in_ms': {'key': 'avgLatencyInMs', 'type': 'long'}, + 'min_latency_in_ms': {'key': 'minLatencyInMs', 'type': 'long'}, + 'max_latency_in_ms': {'key': 'maxLatencyInMs', 'type': 'long'}, + 'probes_sent': {'key': 'probesSent', 'type': 'long'}, + 'probes_failed': {'key': 'probesFailed', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityCheckResponse, self).__init__(**kwargs) + self.hops = None + self.connection_status = None + self.avg_latency_in_ms = None + self.min_latency_in_ms = None + self.max_latency_in_ms = None + self.probes_sent = None + self.probes_failed = None + + +class ConnectivityHop(msrest.serialization.Model): + """Information about a hop between the source and the destination. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The type of the hop. + :vartype type: str + :ivar id: The ID of the hop. + :vartype id: str + :ivar address: The IP address of the hop. + :vartype address: str + :ivar resource_id: The ID of the resource corresponding to this hop. + :vartype resource_id: str + :ivar next_hop_ids: List of next hop identifiers. + :vartype next_hop_ids: list[str] + :ivar issues: List of issues. + :vartype issues: list[~azure.mgmt.apimanagement.models.ConnectivityIssue] + """ + + _validation = { + 'type': {'readonly': True}, + 'id': {'readonly': True}, + 'address': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'next_hop_ids': {'readonly': True}, + 'issues': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'next_hop_ids': {'key': 'nextHopIds', 'type': '[str]'}, + 'issues': {'key': 'issues', 'type': '[ConnectivityIssue]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityHop, self).__init__(**kwargs) + self.type = None + self.id = None + self.address = None + self.resource_id = None + self.next_hop_ids = None + self.issues = None + + +class ConnectivityIssue(msrest.serialization.Model): + """Information about an issue encountered in the process of checking for connectivity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar origin: The origin of the issue. Possible values include: "Local", "Inbound", "Outbound". + :vartype origin: str or ~azure.mgmt.apimanagement.models.Origin + :ivar severity: The severity of the issue. Possible values include: "Error", "Warning". + :vartype severity: str or ~azure.mgmt.apimanagement.models.Severity + :ivar type: The type of issue. Possible values include: "Unknown", "AgentStopped", + "GuestFirewall", "DnsResolution", "SocketBind", "NetworkSecurityRule", "UserDefinedRoute", + "PortThrottled", "Platform". + :vartype type: str or ~azure.mgmt.apimanagement.models.IssueType + :ivar context: Provides additional context on the issue. + :vartype context: list[dict[str, str]] + """ + + _validation = { + 'origin': {'readonly': True}, + 'severity': {'readonly': True}, + 'type': {'readonly': True}, + 'context': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'severity': {'key': 'severity', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'context': {'key': 'context', 'type': '[{str}]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityIssue, self).__init__(**kwargs) + self.origin = None + self.severity = None + self.type = None + self.context = None + + class ConnectivityStatusContract(msrest.serialization.Model): """Details about connectivity to a resource. @@ -4912,7 +5443,7 @@ class ContentItemContract(Resource): :ivar type: Resource type for API Management resource. :vartype type: str :param properties: Properties of the content item. - :type properties: dict[str, object] + :type properties: dict[str, any] """ _validation = { @@ -4984,7 +5515,7 @@ class ContentTypeContract(Resource): :param description: Content type description. :type description: str :param schema: Content type schema. - :type schema: object + :type schema: any :param version: Content type version. :type version: str """ @@ -5065,7 +5596,7 @@ def __init__( class DeletedServiceContract(Resource): - """Deleted Api Management Service information. + """Deleted API Management Service information. Variables are only populated by the server, and will be ignored when sending a request. @@ -5075,7 +5606,7 @@ class DeletedServiceContract(Resource): :vartype name: str :ivar type: Resource type for API Management resource. :vartype type: str - :ivar location: Api Management Service Master Location. + :ivar location: API Management Service Master Location. :vartype location: str :param service_id: Fully-qualified API Management Service Resource ID. :type service_id: str @@ -5117,7 +5648,7 @@ def __init__( class DeletedServicesCollection(msrest.serialization.Model): - """Paged deleted Api Management Services List Representation. + """Paged deleted API Management Services List Representation. Variables are only populated by the server, and will be ignored when sending a request. @@ -5317,7 +5848,7 @@ class EmailTemplateContract(Resource): :type title: str :param description: Description of the Email Template. :type description: str - :ivar is_default: Whether the template is the default template provided by Api Management or + :ivar is_default: Whether the template is the default template provided by API Management or has been edited. :vartype is_default: bool :param parameters: Email Template Parameter values. @@ -5433,6 +5964,52 @@ def __init__( self.parameters = kwargs.get('parameters', None) +class EndpointDependency(msrest.serialization.Model): + """A domain name that a service is reached at. + + :param domain_name: The domain name of the dependency. + :type domain_name: str + :param endpoint_details: The Ports used when connecting to DomainName. + :type endpoint_details: list[~azure.mgmt.apimanagement.models.EndpointDetail] + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'endpoint_details': {'key': 'endpointDetails', 'type': '[EndpointDetail]'}, + } + + def __init__( + self, + **kwargs + ): + super(EndpointDependency, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.endpoint_details = kwargs.get('endpoint_details', None) + + +class EndpointDetail(msrest.serialization.Model): + """Current TCP connectivity information from the Api Management Service to a single endpoint. + + :param port: The port an endpoint is connected to. + :type port: int + :param region: The region of the dependency. + :type region: str + """ + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + 'region': {'key': 'region', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(EndpointDetail, self).__init__(**kwargs) + self.port = kwargs.get('port', None) + self.region = kwargs.get('region', None) + + class ErrorFieldContract(msrest.serialization.Model): """Error Field contract. @@ -6105,6 +6682,12 @@ class HostnameConfiguration(msrest.serialization.Model): :type negotiate_client_certificate: bool :param certificate: Certificate information. :type certificate: ~azure.mgmt.apimanagement.models.CertificateInformation + :param certificate_source: Certificate Source. Possible values include: "Managed", "KeyVault", + "Custom", "BuiltIn". + :type certificate_source: str or ~azure.mgmt.apimanagement.models.CertificateSource + :param certificate_status: Certificate Status. Possible values include: "Completed", "Failed", + "InProgress". + :type certificate_status: str or ~azure.mgmt.apimanagement.models.CertificateStatus """ _validation = { @@ -6122,6 +6705,8 @@ class HostnameConfiguration(msrest.serialization.Model): 'default_ssl_binding': {'key': 'defaultSslBinding', 'type': 'bool'}, 'negotiate_client_certificate': {'key': 'negotiateClientCertificate', 'type': 'bool'}, 'certificate': {'key': 'certificate', 'type': 'CertificateInformation'}, + 'certificate_source': {'key': 'certificateSource', 'type': 'str'}, + 'certificate_status': {'key': 'certificateStatus', 'type': 'str'}, } def __init__( @@ -6138,6 +6723,38 @@ def __init__( self.default_ssl_binding = kwargs.get('default_ssl_binding', False) self.negotiate_client_certificate = kwargs.get('negotiate_client_certificate', False) self.certificate = kwargs.get('certificate', None) + self.certificate_source = kwargs.get('certificate_source', None) + self.certificate_status = kwargs.get('certificate_status', None) + + +class HTTPHeader(msrest.serialization.Model): + """HTTP header and it's value. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Header name. + :type name: str + :param value: Required. Header value. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(HTTPHeader, self).__init__(**kwargs) + self.name = kwargs['name'] + self.value = kwargs['value'] class HttpMessageDiagnostic(msrest.serialization.Model): @@ -7092,7 +7709,7 @@ class KeyVaultContractCreateProperties(msrest.serialization.Model): """Create keyVault contract details. :param secret_identifier: Key vault secret identifier for fetching secret. Providing a - versioned secret will prevent auto-refresh. This requires Api Management service to be + versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi. :type secret_identifier: str :param identity_client_id: SystemAssignedIdentity or UserAssignedIdentity Client Id which will @@ -7118,7 +7735,7 @@ class KeyVaultContractProperties(KeyVaultContractCreateProperties): """KeyVault contract details. :param secret_identifier: Key vault secret identifier for fetching secret. Providing a - versioned secret will prevent auto-refresh. This requires Api Management service to be + versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi. :type secret_identifier: str :param identity_client_id: SystemAssignedIdentity or UserAssignedIdentity Client Id which will @@ -7969,7 +8586,7 @@ class Operation(msrest.serialization.Model): :param origin: The operation origin. :type origin: str :param properties: The operation properties. - :type properties: object + :type properties: any """ _attribute_map = { @@ -8025,7 +8642,7 @@ def __init__( class OperationContract(Resource): - """Api Operation details. + """API Operation details. Variables are only populated by the server, and will be ignored when sending a request. @@ -8094,7 +8711,7 @@ def __init__( class OperationEntityBaseContract(msrest.serialization.Model): - """Api Operation Entity Base Contract details. + """API Operation Entity Base Contract details. :param template_parameters: Collection of URL template parameters. :type template_parameters: list[~azure.mgmt.apimanagement.models.ParameterContract] @@ -8239,13 +8856,19 @@ def __init__( self.next_link = kwargs.get('next_link', None) -class OperationResultContract(msrest.serialization.Model): - """Operation Result. +class OperationResultContract(Resource): + """Long Running Git Operation Results. Variables are only populated by the server, and will be ignored when sending a request. - :param id: Operation result identifier. - :type id: str + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param id_properties_id: Operation result identifier. + :type id_properties_id: str :param status: Status of an async operation. Possible values include: "Started", "InProgress", "Succeeded", "Failed". :type status: str or ~azure.mgmt.apimanagement.models.AsyncOperationStatus @@ -8266,17 +8889,23 @@ class OperationResultContract(msrest.serialization.Model): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'action_log': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'started': {'key': 'started', 'type': 'iso-8601'}, - 'updated': {'key': 'updated', 'type': 'iso-8601'}, - 'result_info': {'key': 'resultInfo', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, - 'action_log': {'key': 'actionLog', 'type': '[OperationResultLogItemContract]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'id_properties_id': {'key': 'properties.id', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'started': {'key': 'properties.started', 'type': 'iso-8601'}, + 'updated': {'key': 'properties.updated', 'type': 'iso-8601'}, + 'result_info': {'key': 'properties.resultInfo', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'ErrorResponseBody'}, + 'action_log': {'key': 'properties.actionLog', 'type': '[OperationResultLogItemContract]'}, } def __init__( @@ -8284,7 +8913,7 @@ def __init__( **kwargs ): super(OperationResultContract, self).__init__(**kwargs) - self.id = kwargs.get('id', None) + self.id_properties_id = kwargs.get('id_properties_id', None) self.status = kwargs.get('status', None) self.started = kwargs.get('started', None) self.updated = kwargs.get('updated', None) @@ -8329,11 +8958,11 @@ class OperationTagResourceContractProperties(msrest.serialization.Model): :type id: str :ivar name: Operation name. :vartype name: str - :ivar api_name: Api Name. + :ivar api_name: API Name. :vartype api_name: str - :ivar api_revision: Api Revision. + :ivar api_revision: API Revision. :vartype api_revision: str - :ivar api_version: Api Version. + :ivar api_version: API Version. :vartype api_version: str :ivar description: Operation Description. :vartype description: str @@ -8382,7 +9011,7 @@ def __init__( class OperationUpdateContract(msrest.serialization.Model): - """Api Operation Update Contract details. + """API Operation Update Contract details. :param template_parameters: Collection of URL template parameters. :type template_parameters: list[~azure.mgmt.apimanagement.models.ParameterContract] @@ -8486,6 +9115,62 @@ def __init__( self.url_template = kwargs.get('url_template', None) +class OutboundEnvironmentEndpoint(msrest.serialization.Model): + """Endpoints accessed for a common purpose that the Api Management Service requires outbound network access to. + + :param category: The type of service accessed by the Api Management Service, e.g., Azure + Storage, Azure SQL Database, and Azure Active Directory. + :type category: str + :param endpoints: The endpoints that the Api Management Service reaches the service at. + :type endpoints: list[~azure.mgmt.apimanagement.models.EndpointDependency] + """ + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'endpoints': {'key': 'endpoints', 'type': '[EndpointDependency]'}, + } + + def __init__( + self, + **kwargs + ): + super(OutboundEnvironmentEndpoint, self).__init__(**kwargs) + self.category = kwargs.get('category', None) + self.endpoints = kwargs.get('endpoints', None) + + +class OutboundEnvironmentEndpointList(msrest.serialization.Model): + """Collection of Outbound Environment Endpoints. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.apimanagement.models.OutboundEnvironmentEndpoint] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OutboundEnvironmentEndpoint]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(OutboundEnvironmentEndpointList, self).__init__(**kwargs) + self.value = kwargs['value'] + self.next_link = None + + class ParameterContract(msrest.serialization.Model): """Operation parameters details. @@ -8503,6 +9188,10 @@ class ParameterContract(msrest.serialization.Model): :type required: bool :param values: Parameter values. :type values: list[str] + :param schema_id: Schema identifier. + :type schema_id: str + :param type_name: Type name defined by the schema. + :type type_name: str """ _validation = { @@ -8517,6 +9206,8 @@ class ParameterContract(msrest.serialization.Model): 'default_value': {'key': 'defaultValue', 'type': 'str'}, 'required': {'key': 'required', 'type': 'bool'}, 'values': {'key': 'values', 'type': '[str]'}, + 'schema_id': {'key': 'schemaId', 'type': 'str'}, + 'type_name': {'key': 'typeName', 'type': 'str'}, } def __init__( @@ -8530,6 +9221,8 @@ def __init__( self.default_value = kwargs.get('default_value', None) self.required = kwargs.get('required', None) self.values = kwargs.get('values', None) + self.schema_id = kwargs.get('schema_id', None) + self.type_name = kwargs.get('type_name', None) class PipelineDiagnosticSettings(msrest.serialization.Model): @@ -8769,7 +9462,7 @@ def __init__( class PortalRevisionContract(Resource): - """Portal revisions contract details. + """Portal Revision's contract details. Variables are only populated by the server, and will be ignored when sending a request. @@ -8783,12 +9476,12 @@ class PortalRevisionContract(Resource): :type description: str :ivar status_details: Portal revision publishing status details. :vartype status_details: str - :ivar status: Portal revision publishing status. Possible values include: "pending", + :ivar status: Status of the portal's revision. Possible values include: "pending", "publishing", "completed", "failed". :vartype status: str or ~azure.mgmt.apimanagement.models.PortalRevisionStatus - :param is_current: Indicates if the Portal Revision is public. + :param is_current: Indicates if the portal's revision is public. :type is_current: bool - :ivar created_date_time: Portal revision creation date and time. + :ivar created_date_time: Portal's revision creation date and time. :vartype created_date_time: ~datetime.datetime :ivar updated_date_time: Last updated date and time. :vartype updated_date_time: ~datetime.datetime @@ -10395,7 +11088,7 @@ class SchemaCollection(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: Api Schema Contract value. + :ivar value: API Schema Contract value. :vartype value: list[~azure.mgmt.apimanagement.models.SchemaContract] :param count: Total record count number. :type count: long @@ -10442,11 +11135,8 @@ class SchemaContract(Resource): ``application/vnd.oai.openapi.components+json``
- ``WADL Schema`` use ``application/vnd.ms-azure-apim.wadl.grammars+xml``. :type content_type: str - :param value: Json escaped string defining the document representing the Schema. Used for - schemas other than Swagger/OpenAPI. - :type value: str - :param definitions: Types definitions. Used for Swagger/OpenAPI schemas only, null otherwise. - :type definitions: object + :param document: Create or update Properties of the Schema Document. + :type document: any """ _validation = { @@ -10460,8 +11150,7 @@ class SchemaContract(Resource): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'content_type': {'key': 'properties.contentType', 'type': 'str'}, - 'value': {'key': 'properties.document.value', 'type': 'str'}, - 'definitions': {'key': 'properties.document.definitions', 'type': 'object'}, + 'document': {'key': 'properties.document', 'type': 'object'}, } def __init__( @@ -10470,8 +11159,7 @@ def __init__( ): super(SchemaContract, self).__init__(**kwargs) self.content_type = kwargs.get('content_type', None) - self.value = kwargs.get('value', None) - self.definitions = kwargs.get('definitions', None) + self.document = kwargs.get('document', None) class SubscriptionCollection(msrest.serialization.Model): @@ -10538,8 +11226,8 @@ class SubscriptionContract(Resource): :type start_date: ~datetime.datetime :param expiration_date: Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by - using the ``state`` property. The date conforms to the following format: ``yyyy-MM- - ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + using the ``state`` property. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. :type expiration_date: ~datetime.datetime :param end_date: Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle @@ -10750,8 +11438,8 @@ class SubscriptionUpdateParameters(msrest.serialization.Model): :type scope: str :param expiration_date: Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by - using the ``state`` property. The date conforms to the following format: ``yyyy-MM- - ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + using the ``state`` property. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. :type expiration_date: ~datetime.datetime :param display_name: Subscription name. :type display_name: str @@ -10808,6 +11496,47 @@ def __init__( self.allow_tracing = kwargs.get('allow_tracing', None) +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.apimanagement.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~azure.mgmt.apimanagement.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) + + class TagCollection(msrest.serialization.Model): """Paged Tag list representation. @@ -11109,7 +11838,7 @@ class TagResourceContract(msrest.serialization.Model): :param tag: Required. Tag associated with the resource. :type tag: ~azure.mgmt.apimanagement.models.TagResourceContractProperties - :param api: Api associated with the tag. + :param api: API associated with the tag. :type api: ~azure.mgmt.apimanagement.models.ApiTagResourceContractProperties :param operation: Operation associated with the tag. :type operation: ~azure.mgmt.apimanagement.models.OperationTagResourceContractProperties @@ -11167,7 +11896,7 @@ def __init__( class TenantConfigurationSyncStateContract(msrest.serialization.Model): - """Tenant Configuration Synchronization State. + """Result of Tenant Configuration Sync State. :param branch: The name of Git branch. :type branch: str @@ -11187,16 +11916,19 @@ class TenantConfigurationSyncStateContract(msrest.serialization.Model): conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. :type configuration_change_date: ~datetime.datetime + :param last_operation_id: Most recent tenant configuration operation identifier. + :type last_operation_id: str """ _attribute_map = { - 'branch': {'key': 'branch', 'type': 'str'}, - 'commit_id': {'key': 'commitId', 'type': 'str'}, - 'is_export': {'key': 'isExport', 'type': 'bool'}, - 'is_synced': {'key': 'isSynced', 'type': 'bool'}, - 'is_git_enabled': {'key': 'isGitEnabled', 'type': 'bool'}, - 'sync_date': {'key': 'syncDate', 'type': 'iso-8601'}, - 'configuration_change_date': {'key': 'configurationChangeDate', 'type': 'iso-8601'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'commit_id': {'key': 'properties.commitId', 'type': 'str'}, + 'is_export': {'key': 'properties.isExport', 'type': 'bool'}, + 'is_synced': {'key': 'properties.isSynced', 'type': 'bool'}, + 'is_git_enabled': {'key': 'properties.isGitEnabled', 'type': 'bool'}, + 'sync_date': {'key': 'properties.syncDate', 'type': 'iso-8601'}, + 'configuration_change_date': {'key': 'properties.configurationChangeDate', 'type': 'iso-8601'}, + 'last_operation_id': {'key': 'properties.lastOperationId', 'type': 'str'}, } def __init__( @@ -11211,6 +11943,7 @@ def __init__( self.is_git_enabled = kwargs.get('is_git_enabled', None) self.sync_date = kwargs.get('sync_date', None) self.configuration_change_date = kwargs.get('configuration_change_date', None) + self.last_operation_id = kwargs.get('last_operation_id', None) class TenantSettingsCollection(msrest.serialization.Model): diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py index 91719343dd85..91b520a96f74 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/models/_models_py3.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/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 @@ -258,6 +258,10 @@ class AdditionalLocation(msrest.serialization.Model): service which is deployed in an Internal Virtual Network in a particular additional location. Available only for Basic, Standard, Premium and Isolated SKU. :vartype private_ip_addresses: list[str] + :param public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with + Virtual Network deployed service in the location. Supported only for Premium SKU being deployed + in Virtual Network. + :type public_ip_address_id: str :param virtual_network_configuration: Virtual network configuration for the location. :type virtual_network_configuration: ~azure.mgmt.apimanagement.models.VirtualNetworkConfiguration @@ -282,6 +286,7 @@ class AdditionalLocation(msrest.serialization.Model): 'zones': {'key': 'zones', 'type': '[str]'}, 'public_ip_addresses': {'key': 'publicIPAddresses', 'type': '[str]'}, 'private_ip_addresses': {'key': 'privateIPAddresses', 'type': '[str]'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, 'virtual_network_configuration': {'key': 'virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, 'gateway_regional_url': {'key': 'gatewayRegionalUrl', 'type': 'str'}, 'disable_gateway': {'key': 'disableGateway', 'type': 'bool'}, @@ -293,6 +298,7 @@ def __init__( location: str, sku: "ApiManagementServiceSkuProperties", zones: Optional[List[str]] = None, + public_ip_address_id: Optional[str] = None, virtual_network_configuration: Optional["VirtualNetworkConfiguration"] = None, disable_gateway: Optional[bool] = False, **kwargs @@ -303,13 +309,14 @@ def __init__( self.zones = zones self.public_ip_addresses = None self.private_ip_addresses = None + self.public_ip_address_id = public_ip_address_id self.virtual_network_configuration = virtual_network_configuration self.gateway_regional_url = None self.disable_gateway = disable_gateway class ApiCollection(msrest.serialization.Model): - """Paged Api list representation. + """Paged API list representation. Variables are only populated by the server, and will be ignored when sending a request. @@ -344,8 +351,40 @@ def __init__( self.next_link = None +class ApiContactInformation(msrest.serialization.Model): + """API contact information. + + :param name: The identifying name of the contact person/organization. + :type name: str + :param url: The URL pointing to the contact information. MUST be in the format of a URL. + :type url: str + :param email: The email address of the contact person/organization. MUST be in the format of an + email address. + :type email: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + 'email': {'key': 'email', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + url: Optional[str] = None, + email: Optional[str] = None, + **kwargs + ): + super(ApiContactInformation, self).__init__(**kwargs) + self.name = name + self.url = url + self.email = email + + class ApiContract(Resource): - """Api details. + """API details. Variables are only populated by the server, and will be ignored when sending a request. @@ -362,26 +401,33 @@ class ApiContract(Resource): :param subscription_key_parameter_names: Protocols over which API is made available. :type subscription_key_parameter_names: ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: "http", "soap". + :param api_type: Type of API. Possible values include: "http", "soap", "websocket", "graphql". :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is provided, default + :param api_revision: Describes the revision of the API. If no value is provided, default revision 1 is created. :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API is versioned. + :param api_version: Indicates the version identifier of the API if the API is versioned. :type api_version: str :param is_current: Indicates if API revision is current api revision. :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. + :param api_revision_description: Description of the API Revision. :type api_revision_description: str - :param api_version_description: Description of the Api Version. + :param api_version_description: Description of the API Version. :type api_version_description: str :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str :param subscription_required: Specifies whether an API or Product subscription is required for accessing the API. :type subscription_required: bool + :param terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format + of a URL. + :type terms_of_service_url: str + :param contact: Contact information for the API. + :type contact: ~azure.mgmt.apimanagement.models.ApiContactInformation + :param license: License information for the API. + :type license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation :param source_api_id: API identifier of the source API. :type source_api_id: str :param display_name: API name. Must be 1 to 300 characters long. @@ -429,6 +475,9 @@ class ApiContract(Resource): 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, + 'terms_of_service_url': {'key': 'properties.termsOfServiceUrl', 'type': 'str'}, + 'contact': {'key': 'properties.contact', 'type': 'ApiContactInformation'}, + 'license': {'key': 'properties.license', 'type': 'ApiLicenseInformation'}, 'source_api_id': {'key': 'properties.sourceApiId', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, @@ -451,6 +500,9 @@ def __init__( api_version_description: Optional[str] = None, api_version_set_id: Optional[str] = None, subscription_required: Optional[bool] = None, + terms_of_service_url: Optional[str] = None, + contact: Optional["ApiContactInformation"] = None, + license: Optional["ApiLicenseInformation"] = None, source_api_id: Optional[str] = None, display_name: Optional[str] = None, service_url: Optional[str] = None, @@ -472,6 +524,9 @@ def __init__( self.api_version_description = api_version_description self.api_version_set_id = api_version_set_id self.subscription_required = subscription_required + self.terms_of_service_url = terms_of_service_url + self.contact = contact + self.license = license self.source_api_id = source_api_id self.display_name = display_name self.service_url = service_url @@ -492,26 +547,33 @@ class ApiEntityBaseContract(msrest.serialization.Model): :param subscription_key_parameter_names: Protocols over which API is made available. :type subscription_key_parameter_names: ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: "http", "soap". + :param api_type: Type of API. Possible values include: "http", "soap", "websocket", "graphql". :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is provided, default + :param api_revision: Describes the revision of the API. If no value is provided, default revision 1 is created. :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API is versioned. + :param api_version: Indicates the version identifier of the API if the API is versioned. :type api_version: str :param is_current: Indicates if API revision is current api revision. :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. + :param api_revision_description: Description of the API Revision. :type api_revision_description: str - :param api_version_description: Description of the Api Version. + :param api_version_description: Description of the API Version. :type api_version_description: str :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str :param subscription_required: Specifies whether an API or Product subscription is required for accessing the API. :type subscription_required: bool + :param terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format + of a URL. + :type terms_of_service_url: str + :param contact: Contact information for the API. + :type contact: ~azure.mgmt.apimanagement.models.ApiContactInformation + :param license: License information for the API. + :type license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation """ _validation = { @@ -535,6 +597,9 @@ class ApiEntityBaseContract(msrest.serialization.Model): 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, + 'terms_of_service_url': {'key': 'termsOfServiceUrl', 'type': 'str'}, + 'contact': {'key': 'contact', 'type': 'ApiContactInformation'}, + 'license': {'key': 'license', 'type': 'ApiLicenseInformation'}, } def __init__( @@ -551,6 +616,9 @@ def __init__( api_version_description: Optional[str] = None, api_version_set_id: Optional[str] = None, subscription_required: Optional[bool] = None, + terms_of_service_url: Optional[str] = None, + contact: Optional["ApiContactInformation"] = None, + license: Optional["ApiLicenseInformation"] = None, **kwargs ): super(ApiEntityBaseContract, self).__init__(**kwargs) @@ -566,10 +634,13 @@ def __init__( self.api_version_description = api_version_description self.api_version_set_id = api_version_set_id self.subscription_required = subscription_required + self.terms_of_service_url = terms_of_service_url + self.contact = contact + self.license = license class ApiContractProperties(ApiEntityBaseContract): - """Api Entity Properties. + """API Entity Properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -582,26 +653,33 @@ class ApiContractProperties(ApiEntityBaseContract): :param subscription_key_parameter_names: Protocols over which API is made available. :type subscription_key_parameter_names: ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: "http", "soap". + :param api_type: Type of API. Possible values include: "http", "soap", "websocket", "graphql". :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is provided, default + :param api_revision: Describes the revision of the API. If no value is provided, default revision 1 is created. :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API is versioned. + :param api_version: Indicates the version identifier of the API if the API is versioned. :type api_version: str :param is_current: Indicates if API revision is current api revision. :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. + :param api_revision_description: Description of the API Revision. :type api_revision_description: str - :param api_version_description: Description of the Api Version. + :param api_version_description: Description of the API Version. :type api_version_description: str :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str :param subscription_required: Specifies whether an API or Product subscription is required for accessing the API. :type subscription_required: bool + :param terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format + of a URL. + :type terms_of_service_url: str + :param contact: Contact information for the API. + :type contact: ~azure.mgmt.apimanagement.models.ApiContactInformation + :param license: License information for the API. + :type license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation :param source_api_id: API identifier of the source API. :type source_api_id: str :param display_name: API name. Must be 1 to 300 characters long. @@ -643,6 +721,9 @@ class ApiContractProperties(ApiEntityBaseContract): 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, + 'terms_of_service_url': {'key': 'termsOfServiceUrl', 'type': 'str'}, + 'contact': {'key': 'contact', 'type': 'ApiContactInformation'}, + 'license': {'key': 'license', 'type': 'ApiLicenseInformation'}, 'source_api_id': {'key': 'sourceApiId', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, 'service_url': {'key': 'serviceUrl', 'type': 'str'}, @@ -666,6 +747,9 @@ def __init__( api_version_description: Optional[str] = None, api_version_set_id: Optional[str] = None, subscription_required: Optional[bool] = None, + terms_of_service_url: Optional[str] = None, + contact: Optional["ApiContactInformation"] = None, + license: Optional["ApiLicenseInformation"] = None, source_api_id: Optional[str] = None, display_name: Optional[str] = None, service_url: Optional[str] = None, @@ -673,7 +757,7 @@ def __init__( api_version_set: Optional["ApiVersionSetContractDetails"] = None, **kwargs ): - super(ApiContractProperties, self).__init__(description=description, authentication_settings=authentication_settings, subscription_key_parameter_names=subscription_key_parameter_names, api_type=api_type, api_revision=api_revision, api_version=api_version, is_current=is_current, api_revision_description=api_revision_description, api_version_description=api_version_description, api_version_set_id=api_version_set_id, subscription_required=subscription_required, **kwargs) + super(ApiContractProperties, self).__init__(description=description, authentication_settings=authentication_settings, subscription_key_parameter_names=subscription_key_parameter_names, api_type=api_type, api_revision=api_revision, api_version=api_version, is_current=is_current, api_revision_description=api_revision_description, api_version_description=api_version_description, api_version_set_id=api_version_set_id, subscription_required=subscription_required, terms_of_service_url=terms_of_service_url, contact=contact, license=license, **kwargs) self.source_api_id = source_api_id self.display_name = display_name self.service_url = service_url @@ -694,26 +778,33 @@ class ApiContractUpdateProperties(ApiEntityBaseContract): :param subscription_key_parameter_names: Protocols over which API is made available. :type subscription_key_parameter_names: ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: "http", "soap". + :param api_type: Type of API. Possible values include: "http", "soap", "websocket", "graphql". :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is provided, default + :param api_revision: Describes the revision of the API. If no value is provided, default revision 1 is created. :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API is versioned. + :param api_version: Indicates the version identifier of the API if the API is versioned. :type api_version: str :param is_current: Indicates if API revision is current api revision. :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. + :param api_revision_description: Description of the API Revision. :type api_revision_description: str - :param api_version_description: Description of the Api Version. + :param api_version_description: Description of the API Version. :type api_version_description: str :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str :param subscription_required: Specifies whether an API or Product subscription is required for accessing the API. :type subscription_required: bool + :param terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format + of a URL. + :type terms_of_service_url: str + :param contact: Contact information for the API. + :type contact: ~azure.mgmt.apimanagement.models.ApiContactInformation + :param license: License information for the API. + :type license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation :param display_name: API name. :type display_name: str :param service_url: Absolute URL of the backend service implementing this API. @@ -750,6 +841,9 @@ class ApiContractUpdateProperties(ApiEntityBaseContract): 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, + 'terms_of_service_url': {'key': 'termsOfServiceUrl', 'type': 'str'}, + 'contact': {'key': 'contact', 'type': 'ApiContactInformation'}, + 'license': {'key': 'license', 'type': 'ApiLicenseInformation'}, 'display_name': {'key': 'displayName', 'type': 'str'}, 'service_url': {'key': 'serviceUrl', 'type': 'str'}, 'path': {'key': 'path', 'type': 'str'}, @@ -770,13 +864,16 @@ def __init__( api_version_description: Optional[str] = None, api_version_set_id: Optional[str] = None, subscription_required: Optional[bool] = None, + terms_of_service_url: Optional[str] = None, + contact: Optional["ApiContactInformation"] = None, + license: Optional["ApiLicenseInformation"] = None, display_name: Optional[str] = None, service_url: Optional[str] = None, path: Optional[str] = None, protocols: Optional[List[Union[str, "Protocol"]]] = None, **kwargs ): - super(ApiContractUpdateProperties, self).__init__(description=description, authentication_settings=authentication_settings, subscription_key_parameter_names=subscription_key_parameter_names, api_type=api_type, api_revision=api_revision, api_version=api_version, is_current=is_current, api_revision_description=api_revision_description, api_version_description=api_version_description, api_version_set_id=api_version_set_id, subscription_required=subscription_required, **kwargs) + super(ApiContractUpdateProperties, self).__init__(description=description, authentication_settings=authentication_settings, subscription_key_parameter_names=subscription_key_parameter_names, api_type=api_type, api_revision=api_revision, api_version=api_version, is_current=is_current, api_revision_description=api_revision_description, api_version_description=api_version_description, api_version_set_id=api_version_set_id, subscription_required=subscription_required, terms_of_service_url=terms_of_service_url, contact=contact, license=license, **kwargs) self.display_name = display_name self.service_url = service_url self.path = path @@ -795,26 +892,33 @@ class ApiCreateOrUpdateParameter(msrest.serialization.Model): :param subscription_key_parameter_names: Protocols over which API is made available. :type subscription_key_parameter_names: ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: "http", "soap". + :param api_type: Type of API. Possible values include: "http", "soap", "websocket", "graphql". :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is provided, default + :param api_revision: Describes the revision of the API. If no value is provided, default revision 1 is created. :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API is versioned. + :param api_version: Indicates the version identifier of the API if the API is versioned. :type api_version: str :param is_current: Indicates if API revision is current api revision. :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. + :param api_revision_description: Description of the API Revision. :type api_revision_description: str - :param api_version_description: Description of the Api Version. + :param api_version_description: Description of the API Version. :type api_version_description: str :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str :param subscription_required: Specifies whether an API or Product subscription is required for accessing the API. :type subscription_required: bool + :param terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format + of a URL. + :type terms_of_service_url: str + :param contact: Contact information for the API. + :type contact: ~azure.mgmt.apimanagement.models.ApiContactInformation + :param license: License information for the API. + :type license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation :param source_api_id: API identifier of the source API. :type source_api_id: str :param display_name: API name. Must be 1 to 300 characters long. @@ -833,16 +937,19 @@ class ApiCreateOrUpdateParameter(msrest.serialization.Model): :param value: Content value when Importing an API. :type value: str :param format: Format of the Content in which the API is getting imported. Possible values - include: "wadl-xml", "wadl-link-json", "swagger-json", "swagger-link-json", "wsdl", "wsdl- - link", "openapi", "openapi+json", "openapi-link", "openapi+json-link". + include: "wadl-xml", "wadl-link-json", "swagger-json", "swagger-link-json", "wsdl", + "wsdl-link", "openapi", "openapi+json", "openapi-link", "openapi+json-link", "graphql-link". :type format: str or ~azure.mgmt.apimanagement.models.ContentFormat :param wsdl_selector: Criteria to limit import of WSDL to a subset of the document. :type wsdl_selector: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector - :param soap_api_type: Type of Api to create. + :param soap_api_type: Type of API to create. - * ``http`` creates a SOAP to REST API - * ``soap`` creates a SOAP pass-through API . Possible values include: "http", "soap". + * ``http`` creates a REST API + * ``soap`` creates a SOAP pass-through API + * ``websocket`` creates websocket API + * ``graphql`` creates GraphQL API. Possible values include: "http", "soap", "websocket", + "graphql". :type soap_api_type: str or ~azure.mgmt.apimanagement.models.SoapApiType """ @@ -870,6 +977,9 @@ class ApiCreateOrUpdateParameter(msrest.serialization.Model): 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, + 'terms_of_service_url': {'key': 'properties.termsOfServiceUrl', 'type': 'str'}, + 'contact': {'key': 'properties.contact', 'type': 'ApiContactInformation'}, + 'license': {'key': 'properties.license', 'type': 'ApiLicenseInformation'}, 'source_api_id': {'key': 'properties.sourceApiId', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, @@ -896,6 +1006,9 @@ def __init__( api_version_description: Optional[str] = None, api_version_set_id: Optional[str] = None, subscription_required: Optional[bool] = None, + terms_of_service_url: Optional[str] = None, + contact: Optional["ApiContactInformation"] = None, + license: Optional["ApiLicenseInformation"] = None, source_api_id: Optional[str] = None, display_name: Optional[str] = None, service_url: Optional[str] = None, @@ -921,6 +1034,9 @@ def __init__( self.api_version_description = api_version_description self.api_version_set_id = api_version_set_id self.subscription_required = subscription_required + self.terms_of_service_url = terms_of_service_url + self.contact = contact + self.license = license self.source_api_id = source_api_id self.display_name = display_name self.service_url = service_url @@ -934,7 +1050,7 @@ def __init__( class ApiCreateOrUpdateProperties(ApiContractProperties): - """Api Create or Update Properties. + """API Create or Update Properties. Variables are only populated by the server, and will be ignored when sending a request. @@ -947,26 +1063,33 @@ class ApiCreateOrUpdateProperties(ApiContractProperties): :param subscription_key_parameter_names: Protocols over which API is made available. :type subscription_key_parameter_names: ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: "http", "soap". + :param api_type: Type of API. Possible values include: "http", "soap", "websocket", "graphql". :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is provided, default + :param api_revision: Describes the revision of the API. If no value is provided, default revision 1 is created. :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API is versioned. + :param api_version: Indicates the version identifier of the API if the API is versioned. :type api_version: str :param is_current: Indicates if API revision is current api revision. :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. + :param api_revision_description: Description of the API Revision. :type api_revision_description: str - :param api_version_description: Description of the Api Version. + :param api_version_description: Description of the API Version. :type api_version_description: str :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str :param subscription_required: Specifies whether an API or Product subscription is required for accessing the API. :type subscription_required: bool + :param terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format + of a URL. + :type terms_of_service_url: str + :param contact: Contact information for the API. + :type contact: ~azure.mgmt.apimanagement.models.ApiContactInformation + :param license: License information for the API. + :type license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation :param source_api_id: API identifier of the source API. :type source_api_id: str :param display_name: API name. Must be 1 to 300 characters long. @@ -985,16 +1108,19 @@ class ApiCreateOrUpdateProperties(ApiContractProperties): :param value: Content value when Importing an API. :type value: str :param format: Format of the Content in which the API is getting imported. Possible values - include: "wadl-xml", "wadl-link-json", "swagger-json", "swagger-link-json", "wsdl", "wsdl- - link", "openapi", "openapi+json", "openapi-link", "openapi+json-link". + include: "wadl-xml", "wadl-link-json", "swagger-json", "swagger-link-json", "wsdl", + "wsdl-link", "openapi", "openapi+json", "openapi-link", "openapi+json-link", "graphql-link". :type format: str or ~azure.mgmt.apimanagement.models.ContentFormat :param wsdl_selector: Criteria to limit import of WSDL to a subset of the document. :type wsdl_selector: ~azure.mgmt.apimanagement.models.ApiCreateOrUpdatePropertiesWsdlSelector - :param soap_api_type: Type of Api to create. + :param soap_api_type: Type of API to create. - * ``http`` creates a SOAP to REST API - * ``soap`` creates a SOAP pass-through API . Possible values include: "http", "soap". + * ``http`` creates a REST API + * ``soap`` creates a SOAP pass-through API + * ``websocket`` creates websocket API + * ``graphql`` creates GraphQL API. Possible values include: "http", "soap", "websocket", + "graphql". :type soap_api_type: str or ~azure.mgmt.apimanagement.models.SoapApiType """ @@ -1022,6 +1148,9 @@ class ApiCreateOrUpdateProperties(ApiContractProperties): 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, + 'terms_of_service_url': {'key': 'termsOfServiceUrl', 'type': 'str'}, + 'contact': {'key': 'contact', 'type': 'ApiContactInformation'}, + 'license': {'key': 'license', 'type': 'ApiLicenseInformation'}, 'source_api_id': {'key': 'sourceApiId', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, 'service_url': {'key': 'serviceUrl', 'type': 'str'}, @@ -1049,6 +1178,9 @@ def __init__( api_version_description: Optional[str] = None, api_version_set_id: Optional[str] = None, subscription_required: Optional[bool] = None, + terms_of_service_url: Optional[str] = None, + contact: Optional["ApiContactInformation"] = None, + license: Optional["ApiLicenseInformation"] = None, source_api_id: Optional[str] = None, display_name: Optional[str] = None, service_url: Optional[str] = None, @@ -1060,7 +1192,7 @@ def __init__( soap_api_type: Optional[Union[str, "SoapApiType"]] = None, **kwargs ): - super(ApiCreateOrUpdateProperties, self).__init__(description=description, authentication_settings=authentication_settings, subscription_key_parameter_names=subscription_key_parameter_names, api_type=api_type, api_revision=api_revision, api_version=api_version, is_current=is_current, api_revision_description=api_revision_description, api_version_description=api_version_description, api_version_set_id=api_version_set_id, subscription_required=subscription_required, source_api_id=source_api_id, display_name=display_name, service_url=service_url, path=path, protocols=protocols, api_version_set=api_version_set, **kwargs) + super(ApiCreateOrUpdateProperties, self).__init__(description=description, authentication_settings=authentication_settings, subscription_key_parameter_names=subscription_key_parameter_names, api_type=api_type, api_revision=api_revision, api_version=api_version, is_current=is_current, api_revision_description=api_revision_description, api_version_description=api_version_description, api_version_set_id=api_version_set_id, subscription_required=subscription_required, terms_of_service_url=terms_of_service_url, contact=contact, license=license, source_api_id=source_api_id, display_name=display_name, service_url=service_url, path=path, protocols=protocols, api_version_set=api_version_set, **kwargs) self.value = value self.format = format self.wsdl_selector = wsdl_selector @@ -1098,11 +1230,11 @@ class ApiExportResult(msrest.serialization.Model): :param id: ResourceId of the API which was exported. :type id: str - :param export_result_format: Format in which the Api Details are exported to the Storage Blob - with Sas Key valid for 5 minutes. Possible values include: "swagger-link-json", "wsdl- - link+xml", "wadl-link-json", "openapi-link". + :param export_result_format: Format in which the API Details are exported to the Storage Blob + with Sas Key valid for 5 minutes. Possible values include: "swagger-link-json", + "wsdl-link+xml", "wadl-link-json", "openapi-link". :type export_result_format: str or ~azure.mgmt.apimanagement.models.ExportResultFormat - :param value: The object defining the schema of the exported Api Detail. + :param value: The object defining the schema of the exported API Detail. :type value: ~azure.mgmt.apimanagement.models.ApiExportResultValue """ @@ -1127,7 +1259,7 @@ def __init__( class ApiExportResultValue(msrest.serialization.Model): - """The object defining the schema of the exported Api Detail. + """The object defining the schema of the exported API Detail. :param link: Link to the Storage Blob containing the result of the export operation. The Blob Uri is only valid for 5 minutes. @@ -1148,6 +1280,32 @@ def __init__( self.link = link +class ApiLicenseInformation(msrest.serialization.Model): + """API license information. + + :param name: The license name used for the API. + :type name: str + :param url: A URL to the license used for the API. MUST be in the format of a URL. + :type url: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'url': {'key': 'url', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + url: Optional[str] = None, + **kwargs + ): + super(ApiLicenseInformation, self).__init__(**kwargs) + self.name = name + self.url = url + + class ApiManagementServiceApplyNetworkConfigurationParameters(msrest.serialization.Model): """Parameter supplied to the Apply Network configuration operation. @@ -1175,47 +1333,59 @@ class ApiManagementServiceBackupRestoreParameters(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. - :param storage_account: Required. Azure Cloud Storage account (used to place/retrieve the - backup) name. + :param storage_account: Required. The name of the Azure storage account (used to place/retrieve + the backup). :type storage_account: str - :param access_key: Required. Azure Cloud Storage account (used to place/retrieve the backup) - access key. - :type access_key: str - :param container_name: Required. Azure Cloud Storage blob container name used to place/retrieve - the backup. + :param container_name: Required. The name of the blob container (used to place/retrieve the + backup). :type container_name: str - :param backup_name: Required. The name of the backup file to create. + :param backup_name: Required. The name of the backup file to create/retrieve. :type backup_name: str + :param access_type: The type of access to be used for the storage account. Possible values + include: "AccessKey", "SystemAssignedManagedIdentity", "UserAssignedManagedIdentity". Default + value: "AccessKey". + :type access_type: str or ~azure.mgmt.apimanagement.models.AccessType + :param access_key: Storage account access key. Required only if ``accessType`` is set to + ``AccessKey``. + :type access_key: str + :param client_id: The Client ID of user assigned managed identity. Required only if + ``accessType`` is set to ``UserAssignedManagedIdentity``. + :type client_id: str """ _validation = { 'storage_account': {'required': True}, - 'access_key': {'required': True}, 'container_name': {'required': True}, 'backup_name': {'required': True}, } _attribute_map = { 'storage_account': {'key': 'storageAccount', 'type': 'str'}, - 'access_key': {'key': 'accessKey', 'type': 'str'}, 'container_name': {'key': 'containerName', 'type': 'str'}, 'backup_name': {'key': 'backupName', 'type': 'str'}, + 'access_type': {'key': 'accessType', 'type': 'str'}, + 'access_key': {'key': 'accessKey', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, } def __init__( self, *, storage_account: str, - access_key: str, container_name: str, backup_name: str, + access_type: Optional[Union[str, "AccessType"]] = "AccessKey", + access_key: Optional[str] = None, + client_id: Optional[str] = None, **kwargs ): super(ApiManagementServiceBackupRestoreParameters, self).__init__(**kwargs) self.storage_account = storage_account - self.access_key = access_key self.container_name = container_name self.backup_name = backup_name + self.access_type = access_type + self.access_key = access_key + self.client_id = client_id class ApiManagementServiceBaseProperties(msrest.serialization.Model): @@ -1256,6 +1426,15 @@ class ApiManagementServiceBaseProperties(msrest.serialization.Model): service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. :vartype private_ip_addresses: list[str] + :param public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with + Virtual Network deployed service in the region. Supported only for Developer and Premium SKU + being deployed in Virtual Network. + :type public_ip_address_id: str + :param public_network_access: Whether or not public endpoint access is allowed for this API + Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If + 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + Possible values include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.apimanagement.models.PublicNetworkAccess :param virtual_network_configuration: Virtual network configuration of the API Management service. :type virtual_network_configuration: @@ -1344,6 +1523,8 @@ class ApiManagementServiceBaseProperties(msrest.serialization.Model): 'hostname_configurations': {'key': 'hostnameConfigurations', 'type': '[HostnameConfiguration]'}, 'public_ip_addresses': {'key': 'publicIPAddresses', 'type': '[str]'}, 'private_ip_addresses': {'key': 'privateIPAddresses', 'type': '[str]'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, 'virtual_network_configuration': {'key': 'virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, 'additional_locations': {'key': 'additionalLocations', 'type': '[AdditionalLocation]'}, 'custom_properties': {'key': 'customProperties', 'type': '{str}'}, @@ -1360,6 +1541,8 @@ def __init__( *, notification_sender_email: Optional[str] = None, hostname_configurations: Optional[List["HostnameConfiguration"]] = None, + public_ip_address_id: Optional[str] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, virtual_network_configuration: Optional["VirtualNetworkConfiguration"] = None, additional_locations: Optional[List["AdditionalLocation"]] = None, custom_properties: Optional[Dict[str, str]] = None, @@ -1385,6 +1568,8 @@ def __init__( self.hostname_configurations = hostname_configurations self.public_ip_addresses = None self.private_ip_addresses = None + self.public_ip_address_id = public_ip_address_id + self.public_network_access = public_network_access self.virtual_network_configuration = virtual_network_configuration self.additional_locations = additional_locations self.custom_properties = custom_properties @@ -1637,6 +1822,15 @@ class ApiManagementServiceProperties(ApiManagementServiceBaseProperties): service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. :vartype private_ip_addresses: list[str] + :param public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with + Virtual Network deployed service in the region. Supported only for Developer and Premium SKU + being deployed in Virtual Network. + :type public_ip_address_id: str + :param public_network_access: Whether or not public endpoint access is allowed for this API + Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If + 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + Possible values include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.apimanagement.models.PublicNetworkAccess :param virtual_network_configuration: Virtual network configuration of the API Management service. :type virtual_network_configuration: @@ -1731,6 +1925,8 @@ class ApiManagementServiceProperties(ApiManagementServiceBaseProperties): 'hostname_configurations': {'key': 'hostnameConfigurations', 'type': '[HostnameConfiguration]'}, 'public_ip_addresses': {'key': 'publicIPAddresses', 'type': '[str]'}, 'private_ip_addresses': {'key': 'privateIPAddresses', 'type': '[str]'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, 'virtual_network_configuration': {'key': 'virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, 'additional_locations': {'key': 'additionalLocations', 'type': '[AdditionalLocation]'}, 'custom_properties': {'key': 'customProperties', 'type': '{str}'}, @@ -1751,6 +1947,8 @@ def __init__( publisher_name: str, notification_sender_email: Optional[str] = None, hostname_configurations: Optional[List["HostnameConfiguration"]] = None, + public_ip_address_id: Optional[str] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, virtual_network_configuration: Optional["VirtualNetworkConfiguration"] = None, additional_locations: Optional[List["AdditionalLocation"]] = None, custom_properties: Optional[Dict[str, str]] = None, @@ -1762,7 +1960,7 @@ def __init__( restore: Optional[bool] = False, **kwargs ): - super(ApiManagementServiceProperties, self).__init__(notification_sender_email=notification_sender_email, hostname_configurations=hostname_configurations, virtual_network_configuration=virtual_network_configuration, additional_locations=additional_locations, custom_properties=custom_properties, certificates=certificates, enable_client_certificate=enable_client_certificate, disable_gateway=disable_gateway, virtual_network_type=virtual_network_type, api_version_constraint=api_version_constraint, restore=restore, **kwargs) + super(ApiManagementServiceProperties, self).__init__(notification_sender_email=notification_sender_email, hostname_configurations=hostname_configurations, public_ip_address_id=public_ip_address_id, public_network_access=public_network_access, virtual_network_configuration=virtual_network_configuration, additional_locations=additional_locations, custom_properties=custom_properties, certificates=certificates, enable_client_certificate=enable_client_certificate, disable_gateway=disable_gateway, virtual_network_type=virtual_network_type, api_version_constraint=api_version_constraint, restore=restore, **kwargs) self.publisher_email = publisher_email self.publisher_name = publisher_name @@ -1827,6 +2025,8 @@ class ApiManagementServiceResource(ApimResource): :type sku: ~azure.mgmt.apimanagement.models.ApiManagementServiceSkuProperties :param identity: Managed service identity of the Api Management service. :type identity: ~azure.mgmt.apimanagement.models.ApiManagementServiceIdentity + :ivar system_data: Metadata pertaining to creation and last modification of the resource. + :vartype system_data: ~azure.mgmt.apimanagement.models.SystemData :param location: Required. Resource location. :type location: str :ivar etag: ETag of the resource. @@ -1866,6 +2066,15 @@ class ApiManagementServiceResource(ApimResource): service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. :vartype private_ip_addresses: list[str] + :param public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with + Virtual Network deployed service in the region. Supported only for Developer and Premium SKU + being deployed in Virtual Network. + :type public_ip_address_id: str + :param public_network_access: Whether or not public endpoint access is allowed for this API + Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If + 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + Possible values include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.apimanagement.models.PublicNetworkAccess :param virtual_network_configuration: Virtual network configuration of the API Management service. :type virtual_network_configuration: @@ -1934,6 +2143,7 @@ class ApiManagementServiceResource(ApimResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'sku': {'required': True}, + 'system_data': {'readonly': True}, 'location': {'required': True}, 'etag': {'readonly': True}, 'notification_sender_email': {'max_length': 100, 'min_length': 0}, @@ -1959,6 +2169,7 @@ class ApiManagementServiceResource(ApimResource): 'tags': {'key': 'tags', 'type': '{str}'}, 'sku': {'key': 'sku', 'type': 'ApiManagementServiceSkuProperties'}, 'identity': {'key': 'identity', 'type': 'ApiManagementServiceIdentity'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'location': {'key': 'location', 'type': 'str'}, 'etag': {'key': 'etag', 'type': 'str'}, 'zones': {'key': 'zones', 'type': '[str]'}, @@ -1975,6 +2186,8 @@ class ApiManagementServiceResource(ApimResource): 'hostname_configurations': {'key': 'properties.hostnameConfigurations', 'type': '[HostnameConfiguration]'}, 'public_ip_addresses': {'key': 'properties.publicIPAddresses', 'type': '[str]'}, 'private_ip_addresses': {'key': 'properties.privateIPAddresses', 'type': '[str]'}, + 'public_ip_address_id': {'key': 'properties.publicIpAddressId', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'virtual_network_configuration': {'key': 'properties.virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, 'additional_locations': {'key': 'properties.additionalLocations', 'type': '[AdditionalLocation]'}, 'custom_properties': {'key': 'properties.customProperties', 'type': '{str}'}, @@ -2000,6 +2213,8 @@ def __init__( zones: Optional[List[str]] = None, notification_sender_email: Optional[str] = None, hostname_configurations: Optional[List["HostnameConfiguration"]] = None, + public_ip_address_id: Optional[str] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, virtual_network_configuration: Optional["VirtualNetworkConfiguration"] = None, additional_locations: Optional[List["AdditionalLocation"]] = None, custom_properties: Optional[Dict[str, str]] = None, @@ -2014,6 +2229,7 @@ def __init__( super(ApiManagementServiceResource, self).__init__(tags=tags, **kwargs) self.sku = sku self.identity = identity + self.system_data = None self.location = location self.etag = None self.zones = zones @@ -2030,6 +2246,8 @@ def __init__( self.hostname_configurations = hostname_configurations self.public_ip_addresses = None self.private_ip_addresses = None + self.public_ip_address_id = public_ip_address_id + self.public_network_access = public_network_access self.virtual_network_configuration = virtual_network_configuration self.additional_locations = additional_locations self.custom_properties = custom_properties @@ -2130,6 +2348,15 @@ class ApiManagementServiceUpdateParameters(ApimResource): service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. :vartype private_ip_addresses: list[str] + :param public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with + Virtual Network deployed service in the region. Supported only for Developer and Premium SKU + being deployed in Virtual Network. + :type public_ip_address_id: str + :param public_network_access: Whether or not public endpoint access is allowed for this API + Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If + 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + Possible values include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.apimanagement.models.PublicNetworkAccess :param virtual_network_configuration: Virtual network configuration of the API Management service. :type virtual_network_configuration: @@ -2235,6 +2462,8 @@ class ApiManagementServiceUpdateParameters(ApimResource): 'hostname_configurations': {'key': 'properties.hostnameConfigurations', 'type': '[HostnameConfiguration]'}, 'public_ip_addresses': {'key': 'properties.publicIPAddresses', 'type': '[str]'}, 'private_ip_addresses': {'key': 'properties.privateIPAddresses', 'type': '[str]'}, + 'public_ip_address_id': {'key': 'properties.publicIpAddressId', 'type': 'str'}, + 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'virtual_network_configuration': {'key': 'properties.virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, 'additional_locations': {'key': 'properties.additionalLocations', 'type': '[AdditionalLocation]'}, 'custom_properties': {'key': 'properties.customProperties', 'type': '{str}'}, @@ -2256,6 +2485,8 @@ def __init__( identity: Optional["ApiManagementServiceIdentity"] = None, notification_sender_email: Optional[str] = None, hostname_configurations: Optional[List["HostnameConfiguration"]] = None, + public_ip_address_id: Optional[str] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, virtual_network_configuration: Optional["VirtualNetworkConfiguration"] = None, additional_locations: Optional[List["AdditionalLocation"]] = None, custom_properties: Optional[Dict[str, str]] = None, @@ -2286,6 +2517,8 @@ def __init__( self.hostname_configurations = hostname_configurations self.public_ip_addresses = None self.private_ip_addresses = None + self.public_ip_address_id = public_ip_address_id + self.public_network_access = public_network_access self.virtual_network_configuration = virtual_network_configuration self.additional_locations = additional_locations self.custom_properties = custom_properties @@ -2337,6 +2570,15 @@ class ApiManagementServiceUpdateProperties(ApiManagementServiceBaseProperties): service in Primary region which is deployed in an Internal Virtual Network. Available only for Basic, Standard, Premium and Isolated SKU. :vartype private_ip_addresses: list[str] + :param public_ip_address_id: Public Standard SKU IP V4 based IP address to be associated with + Virtual Network deployed service in the region. Supported only for Developer and Premium SKU + being deployed in Virtual Network. + :type public_ip_address_id: str + :param public_network_access: Whether or not public endpoint access is allowed for this API + Management service. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. If + 'Disabled', private endpoints are the exclusive access method. Default value is 'Enabled'. + Possible values include: "Enabled", "Disabled". + :type public_network_access: str or ~azure.mgmt.apimanagement.models.PublicNetworkAccess :param virtual_network_configuration: Virtual network configuration of the API Management service. :type virtual_network_configuration: @@ -2431,6 +2673,8 @@ class ApiManagementServiceUpdateProperties(ApiManagementServiceBaseProperties): 'hostname_configurations': {'key': 'hostnameConfigurations', 'type': '[HostnameConfiguration]'}, 'public_ip_addresses': {'key': 'publicIPAddresses', 'type': '[str]'}, 'private_ip_addresses': {'key': 'privateIPAddresses', 'type': '[str]'}, + 'public_ip_address_id': {'key': 'publicIpAddressId', 'type': 'str'}, + 'public_network_access': {'key': 'publicNetworkAccess', 'type': 'str'}, 'virtual_network_configuration': {'key': 'virtualNetworkConfiguration', 'type': 'VirtualNetworkConfiguration'}, 'additional_locations': {'key': 'additionalLocations', 'type': '[AdditionalLocation]'}, 'custom_properties': {'key': 'customProperties', 'type': '{str}'}, @@ -2449,6 +2693,8 @@ def __init__( *, notification_sender_email: Optional[str] = None, hostname_configurations: Optional[List["HostnameConfiguration"]] = None, + public_ip_address_id: Optional[str] = None, + public_network_access: Optional[Union[str, "PublicNetworkAccess"]] = None, virtual_network_configuration: Optional["VirtualNetworkConfiguration"] = None, additional_locations: Optional[List["AdditionalLocation"]] = None, custom_properties: Optional[Dict[str, str]] = None, @@ -2462,7 +2708,7 @@ def __init__( publisher_name: Optional[str] = None, **kwargs ): - super(ApiManagementServiceUpdateProperties, self).__init__(notification_sender_email=notification_sender_email, hostname_configurations=hostname_configurations, virtual_network_configuration=virtual_network_configuration, additional_locations=additional_locations, custom_properties=custom_properties, certificates=certificates, enable_client_certificate=enable_client_certificate, disable_gateway=disable_gateway, virtual_network_type=virtual_network_type, api_version_constraint=api_version_constraint, restore=restore, **kwargs) + super(ApiManagementServiceUpdateProperties, self).__init__(notification_sender_email=notification_sender_email, hostname_configurations=hostname_configurations, public_ip_address_id=public_ip_address_id, public_network_access=public_network_access, virtual_network_configuration=virtual_network_configuration, additional_locations=additional_locations, custom_properties=custom_properties, certificates=certificates, enable_client_certificate=enable_client_certificate, disable_gateway=disable_gateway, virtual_network_type=virtual_network_type, api_version_constraint=api_version_constraint, restore=restore, **kwargs) self.publisher_email = publisher_email self.publisher_name = publisher_name @@ -2927,7 +3173,7 @@ def __init__( class ApiRevisionCollection(msrest.serialization.Model): - """Paged Api Revision list representation. + """Paged API Revision list representation. Variables are only populated by the server, and will be ignored when sending a request. @@ -3077,26 +3323,33 @@ class ApiTagResourceContractProperties(ApiEntityBaseContract): :param subscription_key_parameter_names: Protocols over which API is made available. :type subscription_key_parameter_names: ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: "http", "soap". + :param api_type: Type of API. Possible values include: "http", "soap", "websocket", "graphql". :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is provided, default + :param api_revision: Describes the revision of the API. If no value is provided, default revision 1 is created. :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API is versioned. + :param api_version: Indicates the version identifier of the API if the API is versioned. :type api_version: str :param is_current: Indicates if API revision is current api revision. :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. + :param api_revision_description: Description of the API Revision. :type api_revision_description: str - :param api_version_description: Description of the Api Version. + :param api_version_description: Description of the API Version. :type api_version_description: str :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str :param subscription_required: Specifies whether an API or Product subscription is required for accessing the API. :type subscription_required: bool + :param terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format + of a URL. + :type terms_of_service_url: str + :param contact: Contact information for the API. + :type contact: ~azure.mgmt.apimanagement.models.ApiContactInformation + :param license: License information for the API. + :type license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation :param id: API identifier in the form /apis/{apiId}. :type id: str :param name: API name. @@ -3135,6 +3388,9 @@ class ApiTagResourceContractProperties(ApiEntityBaseContract): 'api_version_description': {'key': 'apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'apiVersionSetId', 'type': 'str'}, 'subscription_required': {'key': 'subscriptionRequired', 'type': 'bool'}, + 'terms_of_service_url': {'key': 'termsOfServiceUrl', 'type': 'str'}, + 'contact': {'key': 'contact', 'type': 'ApiContactInformation'}, + 'license': {'key': 'license', 'type': 'ApiLicenseInformation'}, 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'service_url': {'key': 'serviceUrl', 'type': 'str'}, @@ -3156,6 +3412,9 @@ def __init__( api_version_description: Optional[str] = None, api_version_set_id: Optional[str] = None, subscription_required: Optional[bool] = None, + terms_of_service_url: Optional[str] = None, + contact: Optional["ApiContactInformation"] = None, + license: Optional["ApiLicenseInformation"] = None, id: Optional[str] = None, name: Optional[str] = None, service_url: Optional[str] = None, @@ -3163,7 +3422,7 @@ def __init__( protocols: Optional[List[Union[str, "Protocol"]]] = None, **kwargs ): - super(ApiTagResourceContractProperties, self).__init__(description=description, authentication_settings=authentication_settings, subscription_key_parameter_names=subscription_key_parameter_names, api_type=api_type, api_revision=api_revision, api_version=api_version, is_current=is_current, api_revision_description=api_revision_description, api_version_description=api_version_description, api_version_set_id=api_version_set_id, subscription_required=subscription_required, **kwargs) + super(ApiTagResourceContractProperties, self).__init__(description=description, authentication_settings=authentication_settings, subscription_key_parameter_names=subscription_key_parameter_names, api_type=api_type, api_revision=api_revision, api_version=api_version, is_current=is_current, api_revision_description=api_revision_description, api_version_description=api_version_description, api_version_set_id=api_version_set_id, subscription_required=subscription_required, terms_of_service_url=terms_of_service_url, contact=contact, license=license, **kwargs) self.id = id self.name = name self.service_url = service_url @@ -3183,26 +3442,33 @@ class ApiUpdateContract(msrest.serialization.Model): :param subscription_key_parameter_names: Protocols over which API is made available. :type subscription_key_parameter_names: ~azure.mgmt.apimanagement.models.SubscriptionKeyParameterNamesContract - :param api_type: Type of API. Possible values include: "http", "soap". + :param api_type: Type of API. Possible values include: "http", "soap", "websocket", "graphql". :type api_type: str or ~azure.mgmt.apimanagement.models.ApiType - :param api_revision: Describes the Revision of the Api. If no value is provided, default + :param api_revision: Describes the revision of the API. If no value is provided, default revision 1 is created. :type api_revision: str - :param api_version: Indicates the Version identifier of the API if the API is versioned. + :param api_version: Indicates the version identifier of the API if the API is versioned. :type api_version: str :param is_current: Indicates if API revision is current api revision. :type is_current: bool :ivar is_online: Indicates if API revision is accessible via the gateway. :vartype is_online: bool - :param api_revision_description: Description of the Api Revision. + :param api_revision_description: Description of the API Revision. :type api_revision_description: str - :param api_version_description: Description of the Api Version. + :param api_version_description: Description of the API Version. :type api_version_description: str :param api_version_set_id: A resource identifier for the related ApiVersionSet. :type api_version_set_id: str :param subscription_required: Specifies whether an API or Product subscription is required for accessing the API. :type subscription_required: bool + :param terms_of_service_url: A URL to the Terms of Service for the API. MUST be in the format + of a URL. + :type terms_of_service_url: str + :param contact: Contact information for the API. + :type contact: ~azure.mgmt.apimanagement.models.ApiContactInformation + :param license: License information for the API. + :type license: ~azure.mgmt.apimanagement.models.ApiLicenseInformation :param display_name: API name. :type display_name: str :param service_url: Absolute URL of the backend service implementing this API. @@ -3239,6 +3505,9 @@ class ApiUpdateContract(msrest.serialization.Model): 'api_version_description': {'key': 'properties.apiVersionDescription', 'type': 'str'}, 'api_version_set_id': {'key': 'properties.apiVersionSetId', 'type': 'str'}, 'subscription_required': {'key': 'properties.subscriptionRequired', 'type': 'bool'}, + 'terms_of_service_url': {'key': 'properties.termsOfServiceUrl', 'type': 'str'}, + 'contact': {'key': 'properties.contact', 'type': 'ApiContactInformation'}, + 'license': {'key': 'properties.license', 'type': 'ApiLicenseInformation'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'service_url': {'key': 'properties.serviceUrl', 'type': 'str'}, 'path': {'key': 'properties.path', 'type': 'str'}, @@ -3259,6 +3528,9 @@ def __init__( api_version_description: Optional[str] = None, api_version_set_id: Optional[str] = None, subscription_required: Optional[bool] = None, + terms_of_service_url: Optional[str] = None, + contact: Optional["ApiContactInformation"] = None, + license: Optional["ApiLicenseInformation"] = None, display_name: Optional[str] = None, service_url: Optional[str] = None, path: Optional[str] = None, @@ -3278,6 +3550,9 @@ def __init__( self.api_version_description = api_version_description self.api_version_set_id = api_version_set_id self.subscription_required = subscription_required + self.terms_of_service_url = terms_of_service_url + self.contact = contact + self.license = license self.display_name = display_name self.service_url = service_url self.path = path @@ -3307,7 +3582,7 @@ def __init__( class ApiVersionSetCollection(msrest.serialization.Model): - """Paged Api Version Set list representation. + """Paged API Version Set list representation. :param value: Page values. :type value: list[~azure.mgmt.apimanagement.models.ApiVersionSetContract] @@ -3338,7 +3613,7 @@ def __init__( class ApiVersionSetContract(Resource): - """Api Version Set Contract details. + """API Version Set Contract details. Variables are only populated by the server, and will be ignored when sending a request. @@ -3453,7 +3728,7 @@ def __init__( class ApiVersionSetEntityBase(msrest.serialization.Model): - """Api Version set base parameters. + """API Version set base parameters. :param description: Description of API Version Set. :type description: str @@ -3541,7 +3816,7 @@ def __init__( class ApiVersionSetUpdateParameters(msrest.serialization.Model): - """Parameters to update or create an Api Version Set Contract. + """Parameters to update or create an API Version Set Contract. :param description: Description of API Version Set. :type description: str @@ -3648,15 +3923,15 @@ class AssociationContract(Resource): :vartype name: str :ivar type: Resource type for API Management resource. :vartype type: str - :ivar provisioning_state: Provisioning state. Default value: "created". - :vartype provisioning_state: str + :param provisioning_state: Provisioning state. The only acceptable values to pass in are None + and "created". The default value is None. + :type provisioning_state: str """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'provisioning_state': {'constant': True}, } _attribute_map = { @@ -3666,13 +3941,14 @@ class AssociationContract(Resource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - provisioning_state = "created" - def __init__( self, + *, + provisioning_state: Optional[str] = None, **kwargs ): super(AssociationContract, self).__init__(**kwargs) + self.provisioning_state = provisioning_state class AuthenticationSettingsContract(msrest.serialization.Model): @@ -3765,8 +4041,8 @@ class AuthorizationServerContract(Resource): security. :type support_state: bool :param default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing space- - delimited values. + overridden at the API level. Should be provided in the form of a string containing + space-delimited values. :type default_scope: str :param bearer_token_sending_methods: Specifies the mechanism by which access token is passed to the API. @@ -3892,8 +4168,8 @@ class AuthorizationServerContractBaseProperties(msrest.serialization.Model): security. :type support_state: bool :param default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing space- - delimited values. + overridden at the API level. Should be provided in the form of a string containing + space-delimited values. :type default_scope: str :param bearer_token_sending_methods: Specifies the mechanism by which access token is passed to the API. @@ -3975,8 +4251,8 @@ class AuthorizationServerContractProperties(AuthorizationServerContractBasePrope security. :type support_state: bool :param default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing space- - delimited values. + overridden at the API level. Should be provided in the form of a string containing + space-delimited values. :type default_scope: str :param bearer_token_sending_methods: Specifies the mechanism by which access token is passed to the API. @@ -4131,8 +4407,8 @@ class AuthorizationServerUpdateContract(Resource): security. :type support_state: bool :param default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing space- - delimited values. + overridden at the API level. Should be provided in the form of a string containing + space-delimited values. :type default_scope: str :param bearer_token_sending_methods: Specifies the mechanism by which access token is passed to the API. @@ -4258,8 +4534,8 @@ class AuthorizationServerUpdateContractProperties(AuthorizationServerContractBas security. :type support_state: bool :param default_scope: Access token scope that is going to be requested by default. Can be - overridden at the API level. Should be provided in the form of a string containing space- - delimited values. + overridden at the API level. Should be provided in the form of a string containing + space-delimited values. :type default_scope: str :param bearer_token_sending_methods: Specifies the mechanism by which access token is passed to the API. @@ -4385,7 +4661,7 @@ class BackendBaseParameters(msrest.serialization.Model): :param description: Backend Description. :type description: str :param resource_id: Management Uri of the Resource in External System. This url can be the Arm - Resource Id of Logic Apps, Function Apps or Api Apps. + Resource Id of Logic Apps, Function Apps or API Apps. :type resource_id: str :param properties: Backend Properties contract. :type properties: ~azure.mgmt.apimanagement.models.BackendProperties @@ -4482,7 +4758,7 @@ class BackendContract(Resource): :param description: Backend Description. :type description: str :param resource_id: Management Uri of the Resource in External System. This url can be the Arm - Resource Id of Logic Apps, Function Apps or Api Apps. + Resource Id of Logic Apps, Function Apps or API Apps. :type resource_id: str :param properties: Backend Properties contract. :type properties: ~azure.mgmt.apimanagement.models.BackendProperties @@ -4559,7 +4835,7 @@ class BackendContractProperties(BackendBaseParameters): :param description: Backend Description. :type description: str :param resource_id: Management Uri of the Resource in External System. This url can be the Arm - Resource Id of Logic Apps, Function Apps or Api Apps. + Resource Id of Logic Apps, Function Apps or API Apps. :type resource_id: str :param properties: Backend Properties contract. :type properties: ~azure.mgmt.apimanagement.models.BackendProperties @@ -4852,7 +5128,7 @@ class BackendUpdateParameterProperties(BackendBaseParameters): :param description: Backend Description. :type description: str :param resource_id: Management Uri of the Resource in External System. This url can be the Arm - Resource Id of Logic Apps, Function Apps or Api Apps. + Resource Id of Logic Apps, Function Apps or API Apps. :type resource_id: str :param properties: Backend Properties contract. :type properties: ~azure.mgmt.apimanagement.models.BackendProperties @@ -4914,7 +5190,7 @@ class BackendUpdateParameters(msrest.serialization.Model): :param description: Backend Description. :type description: str :param resource_id: Management Uri of the Resource in External System. This url can be the Arm - Resource Id of Logic Apps, Function Apps or Api Apps. + Resource Id of Logic Apps, Function Apps or API Apps. :type resource_id: str :param properties: Backend Properties contract. :type properties: ~azure.mgmt.apimanagement.models.BackendProperties @@ -5354,6 +5630,325 @@ def __init__( self.client_secret = client_secret +class ConnectivityCheckRequest(msrest.serialization.Model): + """A request to perform the connectivity check operation on a API Management service. + + All required parameters must be populated in order to send to Azure. + + :param source: Required. Definitions about the connectivity check origin. + :type source: ~azure.mgmt.apimanagement.models.ConnectivityCheckRequestSource + :param destination: Required. The connectivity check operation destination. + :type destination: ~azure.mgmt.apimanagement.models.ConnectivityCheckRequestDestination + :param preferred_ip_version: The IP version to be used. Only IPv4 is supported for now. + Possible values include: "IPv4". + :type preferred_ip_version: str or ~azure.mgmt.apimanagement.models.PreferredIPVersion + :param protocol: The request's protocol. Specific protocol configuration can be available based + on this selection. The specified destination address must be coherent with this value. Possible + values include: "TCP", "HTTP", "HTTPS". + :type protocol: str or ~azure.mgmt.apimanagement.models.ConnectivityCheckProtocol + :param protocol_configuration: Protocol-specific configuration. + :type protocol_configuration: + ~azure.mgmt.apimanagement.models.ConnectivityCheckRequestProtocolConfiguration + """ + + _validation = { + 'source': {'required': True}, + 'destination': {'required': True}, + } + + _attribute_map = { + 'source': {'key': 'source', 'type': 'ConnectivityCheckRequestSource'}, + 'destination': {'key': 'destination', 'type': 'ConnectivityCheckRequestDestination'}, + 'preferred_ip_version': {'key': 'preferredIPVersion', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'protocol_configuration': {'key': 'protocolConfiguration', 'type': 'ConnectivityCheckRequestProtocolConfiguration'}, + } + + def __init__( + self, + *, + source: "ConnectivityCheckRequestSource", + destination: "ConnectivityCheckRequestDestination", + preferred_ip_version: Optional[Union[str, "PreferredIPVersion"]] = None, + protocol: Optional[Union[str, "ConnectivityCheckProtocol"]] = None, + protocol_configuration: Optional["ConnectivityCheckRequestProtocolConfiguration"] = None, + **kwargs + ): + super(ConnectivityCheckRequest, self).__init__(**kwargs) + self.source = source + self.destination = destination + self.preferred_ip_version = preferred_ip_version + self.protocol = protocol + self.protocol_configuration = protocol_configuration + + +class ConnectivityCheckRequestDestination(msrest.serialization.Model): + """The connectivity check operation destination. + + All required parameters must be populated in order to send to Azure. + + :param address: Required. Destination address. Can either be an IP address or a FQDN. + :type address: str + :param port: Required. Destination port. + :type port: long + """ + + _validation = { + 'address': {'required': True}, + 'port': {'required': True}, + } + + _attribute_map = { + 'address': {'key': 'address', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'long'}, + } + + def __init__( + self, + *, + address: str, + port: int, + **kwargs + ): + super(ConnectivityCheckRequestDestination, self).__init__(**kwargs) + self.address = address + self.port = port + + +class ConnectivityCheckRequestProtocolConfiguration(msrest.serialization.Model): + """Protocol-specific configuration. + + :param http_configuration: Configuration for HTTP or HTTPS requests. + :type http_configuration: + ~azure.mgmt.apimanagement.models.ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration + """ + + _attribute_map = { + 'http_configuration': {'key': 'HTTPConfiguration', 'type': 'ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration'}, + } + + def __init__( + self, + *, + http_configuration: Optional["ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration"] = None, + **kwargs + ): + super(ConnectivityCheckRequestProtocolConfiguration, self).__init__(**kwargs) + self.http_configuration = http_configuration + + +class ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration(msrest.serialization.Model): + """Configuration for HTTP or HTTPS requests. + + :param method: The HTTP method to be used. Possible values include: "GET", "POST". + :type method: str or ~azure.mgmt.apimanagement.models.Method + :param valid_status_codes: List of HTTP status codes considered valid for the request response. + :type valid_status_codes: list[long] + :param headers: List of headers to be included in the request. + :type headers: list[~azure.mgmt.apimanagement.models.HTTPHeader] + """ + + _attribute_map = { + 'method': {'key': 'method', 'type': 'str'}, + 'valid_status_codes': {'key': 'validStatusCodes', 'type': '[long]'}, + 'headers': {'key': 'headers', 'type': '[HTTPHeader]'}, + } + + def __init__( + self, + *, + method: Optional[Union[str, "Method"]] = None, + valid_status_codes: Optional[List[int]] = None, + headers: Optional[List["HTTPHeader"]] = None, + **kwargs + ): + super(ConnectivityCheckRequestProtocolConfigurationHTTPConfiguration, self).__init__(**kwargs) + self.method = method + self.valid_status_codes = valid_status_codes + self.headers = headers + + +class ConnectivityCheckRequestSource(msrest.serialization.Model): + """Definitions about the connectivity check origin. + + All required parameters must be populated in order to send to Azure. + + :param region: Required. The API Management service region from where to start the connectivity + check operation. + :type region: str + :param instance: The particular VMSS instance from which to fire the request. + :type instance: long + """ + + _validation = { + 'region': {'required': True}, + } + + _attribute_map = { + 'region': {'key': 'region', 'type': 'str'}, + 'instance': {'key': 'instance', 'type': 'long'}, + } + + def __init__( + self, + *, + region: str, + instance: Optional[int] = None, + **kwargs + ): + super(ConnectivityCheckRequestSource, self).__init__(**kwargs) + self.region = region + self.instance = instance + + +class ConnectivityCheckResponse(msrest.serialization.Model): + """Information on the connectivity status. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar hops: List of hops between the source and the destination. + :vartype hops: list[~azure.mgmt.apimanagement.models.ConnectivityHop] + :ivar connection_status: The connection status. Possible values include: "Unknown", + "Connected", "Disconnected", "Degraded". + :vartype connection_status: str or ~azure.mgmt.apimanagement.models.ConnectionStatus + :ivar avg_latency_in_ms: Average latency in milliseconds. + :vartype avg_latency_in_ms: long + :ivar min_latency_in_ms: Minimum latency in milliseconds. + :vartype min_latency_in_ms: long + :ivar max_latency_in_ms: Maximum latency in milliseconds. + :vartype max_latency_in_ms: long + :ivar probes_sent: Total number of probes sent. + :vartype probes_sent: long + :ivar probes_failed: Number of failed probes. + :vartype probes_failed: long + """ + + _validation = { + 'hops': {'readonly': True}, + 'connection_status': {'readonly': True}, + 'avg_latency_in_ms': {'readonly': True}, + 'min_latency_in_ms': {'readonly': True}, + 'max_latency_in_ms': {'readonly': True}, + 'probes_sent': {'readonly': True}, + 'probes_failed': {'readonly': True}, + } + + _attribute_map = { + 'hops': {'key': 'hops', 'type': '[ConnectivityHop]'}, + 'connection_status': {'key': 'connectionStatus', 'type': 'str'}, + 'avg_latency_in_ms': {'key': 'avgLatencyInMs', 'type': 'long'}, + 'min_latency_in_ms': {'key': 'minLatencyInMs', 'type': 'long'}, + 'max_latency_in_ms': {'key': 'maxLatencyInMs', 'type': 'long'}, + 'probes_sent': {'key': 'probesSent', 'type': 'long'}, + 'probes_failed': {'key': 'probesFailed', 'type': 'long'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityCheckResponse, self).__init__(**kwargs) + self.hops = None + self.connection_status = None + self.avg_latency_in_ms = None + self.min_latency_in_ms = None + self.max_latency_in_ms = None + self.probes_sent = None + self.probes_failed = None + + +class ConnectivityHop(msrest.serialization.Model): + """Information about a hop between the source and the destination. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar type: The type of the hop. + :vartype type: str + :ivar id: The ID of the hop. + :vartype id: str + :ivar address: The IP address of the hop. + :vartype address: str + :ivar resource_id: The ID of the resource corresponding to this hop. + :vartype resource_id: str + :ivar next_hop_ids: List of next hop identifiers. + :vartype next_hop_ids: list[str] + :ivar issues: List of issues. + :vartype issues: list[~azure.mgmt.apimanagement.models.ConnectivityIssue] + """ + + _validation = { + 'type': {'readonly': True}, + 'id': {'readonly': True}, + 'address': {'readonly': True}, + 'resource_id': {'readonly': True}, + 'next_hop_ids': {'readonly': True}, + 'issues': {'readonly': True}, + } + + _attribute_map = { + 'type': {'key': 'type', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'address': {'key': 'address', 'type': 'str'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'next_hop_ids': {'key': 'nextHopIds', 'type': '[str]'}, + 'issues': {'key': 'issues', 'type': '[ConnectivityIssue]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityHop, self).__init__(**kwargs) + self.type = None + self.id = None + self.address = None + self.resource_id = None + self.next_hop_ids = None + self.issues = None + + +class ConnectivityIssue(msrest.serialization.Model): + """Information about an issue encountered in the process of checking for connectivity. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar origin: The origin of the issue. Possible values include: "Local", "Inbound", "Outbound". + :vartype origin: str or ~azure.mgmt.apimanagement.models.Origin + :ivar severity: The severity of the issue. Possible values include: "Error", "Warning". + :vartype severity: str or ~azure.mgmt.apimanagement.models.Severity + :ivar type: The type of issue. Possible values include: "Unknown", "AgentStopped", + "GuestFirewall", "DnsResolution", "SocketBind", "NetworkSecurityRule", "UserDefinedRoute", + "PortThrottled", "Platform". + :vartype type: str or ~azure.mgmt.apimanagement.models.IssueType + :ivar context: Provides additional context on the issue. + :vartype context: list[dict[str, str]] + """ + + _validation = { + 'origin': {'readonly': True}, + 'severity': {'readonly': True}, + 'type': {'readonly': True}, + 'context': {'readonly': True}, + } + + _attribute_map = { + 'origin': {'key': 'origin', 'type': 'str'}, + 'severity': {'key': 'severity', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'context': {'key': 'context', 'type': '[{str}]'}, + } + + def __init__( + self, + **kwargs + ): + super(ConnectivityIssue, self).__init__(**kwargs) + self.origin = None + self.severity = None + self.type = None + self.context = None + + class ConnectivityStatusContract(msrest.serialization.Model): """Details about connectivity to a resource. @@ -5466,7 +6061,7 @@ class ContentItemContract(Resource): :ivar type: Resource type for API Management resource. :vartype type: str :param properties: Properties of the content item. - :type properties: dict[str, object] + :type properties: dict[str, any] """ _validation = { @@ -5485,7 +6080,7 @@ class ContentItemContract(Resource): def __init__( self, *, - properties: Optional[Dict[str, object]] = None, + properties: Optional[Dict[str, Any]] = None, **kwargs ): super(ContentItemContract, self).__init__(**kwargs) @@ -5540,7 +6135,7 @@ class ContentTypeContract(Resource): :param description: Content type description. :type description: str :param schema: Content type schema. - :type schema: object + :type schema: any :param version: Content type version. :type version: str """ @@ -5568,7 +6163,7 @@ def __init__( id_properties_id: Optional[str] = None, name_properties_name: Optional[str] = None, description: Optional[str] = None, - schema: Optional[object] = None, + schema: Optional[Any] = None, version: Optional[str] = None, **kwargs ): @@ -5633,7 +6228,7 @@ def __init__( class DeletedServiceContract(Resource): - """Deleted Api Management Service information. + """Deleted API Management Service information. Variables are only populated by the server, and will be ignored when sending a request. @@ -5643,7 +6238,7 @@ class DeletedServiceContract(Resource): :vartype name: str :ivar type: Resource type for API Management resource. :vartype type: str - :ivar location: Api Management Service Master Location. + :ivar location: API Management Service Master Location. :vartype location: str :param service_id: Fully-qualified API Management Service Resource ID. :type service_id: str @@ -5689,7 +6284,7 @@ def __init__( class DeletedServicesCollection(msrest.serialization.Model): - """Paged deleted Api Management Services List Representation. + """Paged deleted API Management Services List Representation. Variables are only populated by the server, and will be ignored when sending a request. @@ -5910,7 +6505,7 @@ class EmailTemplateContract(Resource): :type title: str :param description: Description of the Email Template. :type description: str - :ivar is_default: Whether the template is the default template provided by Api Management or + :ivar is_default: Whether the template is the default template provided by API Management or has been edited. :vartype is_default: bool :param parameters: Email Template Parameter values. @@ -6042,6 +6637,58 @@ def __init__( self.parameters = parameters +class EndpointDependency(msrest.serialization.Model): + """A domain name that a service is reached at. + + :param domain_name: The domain name of the dependency. + :type domain_name: str + :param endpoint_details: The Ports used when connecting to DomainName. + :type endpoint_details: list[~azure.mgmt.apimanagement.models.EndpointDetail] + """ + + _attribute_map = { + 'domain_name': {'key': 'domainName', 'type': 'str'}, + 'endpoint_details': {'key': 'endpointDetails', 'type': '[EndpointDetail]'}, + } + + def __init__( + self, + *, + domain_name: Optional[str] = None, + endpoint_details: Optional[List["EndpointDetail"]] = None, + **kwargs + ): + super(EndpointDependency, self).__init__(**kwargs) + self.domain_name = domain_name + self.endpoint_details = endpoint_details + + +class EndpointDetail(msrest.serialization.Model): + """Current TCP connectivity information from the Api Management Service to a single endpoint. + + :param port: The port an endpoint is connected to. + :type port: int + :param region: The region of the dependency. + :type region: str + """ + + _attribute_map = { + 'port': {'key': 'port', 'type': 'int'}, + 'region': {'key': 'region', 'type': 'str'}, + } + + def __init__( + self, + *, + port: Optional[int] = None, + region: Optional[str] = None, + **kwargs + ): + super(EndpointDetail, self).__init__(**kwargs) + self.port = port + self.region = region + + class ErrorFieldContract(msrest.serialization.Model): """Error Field contract. @@ -6776,6 +7423,12 @@ class HostnameConfiguration(msrest.serialization.Model): :type negotiate_client_certificate: bool :param certificate: Certificate information. :type certificate: ~azure.mgmt.apimanagement.models.CertificateInformation + :param certificate_source: Certificate Source. Possible values include: "Managed", "KeyVault", + "Custom", "BuiltIn". + :type certificate_source: str or ~azure.mgmt.apimanagement.models.CertificateSource + :param certificate_status: Certificate Status. Possible values include: "Completed", "Failed", + "InProgress". + :type certificate_status: str or ~azure.mgmt.apimanagement.models.CertificateStatus """ _validation = { @@ -6793,6 +7446,8 @@ class HostnameConfiguration(msrest.serialization.Model): 'default_ssl_binding': {'key': 'defaultSslBinding', 'type': 'bool'}, 'negotiate_client_certificate': {'key': 'negotiateClientCertificate', 'type': 'bool'}, 'certificate': {'key': 'certificate', 'type': 'CertificateInformation'}, + 'certificate_source': {'key': 'certificateSource', 'type': 'str'}, + 'certificate_status': {'key': 'certificateStatus', 'type': 'str'}, } def __init__( @@ -6807,6 +7462,8 @@ def __init__( default_ssl_binding: Optional[bool] = False, negotiate_client_certificate: Optional[bool] = False, certificate: Optional["CertificateInformation"] = None, + certificate_source: Optional[Union[str, "CertificateSource"]] = None, + certificate_status: Optional[Union[str, "CertificateStatus"]] = None, **kwargs ): super(HostnameConfiguration, self).__init__(**kwargs) @@ -6819,6 +7476,41 @@ def __init__( self.default_ssl_binding = default_ssl_binding self.negotiate_client_certificate = negotiate_client_certificate self.certificate = certificate + self.certificate_source = certificate_source + self.certificate_status = certificate_status + + +class HTTPHeader(msrest.serialization.Model): + """HTTP header and it's value. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. Header name. + :type name: str + :param value: Required. Header value. + :type value: str + """ + + _validation = { + 'name': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'value': {'key': 'value', 'type': 'str'}, + } + + def __init__( + self, + *, + name: str, + value: str, + **kwargs + ): + super(HTTPHeader, self).__init__(**kwargs) + self.name = name + self.value = value class HttpMessageDiagnostic(msrest.serialization.Model): @@ -7902,7 +8594,7 @@ class KeyVaultContractCreateProperties(msrest.serialization.Model): """Create keyVault contract details. :param secret_identifier: Key vault secret identifier for fetching secret. Providing a - versioned secret will prevent auto-refresh. This requires Api Management service to be + versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi. :type secret_identifier: str :param identity_client_id: SystemAssignedIdentity or UserAssignedIdentity Client Id which will @@ -7931,7 +8623,7 @@ class KeyVaultContractProperties(KeyVaultContractCreateProperties): """KeyVault contract details. :param secret_identifier: Key vault secret identifier for fetching secret. Providing a - versioned secret will prevent auto-refresh. This requires Api Management service to be + versioned secret will prevent auto-refresh. This requires API Management service to be configured with aka.ms/apimmsi. :type secret_identifier: str :param identity_client_id: SystemAssignedIdentity or UserAssignedIdentity Client Id which will @@ -8886,7 +9578,7 @@ class Operation(msrest.serialization.Model): :param origin: The operation origin. :type origin: str :param properties: The operation properties. - :type properties: object + :type properties: any """ _attribute_map = { @@ -8902,7 +9594,7 @@ def __init__( name: Optional[str] = None, display: Optional["OperationDisplay"] = None, origin: Optional[str] = None, - properties: Optional[object] = None, + properties: Optional[Any] = None, **kwargs ): super(Operation, self).__init__(**kwargs) @@ -8949,7 +9641,7 @@ def __init__( class OperationContract(Resource): - """Api Operation details. + """API Operation details. Variables are only populated by the server, and will be ignored when sending a request. @@ -9027,7 +9719,7 @@ def __init__( class OperationEntityBaseContract(msrest.serialization.Model): - """Api Operation Entity Base Contract details. + """API Operation Entity Base Contract details. :param template_parameters: Collection of URL template parameters. :type template_parameters: list[~azure.mgmt.apimanagement.models.ParameterContract] @@ -9195,13 +9887,19 @@ def __init__( self.next_link = next_link -class OperationResultContract(msrest.serialization.Model): - """Operation Result. +class OperationResultContract(Resource): + """Long Running Git Operation Results. Variables are only populated by the server, and will be ignored when sending a request. - :param id: Operation result identifier. - :type id: str + :ivar id: Resource ID. + :vartype id: str + :ivar name: Resource name. + :vartype name: str + :ivar type: Resource type for API Management resource. + :vartype type: str + :param id_properties_id: Operation result identifier. + :type id_properties_id: str :param status: Status of an async operation. Possible values include: "Started", "InProgress", "Succeeded", "Failed". :type status: str or ~azure.mgmt.apimanagement.models.AsyncOperationStatus @@ -9222,23 +9920,29 @@ class OperationResultContract(msrest.serialization.Model): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'action_log': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, - 'status': {'key': 'status', 'type': 'str'}, - 'started': {'key': 'started', 'type': 'iso-8601'}, - 'updated': {'key': 'updated', 'type': 'iso-8601'}, - 'result_info': {'key': 'resultInfo', 'type': 'str'}, - 'error': {'key': 'error', 'type': 'ErrorResponseBody'}, - 'action_log': {'key': 'actionLog', 'type': '[OperationResultLogItemContract]'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'id_properties_id': {'key': 'properties.id', 'type': 'str'}, + 'status': {'key': 'properties.status', 'type': 'str'}, + 'started': {'key': 'properties.started', 'type': 'iso-8601'}, + 'updated': {'key': 'properties.updated', 'type': 'iso-8601'}, + 'result_info': {'key': 'properties.resultInfo', 'type': 'str'}, + 'error': {'key': 'properties.error', 'type': 'ErrorResponseBody'}, + 'action_log': {'key': 'properties.actionLog', 'type': '[OperationResultLogItemContract]'}, } def __init__( self, *, - id: Optional[str] = None, + id_properties_id: Optional[str] = None, status: Optional[Union[str, "AsyncOperationStatus"]] = None, started: Optional[datetime.datetime] = None, updated: Optional[datetime.datetime] = None, @@ -9247,7 +9951,7 @@ def __init__( **kwargs ): super(OperationResultContract, self).__init__(**kwargs) - self.id = id + self.id_properties_id = id_properties_id self.status = status self.started = started self.updated = updated @@ -9296,11 +10000,11 @@ class OperationTagResourceContractProperties(msrest.serialization.Model): :type id: str :ivar name: Operation name. :vartype name: str - :ivar api_name: Api Name. + :ivar api_name: API Name. :vartype api_name: str - :ivar api_revision: Api Revision. + :ivar api_revision: API Revision. :vartype api_revision: str - :ivar api_version: Api Version. + :ivar api_version: API Version. :vartype api_version: str :ivar description: Operation Description. :vartype description: str @@ -9351,7 +10055,7 @@ def __init__( class OperationUpdateContract(msrest.serialization.Model): - """Api Operation Update Contract details. + """API Operation Update Contract details. :param template_parameters: Collection of URL template parameters. :type template_parameters: list[~azure.mgmt.apimanagement.models.ParameterContract] @@ -9473,6 +10177,67 @@ def __init__( self.url_template = url_template +class OutboundEnvironmentEndpoint(msrest.serialization.Model): + """Endpoints accessed for a common purpose that the Api Management Service requires outbound network access to. + + :param category: The type of service accessed by the Api Management Service, e.g., Azure + Storage, Azure SQL Database, and Azure Active Directory. + :type category: str + :param endpoints: The endpoints that the Api Management Service reaches the service at. + :type endpoints: list[~azure.mgmt.apimanagement.models.EndpointDependency] + """ + + _attribute_map = { + 'category': {'key': 'category', 'type': 'str'}, + 'endpoints': {'key': 'endpoints', 'type': '[EndpointDependency]'}, + } + + def __init__( + self, + *, + category: Optional[str] = None, + endpoints: Optional[List["EndpointDependency"]] = None, + **kwargs + ): + super(OutboundEnvironmentEndpoint, self).__init__(**kwargs) + self.category = category + self.endpoints = endpoints + + +class OutboundEnvironmentEndpointList(msrest.serialization.Model): + """Collection of Outbound Environment Endpoints. + + Variables are only populated by the server, and will be ignored when sending a request. + + All required parameters must be populated in order to send to Azure. + + :param value: Required. Collection of resources. + :type value: list[~azure.mgmt.apimanagement.models.OutboundEnvironmentEndpoint] + :ivar next_link: Link to next page of resources. + :vartype next_link: str + """ + + _validation = { + 'value': {'required': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[OutboundEnvironmentEndpoint]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: List["OutboundEnvironmentEndpoint"], + **kwargs + ): + super(OutboundEnvironmentEndpointList, self).__init__(**kwargs) + self.value = value + self.next_link = None + + class ParameterContract(msrest.serialization.Model): """Operation parameters details. @@ -9490,6 +10255,10 @@ class ParameterContract(msrest.serialization.Model): :type required: bool :param values: Parameter values. :type values: list[str] + :param schema_id: Schema identifier. + :type schema_id: str + :param type_name: Type name defined by the schema. + :type type_name: str """ _validation = { @@ -9504,6 +10273,8 @@ class ParameterContract(msrest.serialization.Model): 'default_value': {'key': 'defaultValue', 'type': 'str'}, 'required': {'key': 'required', 'type': 'bool'}, 'values': {'key': 'values', 'type': '[str]'}, + 'schema_id': {'key': 'schemaId', 'type': 'str'}, + 'type_name': {'key': 'typeName', 'type': 'str'}, } def __init__( @@ -9515,6 +10286,8 @@ def __init__( default_value: Optional[str] = None, required: Optional[bool] = None, values: Optional[List[str]] = None, + schema_id: Optional[str] = None, + type_name: Optional[str] = None, **kwargs ): super(ParameterContract, self).__init__(**kwargs) @@ -9524,6 +10297,8 @@ def __init__( self.default_value = default_value self.required = required self.values = values + self.schema_id = schema_id + self.type_name = type_name class PipelineDiagnosticSettings(msrest.serialization.Model): @@ -9781,7 +10556,7 @@ def __init__( class PortalRevisionContract(Resource): - """Portal revisions contract details. + """Portal Revision's contract details. Variables are only populated by the server, and will be ignored when sending a request. @@ -9795,12 +10570,12 @@ class PortalRevisionContract(Resource): :type description: str :ivar status_details: Portal revision publishing status details. :vartype status_details: str - :ivar status: Portal revision publishing status. Possible values include: "pending", + :ivar status: Status of the portal's revision. Possible values include: "pending", "publishing", "completed", "failed". :vartype status: str or ~azure.mgmt.apimanagement.models.PortalRevisionStatus - :param is_current: Indicates if the Portal Revision is public. + :param is_current: Indicates if the portal's revision is public. :type is_current: bool - :ivar created_date_time: Portal revision creation date and time. + :ivar created_date_time: Portal's revision creation date and time. :vartype created_date_time: ~datetime.datetime :ivar updated_date_time: Last updated date and time. :vartype updated_date_time: ~datetime.datetime @@ -11603,7 +12378,7 @@ class SchemaCollection(msrest.serialization.Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar value: Api Schema Contract value. + :ivar value: API Schema Contract value. :vartype value: list[~azure.mgmt.apimanagement.models.SchemaContract] :param count: Total record count number. :type count: long @@ -11652,11 +12427,8 @@ class SchemaContract(Resource): ``application/vnd.oai.openapi.components+json``
- ``WADL Schema`` use ``application/vnd.ms-azure-apim.wadl.grammars+xml``. :type content_type: str - :param value: Json escaped string defining the document representing the Schema. Used for - schemas other than Swagger/OpenAPI. - :type value: str - :param definitions: Types definitions. Used for Swagger/OpenAPI schemas only, null otherwise. - :type definitions: object + :param document: Create or update Properties of the Schema Document. + :type document: any """ _validation = { @@ -11670,22 +12442,19 @@ class SchemaContract(Resource): 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'content_type': {'key': 'properties.contentType', 'type': 'str'}, - 'value': {'key': 'properties.document.value', 'type': 'str'}, - 'definitions': {'key': 'properties.document.definitions', 'type': 'object'}, + 'document': {'key': 'properties.document', 'type': 'object'}, } def __init__( self, *, content_type: Optional[str] = None, - value: Optional[str] = None, - definitions: Optional[object] = None, + document: Optional[Any] = None, **kwargs ): super(SchemaContract, self).__init__(**kwargs) self.content_type = content_type - self.value = value - self.definitions = definitions + self.document = document class SubscriptionCollection(msrest.serialization.Model): @@ -11756,8 +12525,8 @@ class SubscriptionContract(Resource): :type start_date: ~datetime.datetime :param expiration_date: Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by - using the ``state`` property. The date conforms to the following format: ``yyyy-MM- - ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + using the ``state`` property. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. :type expiration_date: ~datetime.datetime :param end_date: Date when subscription was cancelled or expired. The setting is for audit purposes only and the subscription is not automatically cancelled. The subscription lifecycle @@ -11997,8 +12766,8 @@ class SubscriptionUpdateParameters(msrest.serialization.Model): :type scope: str :param expiration_date: Subscription expiration date. The setting is for audit purposes only and the subscription is not automatically expired. The subscription lifecycle can be managed by - using the ``state`` property. The date conforms to the following format: ``yyyy-MM- - ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. + using the ``state`` property. The date conforms to the following format: + ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. :type expiration_date: ~datetime.datetime :param display_name: Subscription name. :type display_name: str @@ -12065,6 +12834,54 @@ def __init__( self.allow_tracing = allow_tracing +class SystemData(msrest.serialization.Model): + """Metadata pertaining to creation and last modification of the resource. + + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. Possible values + include: "User", "Application", "ManagedIdentity", "Key". + :type created_by_type: str or ~azure.mgmt.apimanagement.models.CreatedByType + :param created_at: The timestamp of resource creation (UTC). + :type created_at: ~datetime.datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the resource. Possible + values include: "User", "Application", "ManagedIdentity", "Key". + :type last_modified_by_type: str or ~azure.mgmt.apimanagement.models.CreatedByType + :param last_modified_at: The timestamp of resource last modification (UTC). + :type last_modified_at: ~datetime.datetime + """ + + _attribute_map = { + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, + } + + def __init__( + self, + *, + created_by: Optional[str] = None, + created_by_type: Optional[Union[str, "CreatedByType"]] = None, + created_at: Optional[datetime.datetime] = None, + last_modified_by: Optional[str] = None, + last_modified_by_type: Optional[Union[str, "CreatedByType"]] = None, + last_modified_at: Optional[datetime.datetime] = None, + **kwargs + ): + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at + + class TagCollection(msrest.serialization.Model): """Paged Tag list representation. @@ -12402,7 +13219,7 @@ class TagResourceContract(msrest.serialization.Model): :param tag: Required. Tag associated with the resource. :type tag: ~azure.mgmt.apimanagement.models.TagResourceContractProperties - :param api: Api associated with the tag. + :param api: API associated with the tag. :type api: ~azure.mgmt.apimanagement.models.ApiTagResourceContractProperties :param operation: Operation associated with the tag. :type operation: ~azure.mgmt.apimanagement.models.OperationTagResourceContractProperties @@ -12468,7 +13285,7 @@ def __init__( class TenantConfigurationSyncStateContract(msrest.serialization.Model): - """Tenant Configuration Synchronization State. + """Result of Tenant Configuration Sync State. :param branch: The name of Git branch. :type branch: str @@ -12488,16 +13305,19 @@ class TenantConfigurationSyncStateContract(msrest.serialization.Model): conforms to the following format: ``yyyy-MM-ddTHH:mm:ssZ`` as specified by the ISO 8601 standard. :type configuration_change_date: ~datetime.datetime + :param last_operation_id: Most recent tenant configuration operation identifier. + :type last_operation_id: str """ _attribute_map = { - 'branch': {'key': 'branch', 'type': 'str'}, - 'commit_id': {'key': 'commitId', 'type': 'str'}, - 'is_export': {'key': 'isExport', 'type': 'bool'}, - 'is_synced': {'key': 'isSynced', 'type': 'bool'}, - 'is_git_enabled': {'key': 'isGitEnabled', 'type': 'bool'}, - 'sync_date': {'key': 'syncDate', 'type': 'iso-8601'}, - 'configuration_change_date': {'key': 'configurationChangeDate', 'type': 'iso-8601'}, + 'branch': {'key': 'properties.branch', 'type': 'str'}, + 'commit_id': {'key': 'properties.commitId', 'type': 'str'}, + 'is_export': {'key': 'properties.isExport', 'type': 'bool'}, + 'is_synced': {'key': 'properties.isSynced', 'type': 'bool'}, + 'is_git_enabled': {'key': 'properties.isGitEnabled', 'type': 'bool'}, + 'sync_date': {'key': 'properties.syncDate', 'type': 'iso-8601'}, + 'configuration_change_date': {'key': 'properties.configurationChangeDate', 'type': 'iso-8601'}, + 'last_operation_id': {'key': 'properties.lastOperationId', 'type': 'str'}, } def __init__( @@ -12510,6 +13330,7 @@ def __init__( is_git_enabled: Optional[bool] = None, sync_date: Optional[datetime.datetime] = None, configuration_change_date: Optional[datetime.datetime] = None, + last_operation_id: Optional[str] = None, **kwargs ): super(TenantConfigurationSyncStateContract, self).__init__(**kwargs) @@ -12520,6 +13341,7 @@ def __init__( self.is_git_enabled = is_git_enabled self.sync_date = sync_date self.configuration_change_date = configuration_change_date + self.last_operation_id = last_operation_id class TenantSettingsCollection(msrest.serialization.Model): diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py index cd77fa38b0ba..5496279bc3ea 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/__init__.py @@ -50,6 +50,7 @@ from ._notification_recipient_user_operations import NotificationRecipientUserOperations from ._notification_recipient_email_operations import NotificationRecipientEmailOperations from ._open_id_connect_provider_operations import OpenIdConnectProviderOperations +from ._outbound_network_dependencies_endpoints_operations import OutboundNetworkDependenciesEndpointsOperations from ._policy_operations import PolicyOperations from ._policy_description_operations import PolicyDescriptionOperations from ._portal_revision_operations import PortalRevisionOperations @@ -78,6 +79,7 @@ from ._user_subscription_operations import UserSubscriptionOperations from ._user_identities_operations import UserIdentitiesOperations from ._user_confirmation_password_operations import UserConfirmationPasswordOperations +from ._api_management_client_operations import ApiManagementClientOperationsMixin __all__ = [ 'ApiOperations', @@ -124,6 +126,7 @@ 'NotificationRecipientUserOperations', 'NotificationRecipientEmailOperations', 'OpenIdConnectProviderOperations', + 'OutboundNetworkDependenciesEndpointsOperations', 'PolicyOperations', 'PolicyDescriptionOperations', 'PortalRevisionOperations', @@ -152,4 +155,5 @@ 'UserSubscriptionOperations', 'UserIdentitiesOperations', 'UserConfirmationPasswordOperations', + 'ApiManagementClientOperationsMixin', ] diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_diagnostic_operations.py index 6a52d4069cb6..8d92fca75b28 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_diagnostic_operations.py @@ -82,7 +82,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -131,7 +131,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) @@ -172,7 +172,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -200,7 +200,7 @@ def get_entity_tag( 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) response_headers = {} @@ -242,7 +242,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -270,7 +270,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) response_headers = {} @@ -320,7 +320,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -355,7 +355,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -410,7 +410,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -444,7 +444,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -491,7 +491,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -520,7 +520,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_export_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_export_operations.py index b577831e02f5..62c5587e8c5b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_export_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_export_operations.py @@ -79,7 +79,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -108,7 +108,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('ApiExportResult', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_attachment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_attachment_operations.py index 457d7aee7c94..e814cfaba9db 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_attachment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_attachment_operations.py @@ -87,7 +87,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -137,7 +137,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) @@ -183,7 +183,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -212,7 +212,7 @@ def get_entity_tag( 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) response_headers = {} @@ -258,7 +258,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -287,7 +287,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) response_headers = {} @@ -341,7 +341,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -377,7 +377,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -433,7 +433,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -463,7 +463,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_comment_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_comment_operations.py index 361d4f5f8fdd..6c515748982a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_comment_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_comment_operations.py @@ -87,7 +87,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -137,7 +137,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) @@ -182,7 +182,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -211,7 +211,7 @@ def get_entity_tag( 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) response_headers = {} @@ -256,7 +256,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -285,7 +285,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) response_headers = {} @@ -338,7 +338,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -374,7 +374,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -429,7 +429,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -459,7 +459,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_operations.py index f85a22fa59b6..f741b1ee13c0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_issue_operations.py @@ -87,7 +87,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -138,7 +138,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) @@ -179,7 +179,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -207,7 +207,7 @@ def get_entity_tag( 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) response_headers = {} @@ -252,7 +252,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -282,7 +282,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) response_headers = {} @@ -332,7 +332,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -367,7 +367,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -422,7 +422,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -456,7 +456,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -503,7 +503,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -532,7 +532,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_client_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_client_operations.py new file mode 100644 index 000000000000..0f7cda2ea863 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_client_operations.py @@ -0,0 +1,157 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.core.polling import LROPoller, NoPolling, PollingMethod +from azure.mgmt.core.exceptions import ARMErrorFormat +from azure.mgmt.core.polling.arm_polling import ARMPolling + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class ApiManagementClientOperationsMixin(object): + + def _perform_connectivity_check_async_initial( + self, + resource_group_name, # type: str + service_name, # type: str + connectivity_check_request_params, # type: "_models.ConnectivityCheckRequest" + **kwargs # type: Any + ): + # type: (...) -> Optional["_models.ConnectivityCheckResponse"] + cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.ConnectivityCheckResponse"]] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01-preview" + content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" + + # Construct URL + url = self._perform_connectivity_check_async_initial.metadata['url'] # type: ignore + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(connectivity_check_request_params, 'ConnectivityCheckRequest') + body_content_kwargs['content'] = body_content + request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200, 202]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('ConnectivityCheckResponse', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + _perform_connectivity_check_async_initial.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/connectivityCheck'} # type: ignore + + def begin_perform_connectivity_check_async( + self, + resource_group_name, # type: str + service_name, # type: str + connectivity_check_request_params, # type: "_models.ConnectivityCheckRequest" + **kwargs # type: Any + ): + # type: (...) -> LROPoller["_models.ConnectivityCheckResponse"] + """Performs a connectivity check between the API Management service and a given destination, and + returns metrics for the connection, as well as errors encountered while trying to establish it. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :param connectivity_check_request_params: Connectivity Check request parameters. + :type connectivity_check_request_params: ~azure.mgmt.apimanagement.models.ConnectivityCheckRequest + :keyword callable cls: A custom type or function 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 ConnectivityCheckResponse or the result of cls(response) + :rtype: ~azure.core.polling.LROPoller[~azure.mgmt.apimanagement.models.ConnectivityCheckResponse] + :raises ~azure.core.exceptions.HttpResponseError: + """ + polling = kwargs.pop('polling', True) # type: Union[bool, PollingMethod] + cls = kwargs.pop('cls', None) # type: ClsType["_models.ConnectivityCheckResponse"] + 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._perform_connectivity_check_async_initial( + resource_group_name=resource_group_name, + service_name=service_name, + connectivity_check_request_params=connectivity_check_request_params, + 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('ConnectivityCheckResponse', 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'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + } + + if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, 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_perform_connectivity_check_async.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/connectivityCheck'} # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_operations_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_operations_operations.py index 03703a4bbb9c..65cad9b376d0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_operations_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_operations_operations.py @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_operations.py index 587ddda50884..ed71ca1e1508 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_operations.py @@ -60,16 +60,16 @@ def _restore_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._restore_initial.metadata['url'] # type: ignore path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -91,7 +91,7 @@ def _restore_initial( if response.status_code not in [200, 202]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = None @@ -120,13 +120,12 @@ def begin_restore( :type resource_group_name: str :param service_name: The name of the API Management service. :type service_name: str - :param parameters: Parameters supplied to the Restore API Management service from backup - operation. + :param parameters: Parameters supplied to the ApiManagementService_Restore operation. :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a 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 ApiManagementServiceResource or the result of cls(response) @@ -160,9 +159,9 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) @@ -192,16 +191,16 @@ def _backup_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self._backup_initial.metadata['url'] # type: ignore path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } url = self._client.format_url(url, **path_format_arguments) @@ -223,7 +222,7 @@ def _backup_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) deserialized = None @@ -255,8 +254,8 @@ def begin_backup( :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceBackupRestoreParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a 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 ApiManagementServiceResource or the result of cls(response) @@ -290,9 +289,9 @@ def get_long_running_output(pipeline_response): return deserialized path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), } if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs) @@ -322,7 +321,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -353,7 +352,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) deserialized = None @@ -388,8 +387,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceResource :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a 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 ApiManagementServiceResource or the result of cls(response) @@ -455,7 +454,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -486,7 +485,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) deserialized = None @@ -517,8 +516,8 @@ def begin_update( :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a 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 ApiManagementServiceResource or the result of cls(response) @@ -594,7 +593,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -620,7 +619,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('ApiManagementServiceResource', pipeline_response) @@ -643,7 +642,7 @@ def _delete_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -669,7 +668,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 @@ -697,8 +696,8 @@ def begin_delete( :type service_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) @@ -770,7 +769,7 @@ def list_by_resource_group( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -811,7 +810,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) @@ -839,7 +838,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -879,7 +878,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) @@ -913,7 +912,7 @@ def get_sso_token( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -939,7 +938,7 @@ def get_sso_token( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ApiManagementServiceGetSsoTokenResult', pipeline_response) @@ -970,7 +969,7 @@ def check_name_availability( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -999,7 +998,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('ApiManagementServiceNameAvailabilityResult', pipeline_response) @@ -1027,7 +1026,7 @@ def get_domain_ownership_identifier( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -1051,7 +1050,7 @@ def get_domain_ownership_identifier( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('ApiManagementServiceGetDomainOwnershipIdentifierResult', pipeline_response) @@ -1075,7 +1074,7 @@ def _apply_network_configuration_updates_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1109,7 +1108,7 @@ def _apply_network_configuration_updates_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) deserialized = None @@ -1143,8 +1142,8 @@ def begin_apply_network_configuration_updates( :type parameters: ~azure.mgmt.apimanagement.models.ApiManagementServiceApplyNetworkConfigurationParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a 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 ApiManagementServiceResource or the result of cls(response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_skus_operations.py index b84ceec3d65c..2973327cfe0d 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_skus_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_service_skus_operations.py @@ -70,7 +70,7 @@ def list_available_service_skus( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -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) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_skus_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_skus_operations.py index 606b228d6f03..031ffba927ab 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_skus_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_management_skus_operations.py @@ -62,7 +62,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_operations.py index 053fc6702ad9..0d51f85cb177 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_operations.py @@ -91,7 +91,7 @@ def list_by_api( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -142,7 +142,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_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -212,7 +212,7 @@ def get_entity_tag( 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) response_headers = {} @@ -255,7 +255,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -283,7 +283,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) response_headers = {} @@ -334,7 +334,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -369,7 +369,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -425,7 +425,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -459,7 +459,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -507,7 +507,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -536,7 +536,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_policy_operations.py index 07af63ce6f90..521c1ecc6509 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operation_policy_operations.py @@ -75,7 +75,7 @@ def list_by_operation( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -103,7 +103,7 @@ def list_by_operation( 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('PolicyCollection', pipeline_response) @@ -148,7 +148,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -177,7 +177,7 @@ def get_entity_tag( 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) response_headers = {} @@ -226,7 +226,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -257,7 +257,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) response_headers = {} @@ -311,7 +311,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -347,7 +347,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -403,7 +403,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -433,7 +433,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py index 2bc59fbd4090..198789d6159c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_operations.py @@ -92,7 +92,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -144,7 +144,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) @@ -182,7 +182,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -209,7 +209,7 @@ def get_entity_tag( 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) response_headers = {} @@ -248,7 +248,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json, application/vnd.swagger.doc+json, application/vnd.oai.openapi+json, application/vnd.sun.wadl+xml, application/wsdl+xml" # Construct URL @@ -275,7 +275,7 @@ def get( if response.status_code not in [200, 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) response_headers = {} @@ -308,7 +308,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -342,7 +342,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) response_headers = {} @@ -387,8 +387,8 @@ def begin_create_or_update( :type if_match: 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 ApiContract or the result of cls(response) @@ -481,7 +481,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -514,7 +514,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -561,7 +561,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -591,7 +591,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -642,7 +642,7 @@ def list_by_tags( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -692,7 +692,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_policy_operations.py index 3b3a4f7a8c79..3e91f56236b4 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_policy_operations.py @@ -71,7 +71,7 @@ def list_by_api( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -98,7 +98,7 @@ def list_by_api( 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('PolicyCollection', pipeline_response) @@ -139,7 +139,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -167,7 +167,7 @@ def get_entity_tag( 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) response_headers = {} @@ -212,7 +212,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json, application/vnd.ms-azure-apim.policy+xml, application/vnd.ms-azure-apim.policy.raw+xml" # Construct URL @@ -242,7 +242,7 @@ def get( if response.status_code not in [200, 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) response_headers = {} @@ -297,7 +297,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -332,7 +332,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -384,7 +384,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -413,7 +413,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_product_operations.py index 3b2d4e055715..33327167cf0a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_product_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_product_operations.py @@ -82,7 +82,7 @@ def list_by_apis( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -131,7 +131,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_release_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_release_operations.py index 974714437193..5b53d9f3f102 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_release_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_release_operations.py @@ -84,7 +84,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -133,7 +133,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) @@ -174,7 +174,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -202,7 +202,7 @@ def get_entity_tag( 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) response_headers = {} @@ -244,7 +244,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -272,7 +272,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) response_headers = {} @@ -322,7 +322,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -357,7 +357,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -412,7 +412,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -446,7 +446,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -493,7 +493,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -522,7 +522,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_revision_operations.py index ff3b094c1a1b..c3322bfa12c8 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_revision_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_revision_operations.py @@ -82,7 +82,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -131,7 +131,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_schema_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_schema_operations.py index 08b141624128..250a61803147 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_schema_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_schema_operations.py @@ -85,7 +85,7 @@ def list_by_api( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -134,7 +134,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_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -204,7 +204,7 @@ def get_entity_tag( 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) response_headers = {} @@ -247,7 +247,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -275,7 +275,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) response_headers = {} @@ -304,7 +304,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -339,7 +339,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) response_headers = {} @@ -388,8 +388,8 @@ def begin_create_or_update( :type if_match: 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 SchemaContract or the result of cls(response) @@ -488,7 +488,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -519,7 +519,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py index 769a3640ec3f..4c440b15dd61 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_tag_description_operations.py @@ -85,7 +85,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -134,7 +134,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_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -204,7 +204,7 @@ def get_entity_tag( 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) response_headers = {} @@ -247,7 +247,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -275,7 +275,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) response_headers = {} @@ -326,7 +326,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -361,7 +361,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -414,7 +414,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -443,7 +443,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_version_set_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_version_set_operations.py index e769a27c813f..4825f9ba6673 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_version_set_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_api_version_set_operations.py @@ -78,7 +78,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -126,7 +126,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) @@ -164,7 +164,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -191,7 +191,7 @@ def get_entity_tag( 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) response_headers = {} @@ -230,7 +230,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -257,7 +257,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) response_headers = {} @@ -304,7 +304,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -338,7 +338,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -390,7 +390,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -423,7 +423,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -467,7 +467,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -495,7 +495,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_server_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_server_operations.py index 504a75ac25a2..77c06467175b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_server_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_authorization_server_operations.py @@ -81,7 +81,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -129,7 +129,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) @@ -166,7 +166,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -193,7 +193,7 @@ def get_entity_tag( 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) response_headers = {} @@ -231,7 +231,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -258,7 +258,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) response_headers = {} @@ -304,7 +304,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -338,7 +338,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -389,7 +389,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -422,7 +422,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -465,7 +465,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -493,7 +493,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -527,7 +527,7 @@ def list_secrets( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -554,7 +554,7 @@ def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_backend_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_backend_operations.py index 1e545c86d65c..f49b4aac8f94 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_backend_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_backend_operations.py @@ -81,7 +81,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -129,7 +129,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) @@ -167,7 +167,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -194,7 +194,7 @@ def get_entity_tag( 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) response_headers = {} @@ -233,7 +233,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -260,7 +260,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) response_headers = {} @@ -307,7 +307,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -341,7 +341,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -393,7 +393,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -426,7 +426,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -470,7 +470,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -498,7 +498,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -537,7 +537,7 @@ def reconnect( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -572,7 +572,7 @@ def reconnect( if response.status_code not in [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: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_cache_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_cache_operations.py index b286d1af6a8a..157d7d428b53 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_cache_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_cache_operations.py @@ -74,7 +74,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -120,7 +120,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) @@ -158,7 +158,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -185,7 +185,7 @@ def get_entity_tag( 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) response_headers = {} @@ -224,7 +224,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -251,7 +251,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) response_headers = {} @@ -298,7 +298,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -332,7 +332,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -384,7 +384,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -417,7 +417,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -461,7 +461,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -489,7 +489,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_certificate_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_certificate_operations.py index a33ef140fa0a..ce67f2852467 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_certificate_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_certificate_operations.py @@ -86,7 +86,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -136,7 +136,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) @@ -174,7 +174,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -201,7 +201,7 @@ def get_entity_tag( 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) response_headers = {} @@ -240,7 +240,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -267,7 +267,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) response_headers = {} @@ -314,7 +314,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -348,7 +348,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -397,7 +397,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -425,7 +425,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -460,7 +460,7 @@ def refresh_secret( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -487,7 +487,7 @@ def refresh_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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py index cbd657ceedac..d2eca88cad0a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_item_operations.py @@ -53,7 +53,7 @@ def list_by_service( **kwargs # type: Any ): # type: (...) -> Iterable["_models.ContentItemCollection"] - """Returns list of content items. + """Lists developer portal's content items specified by the provided content type. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -71,7 +71,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -114,7 +114,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) @@ -134,7 +134,8 @@ def get_entity_tag( **kwargs # type: Any ): # type: (...) -> bool - """Returns content item metadata. + """Returns the entity state (ETag) version of the developer portal's content item specified by its + identifier. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -154,7 +155,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -182,7 +183,7 @@ def get_entity_tag( 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) response_headers = {} @@ -203,7 +204,7 @@ def get( **kwargs # type: Any ): # type: (...) -> "_models.ContentItemContract" - """Returns content item details. + """Returns the developer portal's content item specified by its identifier. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -223,7 +224,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -251,7 +252,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) response_headers = {} @@ -274,7 +275,7 @@ def create_or_update( **kwargs # type: Any ): # type: (...) -> "_models.ContentItemContract" - """Creates new content item. + """Creates a new developer portal's content item specified by the provided content type. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -297,7 +298,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -327,7 +328,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -355,7 +356,7 @@ def delete( **kwargs # type: Any ): # type: (...) -> None - """Removes specified content item. + """Removes the specified developer portal's content item. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -378,7 +379,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -407,7 +408,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py index b152732d21d3..95ad2415ce7f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_content_type_operations.py @@ -52,7 +52,8 @@ def list_by_service( **kwargs # type: Any ): # type: (...) -> Iterable["_models.ContentTypeCollection"] - """Returns list of content types. + """Lists the developer portal's content types. Content types describe content items' properties, + validation rules, and constraints. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -68,7 +69,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -110,7 +111,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) @@ -129,7 +130,8 @@ def get( **kwargs # type: Any ): # type: (...) -> "_models.ContentTypeContract" - """Gets API Management content type details. + """Gets the details of the developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -147,7 +149,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -174,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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -196,7 +198,9 @@ def create_or_update( **kwargs # type: Any ): # type: (...) -> "_models.ContentTypeContract" - """Creates or updates an Content Type. + """Creates or updates the developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. Custom content types' identifiers need to start + with the ``c-`` prefix. Built-in content types can't be modified. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -217,7 +221,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -246,7 +250,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -273,7 +277,9 @@ def delete( **kwargs # type: Any ): # type: (...) -> None - """Removes specified content type. + """Removes the specified developer portal's content type. Content types describe content items' + properties, validation rules, and constraints. Built-in content types (with identifiers + starting with the ``c-`` prefix) can't be removed. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -294,7 +300,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -322,7 +328,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_delegation_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_delegation_settings_operations.py index 666ffab87543..21894e02af4e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_delegation_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_delegation_settings_operations.py @@ -67,7 +67,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -93,7 +93,7 @@ def get_entity_tag( 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) response_headers = {} @@ -128,7 +128,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -154,7 +154,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) response_headers = {} @@ -197,7 +197,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -229,7 +229,7 @@ def update( if response.status_code not in [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: @@ -267,7 +267,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -300,7 +300,7 @@ def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PortalDelegationSettings', pipeline_response) @@ -334,7 +334,7 @@ def list_secrets( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -360,7 +360,7 @@ def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PortalSettingValidationKeyContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_deleted_services_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_deleted_services_operations.py index 894d328a9977..7fad065eb403 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_deleted_services_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_deleted_services_operations.py @@ -64,7 +64,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -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) @@ -138,7 +138,7 @@ def get_by_name( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -164,7 +164,7 @@ def get_by_name( 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('DeletedServiceContract', pipeline_response) @@ -187,7 +187,7 @@ def _purge_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -213,7 +213,7 @@ def _purge_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 @@ -241,8 +241,8 @@ def begin_purge( :type location: 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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py index 4ff4f0c47923..484294c28883 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_diagnostic_operations.py @@ -79,7 +79,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -127,7 +127,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) @@ -165,7 +165,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -192,7 +192,7 @@ def get_entity_tag( 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) response_headers = {} @@ -231,7 +231,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -258,7 +258,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) response_headers = {} @@ -305,7 +305,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -339,7 +339,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -391,7 +391,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -424,7 +424,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -468,7 +468,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -496,7 +496,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_email_template_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_email_template_operations.py index 883177d6c564..166ad0957c05 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_email_template_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_email_template_operations.py @@ -79,7 +79,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -127,7 +127,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) @@ -164,7 +164,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -191,7 +191,7 @@ def get_entity_tag( 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) response_headers = {} @@ -229,7 +229,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -256,7 +256,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) response_headers = {} @@ -302,7 +302,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -336,7 +336,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -384,7 +384,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -417,7 +417,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -460,7 +460,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -488,7 +488,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_api_operations.py index 9f30d17bd7bf..9ef464b196a2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_api_operations.py @@ -83,7 +83,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -132,7 +132,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) @@ -173,7 +173,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -201,7 +201,7 @@ def get_entity_tag( 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) response_headers = {} @@ -246,7 +246,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -282,7 +282,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -327,7 +327,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -355,7 +355,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_certificate_authority_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_certificate_authority_operations.py index 6f1b717a4446..f5536d9ddbb0 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_certificate_authority_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_certificate_authority_operations.py @@ -83,7 +83,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -132,7 +132,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) @@ -174,7 +174,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -202,7 +202,7 @@ def get_entity_tag( 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) response_headers = {} @@ -245,7 +245,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -273,7 +273,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) response_headers = {} @@ -324,7 +324,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -359,7 +359,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -412,7 +412,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -441,7 +441,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_hostname_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_hostname_configuration_operations.py index 10a71e9c8800..8ccfce811a3c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_hostname_configuration_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_hostname_configuration_operations.py @@ -84,7 +84,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -133,7 +133,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_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -204,7 +204,7 @@ def get_entity_tag( 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) response_headers = {} @@ -247,7 +247,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -275,7 +275,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) response_headers = {} @@ -326,7 +326,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -361,7 +361,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -414,7 +414,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -443,7 +443,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_operations.py index e3dc53c72665..c8134e8267d6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_gateway_operations.py @@ -82,7 +82,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -130,7 +130,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_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -195,7 +195,7 @@ def get_entity_tag( 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) response_headers = {} @@ -234,7 +234,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -261,7 +261,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) response_headers = {} @@ -308,7 +308,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -342,7 +342,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -394,7 +394,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -427,7 +427,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -471,7 +471,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -499,7 +499,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -534,7 +534,7 @@ def list_keys( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -561,7 +561,7 @@ def list_keys( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -604,7 +604,7 @@ def regenerate_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -636,7 +636,7 @@ def regenerate_key( if response.status_code not in [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: @@ -674,7 +674,7 @@ def generate_token( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -706,7 +706,7 @@ def generate_token( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('GatewayTokenContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_operations.py index 65eafa95ce1d..a90149a87ff2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_operations.py @@ -82,7 +82,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -130,7 +130,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_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -195,7 +195,7 @@ def get_entity_tag( 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) response_headers = {} @@ -234,7 +234,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -261,7 +261,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) response_headers = {} @@ -308,7 +308,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -342,7 +342,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -394,7 +394,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -427,7 +427,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -471,7 +471,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -499,7 +499,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_user_operations.py index 9c69bb915257..04cb9653f243 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_group_user_operations.py @@ -88,7 +88,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -137,7 +137,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) @@ -178,7 +178,7 @@ def check_entity_exists( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -206,7 +206,7 @@ def check_entity_exists( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -245,7 +245,7 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -273,7 +273,7 @@ def create( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_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: @@ -318,7 +318,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -346,7 +346,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_identity_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_identity_provider_operations.py index e82c28ca137c..777689cfb297 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_identity_provider_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_identity_provider_operations.py @@ -68,7 +68,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -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.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) @@ -147,7 +147,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -174,7 +174,7 @@ def get_entity_tag( 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) response_headers = {} @@ -213,7 +213,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -240,7 +240,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -286,7 +286,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -320,7 +320,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -371,7 +371,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -404,7 +404,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -447,7 +447,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -475,7 +475,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -509,7 +509,7 @@ def list_secrets( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -536,7 +536,7 @@ def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_issue_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_issue_operations.py index 9bbe646f5cb2..95d272daf4a2 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_issue_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_issue_operations.py @@ -84,7 +84,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -132,7 +132,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) @@ -170,7 +170,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -197,7 +197,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) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_logger_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_logger_operations.py index 7715e57d2241..f25d37d318b3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_logger_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_logger_operations.py @@ -82,7 +82,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -130,7 +130,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) @@ -167,7 +167,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -194,7 +194,7 @@ def get_entity_tag( 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) response_headers = {} @@ -232,7 +232,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -259,7 +259,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) response_headers = {} @@ -305,7 +305,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -339,7 +339,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -390,7 +390,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -423,7 +423,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -466,7 +466,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -494,7 +494,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_named_value_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_named_value_operations.py index 01aa814e68e0..ed783530af05 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_named_value_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_named_value_operations.py @@ -87,7 +87,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -137,7 +137,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) @@ -174,7 +174,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -201,7 +201,7 @@ def get_entity_tag( 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) response_headers = {} @@ -239,7 +239,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -266,7 +266,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) response_headers = {} @@ -294,7 +294,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -328,7 +328,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) response_headers = {} @@ -372,8 +372,8 @@ def begin_create_or_update( :type if_match: 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 NamedValueContract or the result of cls(response) @@ -447,7 +447,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -480,7 +480,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) response_headers = {} @@ -520,8 +520,8 @@ def begin_update( :type parameters: ~azure.mgmt.apimanagement.models.NamedValueUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a 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 NamedValueContract or the result of cls(response) @@ -610,7 +610,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -638,7 +638,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -672,7 +672,7 @@ def list_value( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -699,7 +699,7 @@ def list_value( 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) response_headers = {} @@ -725,7 +725,7 @@ def _refresh_secret_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -752,7 +752,7 @@ def _refresh_secret_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) response_headers = {} @@ -785,8 +785,8 @@ def begin_refresh_secret( :type named_value_id: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy + :keyword polling: 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 NamedValueContract or the result of cls(response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_network_status_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_network_status_operations.py index 78ed68367ad0..685c8faa21e6 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_network_status_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_network_status_operations.py @@ -69,7 +69,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -95,7 +95,7 @@ def list_by_service( 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('[NetworkStatusContractByLocation]', pipeline_response) @@ -135,7 +135,7 @@ def list_by_location( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -162,7 +162,7 @@ def list_by_location( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('NetworkStatusContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_operations.py index c47873fa919e..c2c719cebb4a 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_operations.py @@ -74,7 +74,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -120,7 +120,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) @@ -157,7 +157,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -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('NotificationContract', pipeline_response) @@ -225,7 +225,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -254,7 +254,7 @@ def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('NotificationContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_email_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_email_operations.py index 49e0350e90cc..31f70921e86b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_email_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_email_operations.py @@ -70,7 +70,7 @@ def list_by_notification( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -97,7 +97,7 @@ def list_by_notification( 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('RecipientEmailCollection', pipeline_response) @@ -137,7 +137,7 @@ def check_entity_exists( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -165,7 +165,7 @@ def check_entity_exists( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -203,7 +203,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -231,7 +231,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -275,7 +275,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -303,7 +303,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_user_operations.py index 726de087588c..1820ab7f8632 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_notification_recipient_user_operations.py @@ -70,7 +70,7 @@ def list_by_notification( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -97,7 +97,7 @@ def list_by_notification( 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('RecipientUserCollection', pipeline_response) @@ -137,7 +137,7 @@ def check_entity_exists( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -165,7 +165,7 @@ def check_entity_exists( if response.status_code not in [204, 404]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -203,7 +203,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -231,7 +231,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -275,7 +275,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -303,7 +303,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_open_id_connect_provider_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_open_id_connect_provider_operations.py index 621fdfeb29e5..f353f06914e1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_open_id_connect_provider_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_open_id_connect_provider_operations.py @@ -81,7 +81,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -129,7 +129,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) @@ -166,7 +166,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -193,7 +193,7 @@ def get_entity_tag( 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) response_headers = {} @@ -231,7 +231,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -258,7 +258,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) response_headers = {} @@ -304,7 +304,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -338,7 +338,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -389,7 +389,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -422,7 +422,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -465,7 +465,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -493,7 +493,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -527,7 +527,7 @@ def list_secrets( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -554,7 +554,7 @@ def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_operations.py index 46bd39275103..d56053341223 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_operation_operations.py @@ -92,7 +92,7 @@ def list_by_tags( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -143,7 +143,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_outbound_network_dependencies_endpoints_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_outbound_network_dependencies_endpoints_operations.py new file mode 100644 index 000000000000..3e934c411a82 --- /dev/null +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_outbound_network_dependencies_endpoints_operations.py @@ -0,0 +1,105 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class OutboundNetworkDependenciesEndpointsOperations(object): + """OutboundNetworkDependenciesEndpointsOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.apimanagement.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def list_by_service( + self, + resource_group_name, # type: str + service_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.OutboundEnvironmentEndpointList" + """Gets the network endpoints of all outbound dependencies of a ApiManagement service. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param service_name: The name of the API Management service. + :type service_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: OutboundEnvironmentEndpointList, or the result of cls(response) + :rtype: ~azure.mgmt.apimanagement.models.OutboundEnvironmentEndpointList + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.OutboundEnvironmentEndpointList"] + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } + error_map.update(kwargs.pop('error_map', {})) + api_version = "2021-04-01-preview" + accept = "application/json" + + # Construct URL + url = self.list_by_service.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'serviceName': self._serialize.url("service_name", service_name, 'str', max_length=50, min_length=1, pattern=r'^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) + raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) + + deserialized = self._deserialize('OutboundEnvironmentEndpointList', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + list_by_service.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/outboundNetworkDependenciesEndpoints'} # type: ignore diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_description_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_description_operations.py index 22d81f0c4722..b5d35bfd530f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_description_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_description_operations.py @@ -70,7 +70,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -98,7 +98,7 @@ def list_by_service( 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('PolicyDescriptionCollection', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_operations.py index 956e8c832502..7844d3221991 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_policy_operations.py @@ -67,7 +67,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -93,7 +93,7 @@ def list_by_service( 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('PolicyCollection', pipeline_response) @@ -131,7 +131,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -158,7 +158,7 @@ def get_entity_tag( 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) response_headers = {} @@ -199,7 +199,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -228,7 +228,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) response_headers = {} @@ -274,7 +274,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -308,7 +308,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -356,7 +356,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -384,7 +384,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_revision_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_revision_operations.py index d0f94ac59a16..dab566f885a3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_revision_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_revision_operations.py @@ -57,7 +57,7 @@ def list_by_service( **kwargs # type: Any ): # type: (...) -> Iterable["_models.PortalRevisionCollection"] - """Lists a collection of developer portal revision entities. + """Lists developer portal's revisions. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -90,7 +90,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -138,7 +138,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) @@ -157,7 +157,7 @@ def get_entity_tag( **kwargs # type: Any ): # type: (...) -> bool - """Gets developer portal revision specified by its identifier. + """Gets the developer portal revision specified by its identifier. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -176,7 +176,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -203,7 +203,7 @@ def get_entity_tag( 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) response_headers = {} @@ -223,7 +223,7 @@ def get( **kwargs # type: Any ): # type: (...) -> "_models.PortalRevisionContract" - """Gets developer portal revision specified by its identifier. + """Gets the developer portal's revision specified by its identifier. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -242,7 +242,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -269,7 +269,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) response_headers = {} @@ -296,7 +296,7 @@ def _create_or_update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -328,7 +328,7 @@ def _create_or_update_initial( if response.status_code not in [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) response_headers = {} @@ -352,7 +352,8 @@ def begin_create_or_update( **kwargs # type: Any ): # type: (...) -> LROPoller["_models.PortalRevisionContract"] - """Creates a new developer portal revision. + """Creates a new developer portal's revision by running the portal's publishing. The ``isCurrent`` + property indicates if the revision is publicly accessible. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -365,8 +366,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a 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 PortalRevisionContract or the result of cls(response) @@ -439,7 +440,7 @@ def _update_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -472,7 +473,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) response_headers = {} @@ -513,8 +514,8 @@ def begin_update( :type parameters: ~azure.mgmt.apimanagement.models.PortalRevisionContract :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a 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 PortalRevisionContract or the result of cls(response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_settings_operations.py index 7f1d919597fa..58c81b65c854 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_portal_settings_operations.py @@ -67,7 +67,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -93,7 +93,7 @@ def list_by_service( 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('PortalSettingsCollection', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_operations.py index 119972d5ca6f..d2256fb1c639 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_api_operations.py @@ -88,7 +88,7 @@ def list_by_product( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -137,7 +137,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) @@ -179,7 +179,7 @@ def check_entity_exists( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -207,7 +207,7 @@ def check_entity_exists( if response.status_code not in [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: @@ -247,7 +247,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -275,7 +275,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -321,7 +321,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -349,7 +349,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_operations.py index ec0e8eb50e57..31aab70f1449 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_group_operations.py @@ -84,7 +84,7 @@ def list_by_product( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -133,7 +133,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) @@ -175,7 +175,7 @@ def check_entity_exists( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -203,7 +203,7 @@ def check_entity_exists( if response.status_code not in [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: @@ -243,7 +243,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -271,7 +271,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -317,7 +317,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -345,7 +345,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_operations.py index 6c5c60381004..206b0dabaea1 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_operations.py @@ -90,7 +90,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -142,7 +142,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) @@ -180,7 +180,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -207,7 +207,7 @@ def get_entity_tag( 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) response_headers = {} @@ -246,7 +246,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -273,7 +273,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) response_headers = {} @@ -320,7 +320,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -354,7 +354,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -406,7 +406,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -439,7 +439,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -486,7 +486,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -516,7 +516,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -565,7 +565,7 @@ def list_by_tags( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -615,7 +615,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py index d1f974f555b4..33fb218c3a9e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_policy_operations.py @@ -71,7 +71,7 @@ def list_by_product( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -98,7 +98,7 @@ def list_by_product( 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('PolicyCollection', pipeline_response) @@ -139,7 +139,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -167,7 +167,7 @@ def get_entity_tag( 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) response_headers = {} @@ -212,7 +212,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -242,7 +242,7 @@ def get( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -292,7 +292,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -327,7 +327,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -379,7 +379,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -408,7 +408,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_subscriptions_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_subscriptions_operations.py index 0c41da03d14e..858521da3c5c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_subscriptions_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_product_subscriptions_operations.py @@ -91,7 +91,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -140,7 +140,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_counter_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_counter_keys_operations.py index d0a9934dd52e..87500a6613ff 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_counter_keys_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_counter_keys_operations.py @@ -60,9 +60,9 @@ def list_by_service( :param service_name: The name of the API Management service. :type service_name: str :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify counter- - key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as - counter-key="@("b"+"a")" then it will be accessible by "ba" key. + in counter-key attribute of the quota-by-key policy.For Example, if you specify + counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined + as counter-key="@("b"+"a")" then it will be accessible by "ba" key. :type quota_counter_key: str :keyword callable cls: A custom type or function that will be passed the direct response :return: QuotaCounterCollection, or the result of cls(response) @@ -74,7 +74,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -101,7 +101,7 @@ def list_by_service( 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('QuotaCounterCollection', pipeline_response) @@ -129,9 +129,9 @@ def update( :param service_name: The name of the API Management service. :type service_name: str :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify counter- - key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as - counter-key="@("b"+"a")" then it will be accessible by "ba" key. + in counter-key attribute of the quota-by-key policy.For Example, if you specify + counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined + as counter-key="@("b"+"a")" then it will be accessible by "ba" key. :type quota_counter_key: str :param parameters: The value of the quota counter to be applied to all quota counter periods. :type parameters: ~azure.mgmt.apimanagement.models.QuotaCounterValueUpdateContract @@ -145,7 +145,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -177,7 +177,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('QuotaCounterCollection', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_period_keys_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_period_keys_operations.py index c66a34db3ab0..8cf3b183399e 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_period_keys_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_quota_by_period_keys_operations.py @@ -61,9 +61,9 @@ def get( :param service_name: The name of the API Management service. :type service_name: str :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify counter- - key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as - counter-key="@("b"+"a")" then it will be accessible by "ba" key. + in counter-key attribute of the quota-by-key policy.For Example, if you specify + counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined + as counter-key="@("b"+"a")" then it will be accessible by "ba" key. :type quota_counter_key: str :param quota_period_key: Quota period key identifier. :type quota_period_key: str @@ -77,7 +77,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -105,7 +105,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('QuotaCounterContract', pipeline_response) @@ -133,9 +133,9 @@ def update( :param service_name: The name of the API Management service. :type service_name: str :param quota_counter_key: Quota counter key identifier.This is the result of expression defined - in counter-key attribute of the quota-by-key policy.For Example, if you specify counter- - key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined as - counter-key="@("b"+"a")" then it will be accessible by "ba" key. + in counter-key attribute of the quota-by-key policy.For Example, if you specify + counter-key="boo" in the policy, then it’s accessible by "boo" counter key. But if it’s defined + as counter-key="@("b"+"a")" then it will be accessible by "ba" key. :type quota_counter_key: str :param quota_period_key: Quota period key identifier. :type quota_period_key: str @@ -151,7 +151,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -184,7 +184,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('QuotaCounterContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_region_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_region_operations.py index ccce1953af63..1771e245af3f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_region_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_region_operations.py @@ -68,7 +68,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -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.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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_reports_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_reports_operations.py index b64cbf3b7235..151c5b603ef3 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_reports_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_reports_operations.py @@ -81,7 +81,7 @@ def list_by_api( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -130,7 +130,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) @@ -188,7 +188,7 @@ def list_by_user( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -237,7 +237,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) @@ -295,7 +295,7 @@ def list_by_operation( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -344,7 +344,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) @@ -401,7 +401,7 @@ def list_by_product( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -450,7 +450,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) @@ -505,7 +505,7 @@ def list_by_geo( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -552,7 +552,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) @@ -609,7 +609,7 @@ def list_by_subscription( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -658,7 +658,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) @@ -721,7 +721,7 @@ def list_by_time( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -771,7 +771,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) @@ -818,7 +818,7 @@ def list_by_request( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -865,7 +865,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_in_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_in_settings_operations.py index 3d8eb0bb107a..6691659599fe 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_in_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_in_settings_operations.py @@ -67,7 +67,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -93,7 +93,7 @@ def get_entity_tag( 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) response_headers = {} @@ -128,7 +128,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -154,7 +154,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) response_headers = {} @@ -197,7 +197,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -229,7 +229,7 @@ def update( if response.status_code not in [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: @@ -267,7 +267,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -300,7 +300,7 @@ def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PortalSigninSettings', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_up_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_up_settings_operations.py index d8526bd46301..02ba3b50d157 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_up_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_sign_up_settings_operations.py @@ -67,7 +67,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -93,7 +93,7 @@ def get_entity_tag( 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) response_headers = {} @@ -128,7 +128,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -154,7 +154,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) response_headers = {} @@ -197,7 +197,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -229,7 +229,7 @@ def update( if response.status_code not in [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: @@ -267,7 +267,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -300,7 +300,7 @@ def create_or_update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('PortalSignupSettings', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_subscription_operations.py index 17b20aff5525..9e6bc7eb306b 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_subscription_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_subscription_operations.py @@ -87,7 +87,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -135,7 +135,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) @@ -174,7 +174,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -201,7 +201,7 @@ def get_entity_tag( 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) response_headers = {} @@ -240,7 +240,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -267,7 +267,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) response_headers = {} @@ -325,7 +325,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -363,7 +363,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -426,7 +426,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -463,7 +463,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -507,7 +507,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -535,7 +535,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -570,7 +570,7 @@ def regenerate_primary_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -597,7 +597,7 @@ def regenerate_primary_key( if response.status_code not in [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: @@ -632,7 +632,7 @@ def regenerate_secondary_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -659,7 +659,7 @@ def regenerate_secondary_key( if response.status_code not in [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: @@ -694,7 +694,7 @@ def list_secrets( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -721,7 +721,7 @@ def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operations.py index 474134b93b71..393a7f8102e5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_operations.py @@ -88,7 +88,7 @@ def list_by_operation( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -138,7 +138,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) @@ -183,7 +183,7 @@ def get_entity_state_by_operation( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -212,7 +212,7 @@ def get_entity_state_by_operation( 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) response_headers = {} @@ -258,7 +258,7 @@ def get_by_operation( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -287,7 +287,7 @@ def get_by_operation( 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) response_headers = {} @@ -334,7 +334,7 @@ def assign_to_operation( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -363,7 +363,7 @@ def assign_to_operation( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -412,7 +412,7 @@ def detach_from_operation( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -441,7 +441,7 @@ def detach_from_operation( 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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -488,7 +488,7 @@ def list_by_api( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -537,7 +537,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) @@ -578,7 +578,7 @@ def get_entity_state_by_api( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -606,7 +606,7 @@ def get_entity_state_by_api( 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) response_headers = {} @@ -648,7 +648,7 @@ def get_by_api( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -676,7 +676,7 @@ def get_by_api( 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) response_headers = {} @@ -719,7 +719,7 @@ def assign_to_api( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -747,7 +747,7 @@ def assign_to_api( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -795,7 +795,7 @@ def detach_from_api( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -823,7 +823,7 @@ def detach_from_api( 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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -870,7 +870,7 @@ def list_by_product( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -919,7 +919,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) @@ -960,7 +960,7 @@ def get_entity_state_by_product( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -988,7 +988,7 @@ def get_entity_state_by_product( 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) response_headers = {} @@ -1030,7 +1030,7 @@ def get_by_product( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -1058,7 +1058,7 @@ def get_by_product( 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) response_headers = {} @@ -1101,7 +1101,7 @@ def assign_to_product( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -1129,7 +1129,7 @@ def assign_to_product( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: @@ -1174,7 +1174,7 @@ def detach_from_product( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -1202,7 +1202,7 @@ def detach_from_product( 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.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -1249,7 +1249,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -1299,7 +1299,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) @@ -1336,7 +1336,7 @@ def get_entity_state( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -1363,7 +1363,7 @@ def get_entity_state( 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) response_headers = {} @@ -1401,7 +1401,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -1428,7 +1428,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) response_headers = {} @@ -1474,7 +1474,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1508,7 +1508,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1559,7 +1559,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -1592,7 +1592,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -1635,7 +1635,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -1663,7 +1663,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py index 32247573b005..5dccd87b0c82 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tag_resource_operations.py @@ -91,7 +91,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -139,7 +139,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_git_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_git_operations.py index f629038740ee..f994f59b8218 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_git_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_git_operations.py @@ -70,7 +70,7 @@ def regenerate_primary_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -97,7 +97,7 @@ def regenerate_primary_key( if response.status_code not in [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: @@ -131,7 +131,7 @@ def regenerate_secondary_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -158,7 +158,7 @@ def regenerate_secondary_key( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_operations.py index 03e9e98c120b..0fa4678980e5 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_access_operations.py @@ -71,7 +71,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -115,7 +115,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) @@ -152,7 +152,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -179,7 +179,7 @@ def get_entity_tag( 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) response_headers = {} @@ -217,7 +217,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -244,7 +244,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) response_headers = {} @@ -290,7 +290,7 @@ def create( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -323,7 +323,7 @@ def create( 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) response_headers = {} @@ -369,7 +369,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -402,7 +402,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -441,7 +441,7 @@ def regenerate_primary_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -468,7 +468,7 @@ def regenerate_primary_key( if response.status_code not in [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: @@ -502,7 +502,7 @@ def regenerate_secondary_key( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -529,7 +529,7 @@ def regenerate_secondary_key( if response.status_code not in [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: @@ -563,7 +563,7 @@ def list_secrets( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -590,7 +590,7 @@ def list_secrets( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_configuration_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_configuration_operations.py index 4befc757e7bb..0e7adcf2e48c 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_configuration_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_configuration_operations.py @@ -60,7 +60,7 @@ def _deploy_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -92,7 +92,7 @@ def _deploy_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) deserialized = None @@ -127,8 +127,8 @@ def begin_deploy( :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a 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 OperationResultContract or the result of cls(response) @@ -197,7 +197,7 @@ def _save_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -229,7 +229,7 @@ def _save_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) deserialized = None @@ -264,8 +264,8 @@ def begin_save( :type parameters: ~azure.mgmt.apimanagement.models.SaveConfigurationParameter :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a 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 OperationResultContract or the result of cls(response) @@ -334,7 +334,7 @@ def _validate_initial( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -366,7 +366,7 @@ def _validate_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) deserialized = None @@ -401,8 +401,8 @@ def begin_validate( :type parameters: ~azure.mgmt.apimanagement.models.DeployConfigurationParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a 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 OperationResultContract or the result of cls(response) @@ -484,7 +484,7 @@ def get_sync_state( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -511,7 +511,7 @@ def get_sync_state( 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('TenantConfigurationSyncStateContract', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_settings_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_settings_operations.py index 642c64d83ec2..cf959935a735 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_settings_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_tenant_settings_operations.py @@ -71,7 +71,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -115,7 +115,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) @@ -152,7 +152,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -179,7 +179,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) response_headers = {} diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_confirmation_password_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_confirmation_password_operations.py index bcf610bd033b..4f5835f4f9fd 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_confirmation_password_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_confirmation_password_operations.py @@ -74,7 +74,7 @@ def send( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -103,7 +103,7 @@ def send( if response.status_code not in [204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_group_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_group_operations.py index 3522f7ef4888..558b6c4d4b08 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_group_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_group_operations.py @@ -86,7 +86,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -135,7 +135,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_identities_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_identities_operations.py index 766f92164932..e79c7d87a51f 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_identities_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_identities_operations.py @@ -71,7 +71,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -114,7 +114,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/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_operations.py index 180241b92788..e8ebc77c6c73 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_operations.py @@ -88,7 +88,7 @@ def list_by_service( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -138,7 +138,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) @@ -175,7 +175,7 @@ def get_entity_tag( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -202,7 +202,7 @@ def get_entity_tag( 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) response_headers = {} @@ -240,7 +240,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -267,7 +267,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) response_headers = {} @@ -316,7 +316,7 @@ def create_or_update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -352,7 +352,7 @@ def create_or_update( if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -403,7 +403,7 @@ def update( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -436,7 +436,7 @@ def update( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) response_headers = {} @@ -489,7 +489,7 @@ def delete( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -523,7 +523,7 @@ def delete( if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: @@ -558,7 +558,7 @@ def generate_sso_url( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -585,7 +585,7 @@ def generate_sso_url( 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('GenerateSsoUrlResult', pipeline_response) @@ -625,7 +625,7 @@ def get_shared_access_token( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" @@ -657,7 +657,7 @@ def get_shared_access_token( if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) - error = self._deserialize(_models.ErrorResponse, response) + error = self._deserialize.failsafe_deserialize(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('UserTokenResult', pipeline_response) diff --git a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_subscription_operations.py b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_subscription_operations.py index 38ed5e737082..25e4c10c9233 100644 --- a/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_subscription_operations.py +++ b/sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/operations/_user_subscription_operations.py @@ -89,7 +89,7 @@ def list( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -138,7 +138,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) @@ -179,7 +179,7 @@ def get( 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) - api_version = "2020-12-01" + api_version = "2021-04-01-preview" accept = "application/json" # Construct URL @@ -207,7 +207,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) response_headers = {}