diff --git a/sdk/keyvault/azure-mgmt-keyvault/CHANGELOG.md b/sdk/keyvault/azure-mgmt-keyvault/CHANGELOG.md index 76564ba74c26..3ce4d58fbf8e 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/CHANGELOG.md +++ b/sdk/keyvault/azure-mgmt-keyvault/CHANGELOG.md @@ -1,5 +1,9 @@ # Release History +## 7.0.0 (2020-09-15) + +- Release as a stable version + ## 7.0.0b3 (2020-09-09) **Features** diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/__init__.py index 1f618cc50426..e03c4a3b857a 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/__init__.py @@ -10,7 +10,7 @@ __all__ = ['KeyVaultManagementClient'] try: - from ._patch import patch_sdk + from ._patch import patch_sdk # type: ignore patch_sdk() except ImportError: pass diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_configuration.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_configuration.py index 543a28f80679..0a131b868ca1 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_configuration.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_configuration.py @@ -12,6 +12,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy from ._version import VERSION @@ -43,8 +44,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.credential_scopes = ['https://management.azure.com/.default'] - self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'azure-mgmt-keyvault/{}'.format(VERSION)) self._configure(**kwargs) @@ -57,6 +57,7 @@ def _configure( self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_key_vault_management_client.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_key_vault_management_client.py index 48f7eb2c6e3f..de68ba06247d 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_key_vault_management_client.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_key_vault_management_client.py @@ -69,8 +69,6 @@ def __init__( self._config = KeyVaultManagementClientConfiguration(credential, subscription_id, **kwargs) self._client = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs) super(KeyVaultManagementClient, self).__init__( - credential, - self._config, api_version=api_version, profile=profile ) @@ -100,7 +98,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2020-04-01-preview': from .v2020_04_01_preview import models return models - raise NotImplementedError("APIVersion {} is not available".format(api_version)) + raise ValueError("API version {} is not available".format(api_version)) @property def managed_hsms(self): @@ -112,7 +110,7 @@ def managed_hsms(self): if api_version == '2020-04-01-preview': from .v2020_04_01_preview.operations import ManagedHsmsOperations as OperationClass else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) + raise ValueError("API version {} does not have operation group 'managed_hsms'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @property @@ -134,7 +132,7 @@ def operations(self): elif api_version == '2020-04-01-preview': from .v2020_04_01_preview.operations import Operations as OperationClass else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) + raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @property @@ -153,7 +151,7 @@ def private_endpoint_connections(self): elif api_version == '2020-04-01-preview': from .v2020_04_01_preview.operations import PrivateEndpointConnectionsOperations as OperationClass else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) + raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @property @@ -172,7 +170,7 @@ def private_link_resources(self): elif api_version == '2020-04-01-preview': from .v2020_04_01_preview.operations import PrivateLinkResourcesOperations as OperationClass else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) + raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @property @@ -194,7 +192,7 @@ def vaults(self): elif api_version == '2020-04-01-preview': from .v2020_04_01_preview.operations import VaultsOperations as OperationClass else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) + raise ValueError("API version {} does not have operation group 'vaults'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) def close(self): diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_version.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_version.py index 374a6979a7ab..2778259e9c09 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_version.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/_version.py @@ -5,4 +5,4 @@ # license information. # -------------------------------------------------------------------------- -VERSION = "7.0.0b3" \ No newline at end of file +VERSION = "7.0.0" \ No newline at end of file diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/__init__.py index 018d48d4060b..f54ed88d6ad2 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/__init__.py @@ -6,5 +6,5 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._key_vault_management_client_async import KeyVaultManagementClient +from ._key_vault_management_client import KeyVaultManagementClient __all__ = ['KeyVaultManagementClient'] diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_configuration_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_configuration.py similarity index 91% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_configuration_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_configuration.py index 24531c2b2763..313799f24232 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_configuration_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_configuration.py @@ -12,6 +12,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy from .._version import VERSION @@ -34,7 +35,6 @@ def __init__( subscription_id, # type: str **kwargs # type: Any ) -> None: - # type: (...) -> None if credential is None: raise ValueError("Parameter 'credential' must not be None.") if subscription_id is None: @@ -43,8 +43,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.credential_scopes = ['https://management.azure.com/.default'] - self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'azure-mgmt-keyvault/{}'.format(VERSION)) self._configure(**kwargs) @@ -56,6 +55,7 @@ def _configure( self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_key_vault_management_client_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_key_vault_management_client.py similarity index 71% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_key_vault_management_client_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_key_vault_management_client.py index 4253a54f3be6..a967aa9463c8 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_key_vault_management_client_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_key_vault_management_client.py @@ -14,7 +14,7 @@ from azure.profiles import KnownProfiles, ProfileDefinition from azure.profiles.multiapiclient import MultiApiClientMixin -from ._configuration_async import KeyVaultManagementClientConfiguration +from ._configuration import KeyVaultManagementClientConfiguration class _SDKClient(object): def __init__(self, *args, **kwargs): @@ -69,8 +69,6 @@ def __init__( self._config = KeyVaultManagementClientConfiguration(credential, subscription_id, **kwargs) self._client = AsyncARMPipelineClient(base_url=base_url, config=self._config, **kwargs) super(KeyVaultManagementClient, self).__init__( - credential, - self._config, api_version=api_version, profile=profile ) @@ -100,101 +98,101 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2020-04-01-preview': from ..v2020_04_01_preview import models return models - raise NotImplementedError("APIVersion {} is not available".format(api_version)) + raise ValueError("API version {} is not available".format(api_version)) @property def managed_hsms(self): """Instance depends on the API version: - * 2020-04-01-preview: :class:`ManagedHsmsOperations` + * 2020-04-01-preview: :class:`ManagedHsmsOperations` """ api_version = self._get_api_version('managed_hsms') if api_version == '2020-04-01-preview': - from ..v2020_04_01_preview.aio.operations_async import ManagedHsmsOperations as OperationClass + from ..v2020_04_01_preview.aio.operations import ManagedHsmsOperations as OperationClass else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) + raise ValueError("API version {} does not have operation group 'managed_hsms'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @property def operations(self): """Instance depends on the API version: - * 2016-10-01: :class:`Operations` - * 2018-02-14: :class:`Operations` - * 2019-09-01: :class:`Operations` - * 2020-04-01-preview: :class:`Operations` + * 2016-10-01: :class:`Operations` + * 2018-02-14: :class:`Operations` + * 2019-09-01: :class:`Operations` + * 2020-04-01-preview: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2016-10-01': - from ..v2016_10_01.aio.operations_async import Operations as OperationClass + from ..v2016_10_01.aio.operations import Operations as OperationClass elif api_version == '2018-02-14': - from ..v2018_02_14.aio.operations_async import Operations as OperationClass + from ..v2018_02_14.aio.operations import Operations as OperationClass elif api_version == '2019-09-01': - from ..v2019_09_01.aio.operations_async import Operations as OperationClass + from ..v2019_09_01.aio.operations import Operations as OperationClass elif api_version == '2020-04-01-preview': - from ..v2020_04_01_preview.aio.operations_async import Operations as OperationClass + from ..v2020_04_01_preview.aio.operations import Operations as OperationClass else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) + raise ValueError("API version {} does not have operation group 'operations'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @property def private_endpoint_connections(self): """Instance depends on the API version: - * 2018-02-14: :class:`PrivateEndpointConnectionsOperations` - * 2019-09-01: :class:`PrivateEndpointConnectionsOperations` - * 2020-04-01-preview: :class:`PrivateEndpointConnectionsOperations` + * 2018-02-14: :class:`PrivateEndpointConnectionsOperations` + * 2019-09-01: :class:`PrivateEndpointConnectionsOperations` + * 2020-04-01-preview: :class:`PrivateEndpointConnectionsOperations` """ api_version = self._get_api_version('private_endpoint_connections') if api_version == '2018-02-14': - from ..v2018_02_14.aio.operations_async import PrivateEndpointConnectionsOperations as OperationClass + from ..v2018_02_14.aio.operations import PrivateEndpointConnectionsOperations as OperationClass elif api_version == '2019-09-01': - from ..v2019_09_01.aio.operations_async import PrivateEndpointConnectionsOperations as OperationClass + from ..v2019_09_01.aio.operations import PrivateEndpointConnectionsOperations as OperationClass elif api_version == '2020-04-01-preview': - from ..v2020_04_01_preview.aio.operations_async import PrivateEndpointConnectionsOperations as OperationClass + from ..v2020_04_01_preview.aio.operations import PrivateEndpointConnectionsOperations as OperationClass else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) + raise ValueError("API version {} does not have operation group 'private_endpoint_connections'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @property def private_link_resources(self): """Instance depends on the API version: - * 2018-02-14: :class:`PrivateLinkResourcesOperations` - * 2019-09-01: :class:`PrivateLinkResourcesOperations` - * 2020-04-01-preview: :class:`PrivateLinkResourcesOperations` + * 2018-02-14: :class:`PrivateLinkResourcesOperations` + * 2019-09-01: :class:`PrivateLinkResourcesOperations` + * 2020-04-01-preview: :class:`PrivateLinkResourcesOperations` """ api_version = self._get_api_version('private_link_resources') if api_version == '2018-02-14': - from ..v2018_02_14.aio.operations_async import PrivateLinkResourcesOperations as OperationClass + from ..v2018_02_14.aio.operations import PrivateLinkResourcesOperations as OperationClass elif api_version == '2019-09-01': - from ..v2019_09_01.aio.operations_async import PrivateLinkResourcesOperations as OperationClass + from ..v2019_09_01.aio.operations import PrivateLinkResourcesOperations as OperationClass elif api_version == '2020-04-01-preview': - from ..v2020_04_01_preview.aio.operations_async import PrivateLinkResourcesOperations as OperationClass + from ..v2020_04_01_preview.aio.operations import PrivateLinkResourcesOperations as OperationClass else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) + raise ValueError("API version {} does not have operation group 'private_link_resources'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @property def vaults(self): """Instance depends on the API version: - * 2016-10-01: :class:`VaultsOperations` - * 2018-02-14: :class:`VaultsOperations` - * 2019-09-01: :class:`VaultsOperations` - * 2020-04-01-preview: :class:`VaultsOperations` + * 2016-10-01: :class:`VaultsOperations` + * 2018-02-14: :class:`VaultsOperations` + * 2019-09-01: :class:`VaultsOperations` + * 2020-04-01-preview: :class:`VaultsOperations` """ api_version = self._get_api_version('vaults') if api_version == '2016-10-01': - from ..v2016_10_01.aio.operations_async import VaultsOperations as OperationClass + from ..v2016_10_01.aio.operations import VaultsOperations as OperationClass elif api_version == '2018-02-14': - from ..v2018_02_14.aio.operations_async import VaultsOperations as OperationClass + from ..v2018_02_14.aio.operations import VaultsOperations as OperationClass elif api_version == '2019-09-01': - from ..v2019_09_01.aio.operations_async import VaultsOperations as OperationClass + from ..v2019_09_01.aio.operations import VaultsOperations as OperationClass elif api_version == '2020-04-01-preview': - from ..v2020_04_01_preview.aio.operations_async import VaultsOperations as OperationClass + from ..v2020_04_01_preview.aio.operations import VaultsOperations as OperationClass else: - raise NotImplementedError("APIVersion {} is not available".format(api_version)) + raise ValueError("API version {} does not have operation group 'vaults'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) async def close(self): diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/__init__.py index 1f618cc50426..e03c4a3b857a 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/__init__.py @@ -10,7 +10,7 @@ __all__ = ['KeyVaultManagementClient'] try: - from ._patch import patch_sdk + from ._patch import patch_sdk # type: ignore patch_sdk() except ImportError: pass diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_configuration.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_configuration.py index 21fb446b5bbf..df1a075aeec1 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_configuration.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_configuration.py @@ -10,6 +10,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -47,8 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.api_version = "2016-10-01" - self.credential_scopes = ['https://management.azure.com/.default'] - self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-keyvault/{}'.format(VERSION)) self._configure(**kwargs) @@ -61,6 +61,7 @@ def _configure( self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_key_vault_management_client.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_key_vault_management_client.py index 500005a28477..b4494449b218 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_key_vault_management_client.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_key_vault_management_client.py @@ -53,6 +53,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.vaults = VaultsOperations( diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_metadata.json b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_metadata.json index 4013a1d68e64..2e4ec38bfc58 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_metadata.json +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_metadata.json @@ -4,7 +4,11 @@ "client": { "name": "KeyVaultManagementClient", "filename": "_key_vault_management_client", - "description": "The Azure management API provides a RESTful set of web services that interact with Azure Key Vault." + "description": "The Azure management API provides a RESTful set of web services that interact with Azure Key Vault.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true }, "global_parameters": { "sync_method": { @@ -41,7 +45,10 @@ }, "config": { "credential": true, - "credential_scopes": ["https://management.azure.com/.default"] + "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 }, "operation_groups": { "vaults": "VaultsOperations", diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/__init__.py index 018d48d4060b..f54ed88d6ad2 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/__init__.py @@ -6,5 +6,5 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._key_vault_management_client_async import KeyVaultManagementClient +from ._key_vault_management_client import KeyVaultManagementClient __all__ = ['KeyVaultManagementClient'] diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/_configuration_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/_configuration.py similarity index 91% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/_configuration_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/_configuration.py index ab079a4c9bf2..52c1d018bba1 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/_configuration_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/_configuration.py @@ -10,6 +10,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -44,8 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.api_version = "2016-10-01" - self.credential_scopes = ['https://management.azure.com/.default'] - self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-keyvault/{}'.format(VERSION)) self._configure(**kwargs) @@ -57,6 +57,7 @@ def _configure( self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/_key_vault_management_client_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/_key_vault_management_client.py similarity index 92% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/_key_vault_management_client_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/_key_vault_management_client.py index 8e74ff9427af..ee5493e4b6e8 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/_key_vault_management_client_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/_key_vault_management_client.py @@ -15,9 +15,9 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -from ._configuration_async import KeyVaultManagementClientConfiguration -from .operations_async import VaultsOperations -from .operations_async import Operations +from ._configuration import KeyVaultManagementClientConfiguration +from .operations import VaultsOperations +from .operations import Operations from .. import models @@ -25,9 +25,9 @@ class KeyVaultManagementClient(object): """The Azure management API provides a RESTful set of web services that interact with Azure Key Vault. :ivar vaults: VaultsOperations operations - :vartype vaults: azure.mgmt.keyvault.v2016_10_01.aio.operations_async.VaultsOperations + :vartype vaults: azure.mgmt.keyvault.v2016_10_01.aio.operations.VaultsOperations :ivar operations: Operations operations - :vartype operations: azure.mgmt.keyvault.v2016_10_01.aio.operations_async.Operations + :vartype operations: azure.mgmt.keyvault.v2016_10_01.aio.operations.Operations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -50,6 +50,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.vaults = VaultsOperations( diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations_async/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations/__init__.py similarity index 84% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations_async/__init__.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations/__init__.py index 790d8c973d8f..3d2bb8ce16b1 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations_async/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations/__init__.py @@ -6,8 +6,8 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._vaults_operations_async import VaultsOperations -from ._operations_async import Operations +from ._vaults_operations import VaultsOperations +from ._operations import Operations __all__ = [ 'VaultsOperations', diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations_async/_operations_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations/_operations.py similarity index 91% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations_async/_operations_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations/_operations.py index bb39715117fe..a542c354f3c3 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations_async/_operations_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations/_operations.py @@ -9,7 +9,7 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +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 @@ -53,14 +53,17 @@ def list( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations_async/_vaults_operations_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations/_vaults_operations.py similarity index 92% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations_async/_vaults_operations_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations/_vaults_operations.py index 93781d220655..735e97e7cd61 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations_async/_vaults_operations_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations/_vaults_operations.py @@ -9,7 +9,7 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +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 @@ -64,10 +64,13 @@ async def create_or_update( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.create_or_update.metadata['url'] # type: ignore @@ -85,13 +88,12 @@ async def create_or_update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultCreateOrUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -132,10 +134,13 @@ async def update( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update.metadata['url'] # type: ignore @@ -153,13 +158,12 @@ async def update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultPatchParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -197,7 +201,9 @@ async def delete( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" @@ -248,9 +254,12 @@ async def get( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -267,7 +276,7 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -309,10 +318,13 @@ async def update_access_policy( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultAccessPolicyParameters"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_access_policy.metadata['url'] # type: ignore @@ -331,13 +343,12 @@ async def update_access_policy( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultAccessPolicyParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -364,7 +375,7 @@ def list_by_resource_group( **kwargs ) -> AsyncIterable["models.VaultListResult"]: """The List operation gets information about the vaults associated with the subscription and - within the specified resource group. + within the specified resource group. :param resource_group_name: The name of the Resource Group to which the vault belongs. :type resource_group_name: str @@ -376,14 +387,17 @@ def list_by_resource_group( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -445,14 +459,17 @@ def list_by_subscription( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -510,14 +527,17 @@ def list_deleted( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DeletedVaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -579,9 +599,12 @@ async def get_deleted( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DeletedVault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_deleted.metadata['url'] # type: ignore @@ -598,7 +621,7 @@ async def get_deleted( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -623,7 +646,9 @@ async def _purge_deleted_initial( **kwargs ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" @@ -729,15 +754,18 @@ def list( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ResourceListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) filter = "resourceType eq 'Microsoft.KeyVault/vaults'" api_version = "2015-11-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -799,10 +827,13 @@ async def check_name_availability( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.CheckNameAvailabilityResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.check_name_availability.metadata['url'] # type: ignore @@ -818,13 +849,12 @@ async def check_name_availability( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(vault_name, 'VaultCheckNameAvailabilityParameters') 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 diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/__init__.py index ddd632123fcd..58fea2720308 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/__init__.py @@ -62,6 +62,7 @@ KeyPermissions, Reason, SecretPermissions, + SkuFamily, SkuName, StoragePermissions, ) @@ -96,6 +97,7 @@ 'KeyPermissions', 'Reason', 'SecretPermissions', + 'SkuFamily', 'SkuName', 'StoragePermissions', ] diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_key_vault_management_client_enums.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_key_vault_management_client_enums.py index 4fc1675be016..1d9e87b05441 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_key_vault_management_client_enums.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_key_vault_management_client_enums.py @@ -6,96 +6,120 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from enum import Enum - -class AccessPolicyUpdateKind(str, Enum): - - add = "add" - replace = "replace" - remove = "remove" - -class CertificatePermissions(str, Enum): - - get = "get" - list = "list" - delete = "delete" - create = "create" - import_enum = "import" - update = "update" - managecontacts = "managecontacts" - getissuers = "getissuers" - listissuers = "listissuers" - setissuers = "setissuers" - deleteissuers = "deleteissuers" - manageissuers = "manageissuers" - recover = "recover" - purge = "purge" - -class CreateMode(str, Enum): +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AccessPolicyUpdateKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + ADD = "add" + REPLACE = "replace" + REMOVE = "remove" + +class CertificatePermissions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + GET = "get" + LIST = "list" + DELETE = "delete" + CREATE = "create" + IMPORT_ENUM = "import" + UPDATE = "update" + MANAGECONTACTS = "managecontacts" + GETISSUERS = "getissuers" + LISTISSUERS = "listissuers" + SETISSUERS = "setissuers" + DELETEISSUERS = "deleteissuers" + MANAGEISSUERS = "manageissuers" + RECOVER = "recover" + PURGE = "purge" + +class CreateMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The vault's create mode to indicate whether the vault need to be recovered or not. """ - recover = "recover" - default = "default" - -class KeyPermissions(str, Enum): - - encrypt = "encrypt" - decrypt = "decrypt" - wrap_key = "wrapKey" - unwrap_key = "unwrapKey" - sign = "sign" - verify = "verify" - get = "get" - list = "list" - create = "create" - update = "update" - import_enum = "import" - delete = "delete" - backup = "backup" - restore = "restore" - recover = "recover" - purge = "purge" - -class Reason(str, Enum): + RECOVER = "recover" + DEFAULT = "default" + +class KeyPermissions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + ENCRYPT = "encrypt" + DECRYPT = "decrypt" + WRAP_KEY = "wrapKey" + UNWRAP_KEY = "unwrapKey" + SIGN = "sign" + VERIFY = "verify" + GET = "get" + LIST = "list" + CREATE = "create" + UPDATE = "update" + IMPORT_ENUM = "import" + DELETE = "delete" + BACKUP = "backup" + RESTORE = "restore" + RECOVER = "recover" + PURGE = "purge" + +class Reason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The reason that a vault name could not be used. The Reason element is only returned if NameAvailable is false. """ - account_name_invalid = "AccountNameInvalid" - already_exists = "AlreadyExists" + ACCOUNT_NAME_INVALID = "AccountNameInvalid" + ALREADY_EXISTS = "AlreadyExists" -class SecretPermissions(str, Enum): +class SecretPermissions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - get = "get" - list = "list" - set = "set" - delete = "delete" - backup = "backup" - restore = "restore" - recover = "recover" - purge = "purge" + GET = "get" + LIST = "list" + SET = "set" + DELETE = "delete" + BACKUP = "backup" + RESTORE = "restore" + RECOVER = "recover" + PURGE = "purge" -class SkuName(str, Enum): +class SkuFamily(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """SKU family name + """ + + A = "A" + +class SkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """SKU name to specify whether the key vault is a standard vault or a premium vault. """ - standard = "standard" - premium = "premium" - -class StoragePermissions(str, Enum): - - get = "get" - list = "list" - delete = "delete" - set = "set" - update = "update" - regeneratekey = "regeneratekey" - recover = "recover" - purge = "purge" - backup = "backup" - restore = "restore" - setsas = "setsas" - listsas = "listsas" - getsas = "getsas" - deletesas = "deletesas" + STANDARD = "standard" + PREMIUM = "premium" + +class StoragePermissions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + GET = "get" + LIST = "list" + DELETE = "delete" + SET = "set" + UPDATE = "update" + REGENERATEKEY = "regeneratekey" + RECOVER = "recover" + PURGE = "purge" + BACKUP = "backup" + RESTORE = "restore" + SETSAS = "setsas" + LISTSAS = "listsas" + GETSAS = "getsas" + DELETESAS = "deletesas" diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_models.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_models.py index f26c983f206c..1fbb79dc295f 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_models.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_models.py @@ -431,19 +431,17 @@ def __init__( class Sku(msrest.serialization.Model): """SKU details. - Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :ivar family: Required. SKU family name. Default value: "A". - :vartype family: str + :param family: Required. SKU family name. Possible values include: "A". + :type family: str or ~azure.mgmt.keyvault.v2016_10_01.models.SkuFamily :param name: Required. SKU name to specify whether the key vault is a standard vault or a premium vault. Possible values include: "standard", "premium". :type name: str or ~azure.mgmt.keyvault.v2016_10_01.models.SkuName """ _validation = { - 'family': {'required': True, 'constant': True}, + 'family': {'required': True}, 'name': {'required': True}, } @@ -452,13 +450,12 @@ class Sku(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, } - family = "A" - def __init__( self, **kwargs ): super(Sku, self).__init__(**kwargs) + self.family = kwargs['family'] self.name = kwargs['name'] diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_models_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_models_py3.py index 3259e4b659a7..b231c15bf5f9 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_models_py3.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_models_py3.py @@ -475,19 +475,17 @@ def __init__( class Sku(msrest.serialization.Model): """SKU details. - Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :ivar family: Required. SKU family name. Default value: "A". - :vartype family: str + :param family: Required. SKU family name. Possible values include: "A". + :type family: str or ~azure.mgmt.keyvault.v2016_10_01.models.SkuFamily :param name: Required. SKU name to specify whether the key vault is a standard vault or a premium vault. Possible values include: "standard", "premium". :type name: str or ~azure.mgmt.keyvault.v2016_10_01.models.SkuName """ _validation = { - 'family': {'required': True, 'constant': True}, + 'family': {'required': True}, 'name': {'required': True}, } @@ -496,15 +494,15 @@ class Sku(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, } - family = "A" - def __init__( self, *, + family: Union[str, "SkuFamily"], name: Union[str, "SkuName"], **kwargs ): super(Sku, self).__init__(**kwargs) + self.family = family self.name = name diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/_operations.py index 7836d1e5bdb7..b087fb97fafd 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/_operations.py @@ -8,7 +8,7 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -58,14 +58,17 @@ def list( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/_vaults_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/_vaults_operations.py index 5aa92d56ad12..ea01754d4679 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/_vaults_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/operations/_vaults_operations.py @@ -8,7 +8,7 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -69,10 +69,13 @@ def create_or_update( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.create_or_update.metadata['url'] # type: ignore @@ -90,13 +93,12 @@ def create_or_update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultCreateOrUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -138,10 +140,13 @@ def update( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update.metadata['url'] # type: ignore @@ -159,13 +164,12 @@ def update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultPatchParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -204,7 +208,9 @@ def delete( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" @@ -256,9 +262,12 @@ def get( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -275,7 +284,7 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -318,10 +327,13 @@ def update_access_policy( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultAccessPolicyParameters"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_access_policy.metadata['url'] # type: ignore @@ -340,13 +352,12 @@ def update_access_policy( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultAccessPolicyParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -374,7 +385,7 @@ def list_by_resource_group( ): # type: (...) -> Iterable["models.VaultListResult"] """The List operation gets information about the vaults associated with the subscription and - within the specified resource group. + within the specified resource group. :param resource_group_name: The name of the Resource Group to which the vault belongs. :type resource_group_name: str @@ -386,14 +397,17 @@ def list_by_resource_group( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -456,14 +470,17 @@ def list_by_subscription( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -522,14 +539,17 @@ def list_deleted( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DeletedVaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -592,9 +612,12 @@ def get_deleted( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DeletedVault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" + accept = "application/json" # Construct URL url = self.get_deleted.metadata['url'] # type: ignore @@ -611,7 +634,7 @@ def get_deleted( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -637,7 +660,9 @@ def _purge_deleted_initial( ): # type: (...) -> None cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" @@ -745,15 +770,18 @@ def list( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ResourceListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) filter = "resourceType eq 'Microsoft.KeyVault/vaults'" api_version = "2015-11-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -816,10 +844,13 @@ def check_name_availability( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.CheckNameAvailabilityResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2016-10-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.check_name_availability.metadata['url'] # type: ignore @@ -835,13 +866,12 @@ def check_name_availability( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(vault_name, 'VaultCheckNameAvailabilityParameters') 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 diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/__init__.py index 1f618cc50426..e03c4a3b857a 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/__init__.py @@ -10,7 +10,7 @@ __all__ = ['KeyVaultManagementClient'] try: - from ._patch import patch_sdk + from ._patch import patch_sdk # type: ignore patch_sdk() except ImportError: pass diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/_configuration.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/_configuration.py index 7695ad3f9ed0..b606a7919d6d 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/_configuration.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/_configuration.py @@ -10,6 +10,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -47,8 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.api_version = "2018-02-14" - self.credential_scopes = ['https://management.azure.com/.default'] - self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-keyvault/{}'.format(VERSION)) self._configure(**kwargs) @@ -61,6 +61,7 @@ def _configure( self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/_key_vault_management_client.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/_key_vault_management_client.py index 5ec92f953da4..6a1c90c7b3bc 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/_key_vault_management_client.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/_key_vault_management_client.py @@ -59,6 +59,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.vaults = VaultsOperations( diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/_metadata.json b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/_metadata.json index d63b2ce80ffe..00161d1fdf3b 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/_metadata.json +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/_metadata.json @@ -4,7 +4,11 @@ "client": { "name": "KeyVaultManagementClient", "filename": "_key_vault_management_client", - "description": "The Azure management API provides a RESTful set of web services that interact with Azure Key Vault." + "description": "The Azure management API provides a RESTful set of web services that interact with Azure Key Vault.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true }, "global_parameters": { "sync_method": { @@ -41,7 +45,10 @@ }, "config": { "credential": true, - "credential_scopes": ["https://management.azure.com/.default"] + "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 }, "operation_groups": { "vaults": "VaultsOperations", diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/__init__.py index 018d48d4060b..f54ed88d6ad2 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/__init__.py @@ -6,5 +6,5 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._key_vault_management_client_async import KeyVaultManagementClient +from ._key_vault_management_client import KeyVaultManagementClient __all__ = ['KeyVaultManagementClient'] diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/_configuration_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/_configuration.py similarity index 91% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/_configuration_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/_configuration.py index de60602281eb..27ee001d60d9 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/_configuration_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/_configuration.py @@ -10,6 +10,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -44,8 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.api_version = "2018-02-14" - self.credential_scopes = ['https://management.azure.com/.default'] - self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-keyvault/{}'.format(VERSION)) self._configure(**kwargs) @@ -57,6 +57,7 @@ def _configure( self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/_key_vault_management_client_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/_key_vault_management_client.py similarity index 88% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/_key_vault_management_client_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/_key_vault_management_client.py index d60ca750a58b..ae9d6141210f 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/_key_vault_management_client_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/_key_vault_management_client.py @@ -15,11 +15,11 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -from ._configuration_async import KeyVaultManagementClientConfiguration -from .operations_async import VaultsOperations -from .operations_async import PrivateEndpointConnectionsOperations -from .operations_async import PrivateLinkResourcesOperations -from .operations_async import Operations +from ._configuration import KeyVaultManagementClientConfiguration +from .operations import VaultsOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from .operations import Operations from .. import models @@ -27,13 +27,13 @@ class KeyVaultManagementClient(object): """The Azure management API provides a RESTful set of web services that interact with Azure Key Vault. :ivar vaults: VaultsOperations operations - :vartype vaults: azure.mgmt.keyvault.v2018_02_14.aio.operations_async.VaultsOperations + :vartype vaults: azure.mgmt.keyvault.v2018_02_14.aio.operations.VaultsOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations - :vartype private_endpoint_connections: azure.mgmt.keyvault.v2018_02_14.aio.operations_async.PrivateEndpointConnectionsOperations + :vartype private_endpoint_connections: azure.mgmt.keyvault.v2018_02_14.aio.operations.PrivateEndpointConnectionsOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations - :vartype private_link_resources: azure.mgmt.keyvault.v2018_02_14.aio.operations_async.PrivateLinkResourcesOperations + :vartype private_link_resources: azure.mgmt.keyvault.v2018_02_14.aio.operations.PrivateLinkResourcesOperations :ivar operations: Operations operations - :vartype operations: azure.mgmt.keyvault.v2018_02_14.aio.operations_async.Operations + :vartype operations: azure.mgmt.keyvault.v2018_02_14.aio.operations.Operations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -56,6 +56,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.vaults = VaultsOperations( diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations_async/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/__init__.py similarity index 68% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations_async/__init__.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/__init__.py index 4b4b20e273c3..ad4413dd4cae 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations_async/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/__init__.py @@ -6,10 +6,10 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._vaults_operations_async import VaultsOperations -from ._private_endpoint_connections_operations_async import PrivateEndpointConnectionsOperations -from ._private_link_resources_operations_async import PrivateLinkResourcesOperations -from ._operations_async import Operations +from ._vaults_operations import VaultsOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._operations import Operations __all__ = [ 'VaultsOperations', diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations_async/_operations_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_operations.py similarity index 91% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations_async/_operations_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_operations.py index 9d2336d57340..62e0af9fc08d 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations_async/_operations_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_operations.py @@ -9,7 +9,7 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +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 @@ -53,14 +53,17 @@ def list( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations_async/_private_endpoint_connections_operations_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_private_endpoint_connections_operations.py similarity index 94% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations_async/_private_endpoint_connections_operations_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_private_endpoint_connections_operations.py index e091b60e6508..af40df162584 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations_async/_private_endpoint_connections_operations_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_private_endpoint_connections_operations.py @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +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 @@ -64,9 +64,12 @@ async def get( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -84,7 +87,7 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -127,10 +130,13 @@ async def put( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.put.metadata['url'] # type: ignore @@ -149,13 +155,12 @@ async def put( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(properties, 'PrivateEndpointConnection') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -182,9 +187,12 @@ async def _delete_initial( **kwargs ) -> Optional["models.PrivateEndpointConnection"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.PrivateEndpointConnection"]] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -202,7 +210,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -241,7 +249,7 @@ async def begin_delete( :param vault_name: The name of the key vault. :type vault_name: str :param private_endpoint_connection_name: Name of the private endpoint connection associated - with the key vault. + with the key vault. :type private_endpoint_connection_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. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations_async/_private_link_resources_operations_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_private_link_resources_operations.py similarity index 91% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations_async/_private_link_resources_operations_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_private_link_resources_operations.py index 9bb76c573251..f3618351063c 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations_async/_private_link_resources_operations_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_private_link_resources_operations.py @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +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 @@ -58,9 +58,12 @@ async def list_by_vault( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateLinkResourceListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" + accept = "application/json" # Construct URL url = self.list_by_vault.metadata['url'] # type: ignore @@ -77,7 +80,7 @@ async def list_by_vault( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations_async/_vaults_operations_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_vaults_operations.py similarity index 93% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations_async/_vaults_operations_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_vaults_operations.py index 2d26869c6faa..caf32c967e86 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations_async/_vaults_operations_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_vaults_operations.py @@ -9,7 +9,7 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +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 @@ -51,10 +51,13 @@ async def _create_or_update_initial( **kwargs ) -> "models.Vault": cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -72,13 +75,12 @@ async def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultCreateOrUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -184,10 +186,13 @@ async def update( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update.metadata['url'] # type: ignore @@ -205,13 +210,12 @@ async def update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultPatchParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -249,7 +253,9 @@ async def delete( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" @@ -300,9 +306,12 @@ async def get( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -319,7 +328,7 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -361,10 +370,13 @@ async def update_access_policy( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultAccessPolicyParameters"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_access_policy.metadata['url'] # type: ignore @@ -383,13 +395,12 @@ async def update_access_policy( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultAccessPolicyParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -416,7 +427,7 @@ def list_by_resource_group( **kwargs ) -> AsyncIterable["models.VaultListResult"]: """The List operation gets information about the vaults associated with the subscription and - within the specified resource group. + within the specified resource group. :param resource_group_name: The name of the Resource Group to which the vault belongs. :type resource_group_name: str @@ -428,14 +439,17 @@ def list_by_resource_group( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -497,14 +511,17 @@ def list_by_subscription( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -562,14 +579,17 @@ def list_deleted( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DeletedVaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -631,9 +651,12 @@ async def get_deleted( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DeletedVault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" + accept = "application/json" # Construct URL url = self.get_deleted.metadata['url'] # type: ignore @@ -650,7 +673,7 @@ async def get_deleted( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -675,7 +698,9 @@ async def _purge_deleted_initial( **kwargs ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" @@ -781,15 +806,18 @@ def list( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ResourceListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) filter = "resourceType eq 'Microsoft.KeyVault/vaults'" api_version = "2015-11-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -851,10 +879,13 @@ async def check_name_availability( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.CheckNameAvailabilityResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.check_name_availability.metadata['url'] # type: ignore @@ -870,13 +901,12 @@ async def check_name_availability( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(vault_name, 'VaultCheckNameAvailabilityParameters') 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 diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/__init__.py index 236e5a302a3d..118b959ac33a 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/__init__.py @@ -86,6 +86,7 @@ PrivateEndpointServiceConnectionStatus, Reason, SecretPermissions, + SkuFamily, SkuName, StoragePermissions, ) @@ -134,6 +135,7 @@ 'PrivateEndpointServiceConnectionStatus', 'Reason', 'SecretPermissions', + 'SkuFamily', 'SkuName', 'StoragePermissions', ] diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/_key_vault_management_client_enums.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/_key_vault_management_client_enums.py index 296505d1a453..a56975b172c7 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/_key_vault_management_client_enums.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/_key_vault_management_client_enums.py @@ -6,134 +6,158 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from enum import Enum - -class AccessPolicyUpdateKind(str, Enum): - - add = "add" - replace = "replace" - remove = "remove" - -class CertificatePermissions(str, Enum): - - get = "get" - list = "list" - delete = "delete" - create = "create" - import_enum = "import" - update = "update" - managecontacts = "managecontacts" - getissuers = "getissuers" - listissuers = "listissuers" - setissuers = "setissuers" - deleteissuers = "deleteissuers" - manageissuers = "manageissuers" - recover = "recover" - purge = "purge" - backup = "backup" - restore = "restore" - -class CreateMode(str, Enum): +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AccessPolicyUpdateKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + ADD = "add" + REPLACE = "replace" + REMOVE = "remove" + +class CertificatePermissions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + GET = "get" + LIST = "list" + DELETE = "delete" + CREATE = "create" + IMPORT_ENUM = "import" + UPDATE = "update" + MANAGECONTACTS = "managecontacts" + GETISSUERS = "getissuers" + LISTISSUERS = "listissuers" + SETISSUERS = "setissuers" + DELETEISSUERS = "deleteissuers" + MANAGEISSUERS = "manageissuers" + RECOVER = "recover" + PURGE = "purge" + BACKUP = "backup" + RESTORE = "restore" + +class CreateMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The vault's create mode to indicate whether the vault need to be recovered or not. """ - recover = "recover" - default = "default" - -class KeyPermissions(str, Enum): - - encrypt = "encrypt" - decrypt = "decrypt" - wrap_key = "wrapKey" - unwrap_key = "unwrapKey" - sign = "sign" - verify = "verify" - get = "get" - list = "list" - create = "create" - update = "update" - import_enum = "import" - delete = "delete" - backup = "backup" - restore = "restore" - recover = "recover" - purge = "purge" - -class NetworkRuleAction(str, Enum): + RECOVER = "recover" + DEFAULT = "default" + +class KeyPermissions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + ENCRYPT = "encrypt" + DECRYPT = "decrypt" + WRAP_KEY = "wrapKey" + UNWRAP_KEY = "unwrapKey" + SIGN = "sign" + VERIFY = "verify" + GET = "get" + LIST = "list" + CREATE = "create" + UPDATE = "update" + IMPORT_ENUM = "import" + DELETE = "delete" + BACKUP = "backup" + RESTORE = "restore" + RECOVER = "recover" + PURGE = "purge" + +class NetworkRuleAction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated. """ - allow = "Allow" - deny = "Deny" + ALLOW = "Allow" + DENY = "Deny" -class NetworkRuleBypassOptions(str, Enum): +class NetworkRuleBypassOptions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the default is 'AzureServices'. """ - azure_services = "AzureServices" - none = "None" + AZURE_SERVICES = "AzureServices" + NONE = "None" -class PrivateEndpointConnectionProvisioningState(str, Enum): +class PrivateEndpointConnectionProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The current provisioning state. """ - succeeded = "Succeeded" - creating = "Creating" - updating = "Updating" - deleting = "Deleting" - failed = "Failed" - disconnected = "Disconnected" + SUCCEEDED = "Succeeded" + CREATING = "Creating" + UPDATING = "Updating" + DELETING = "Deleting" + FAILED = "Failed" + DISCONNECTED = "Disconnected" -class PrivateEndpointServiceConnectionStatus(str, Enum): +class PrivateEndpointServiceConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The private endpoint connection status. """ - pending = "Pending" - approved = "Approved" - rejected = "Rejected" - disconnected = "Disconnected" + PENDING = "Pending" + APPROVED = "Approved" + REJECTED = "Rejected" + DISCONNECTED = "Disconnected" -class Reason(str, Enum): +class Reason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The reason that a vault name could not be used. The Reason element is only returned if NameAvailable is false. """ - account_name_invalid = "AccountNameInvalid" - already_exists = "AlreadyExists" + ACCOUNT_NAME_INVALID = "AccountNameInvalid" + ALREADY_EXISTS = "AlreadyExists" -class SecretPermissions(str, Enum): +class SecretPermissions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - get = "get" - list = "list" - set = "set" - delete = "delete" - backup = "backup" - restore = "restore" - recover = "recover" - purge = "purge" + GET = "get" + LIST = "list" + SET = "set" + DELETE = "delete" + BACKUP = "backup" + RESTORE = "restore" + RECOVER = "recover" + PURGE = "purge" -class SkuName(str, Enum): +class SkuFamily(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """SKU family name + """ + + A = "A" + +class SkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """SKU name to specify whether the key vault is a standard vault or a premium vault. """ - standard = "standard" - premium = "premium" - -class StoragePermissions(str, Enum): - - get = "get" - list = "list" - delete = "delete" - set = "set" - update = "update" - regeneratekey = "regeneratekey" - recover = "recover" - purge = "purge" - backup = "backup" - restore = "restore" - setsas = "setsas" - listsas = "listsas" - getsas = "getsas" - deletesas = "deletesas" + STANDARD = "standard" + PREMIUM = "premium" + +class StoragePermissions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + GET = "get" + LIST = "list" + DELETE = "delete" + SET = "set" + UPDATE = "update" + REGENERATEKEY = "regeneratekey" + RECOVER = "recover" + PURGE = "purge" + BACKUP = "backup" + RESTORE = "restore" + SETSAS = "setsas" + LISTSAS = "listsas" + GETSAS = "getsas" + DELETESAS = "deletesas" diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/_models.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/_models.py index 3e93d85f73c6..cbd89c41565d 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/_models.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/_models.py @@ -735,19 +735,17 @@ def __init__( class Sku(msrest.serialization.Model): """SKU details. - Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :ivar family: Required. SKU family name. Default value: "A". - :vartype family: str + :param family: Required. SKU family name. Possible values include: "A". + :type family: str or ~azure.mgmt.keyvault.v2018_02_14.models.SkuFamily :param name: Required. SKU name to specify whether the key vault is a standard vault or a premium vault. Possible values include: "standard", "premium". :type name: str or ~azure.mgmt.keyvault.v2018_02_14.models.SkuName """ _validation = { - 'family': {'required': True, 'constant': True}, + 'family': {'required': True}, 'name': {'required': True}, } @@ -756,13 +754,12 @@ class Sku(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, } - family = "A" - def __init__( self, **kwargs ): super(Sku, self).__init__(**kwargs) + self.family = kwargs['family'] self.name = kwargs['name'] diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/_models_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/_models_py3.py index 144450aa44fe..5031dac2eee9 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/_models_py3.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/models/_models_py3.py @@ -800,19 +800,17 @@ def __init__( class Sku(msrest.serialization.Model): """SKU details. - Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :ivar family: Required. SKU family name. Default value: "A". - :vartype family: str + :param family: Required. SKU family name. Possible values include: "A". + :type family: str or ~azure.mgmt.keyvault.v2018_02_14.models.SkuFamily :param name: Required. SKU name to specify whether the key vault is a standard vault or a premium vault. Possible values include: "standard", "premium". :type name: str or ~azure.mgmt.keyvault.v2018_02_14.models.SkuName """ _validation = { - 'family': {'required': True, 'constant': True}, + 'family': {'required': True}, 'name': {'required': True}, } @@ -821,15 +819,15 @@ class Sku(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, } - family = "A" - def __init__( self, *, + family: Union[str, "SkuFamily"], name: Union[str, "SkuName"], **kwargs ): super(Sku, self).__init__(**kwargs) + self.family = family self.name = name diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_operations.py index be8bf406ad45..8aa8659f2726 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_operations.py @@ -8,7 +8,7 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -58,14 +58,17 @@ def list( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_private_endpoint_connections_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_private_endpoint_connections_operations.py index fb6c609fba68..071b41a122b6 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_private_endpoint_connections_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_private_endpoint_connections_operations.py @@ -8,7 +8,7 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +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 @@ -69,9 +69,12 @@ def get( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -89,7 +92,7 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -133,10 +136,13 @@ def put( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.put.metadata['url'] # type: ignore @@ -155,13 +161,12 @@ def put( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(properties, 'PrivateEndpointConnection') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -189,9 +194,12 @@ def _delete_initial( ): # type: (...) -> Optional["models.PrivateEndpointConnection"] cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.PrivateEndpointConnection"]] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -209,7 +217,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -249,7 +257,7 @@ def begin_delete( :param vault_name: The name of the key vault. :type vault_name: str :param private_endpoint_connection_name: Name of the private endpoint connection associated - with the key vault. + with the key vault. :type private_endpoint_connection_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. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_private_link_resources_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_private_link_resources_operations.py index 90e8eb527104..f73134a89fd7 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_private_link_resources_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_private_link_resources_operations.py @@ -8,7 +8,7 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +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 @@ -63,9 +63,12 @@ def list_by_vault( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateLinkResourceListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" + accept = "application/json" # Construct URL url = self.list_by_vault.metadata['url'] # type: ignore @@ -82,7 +85,7 @@ def list_by_vault( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_vaults_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_vaults_operations.py index a29a4f688c55..2aa1aee90fba 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_vaults_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/operations/_vaults_operations.py @@ -8,7 +8,7 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -56,10 +56,13 @@ def _create_or_update_initial( ): # type: (...) -> "models.Vault" cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -77,13 +80,12 @@ def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultCreateOrUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -191,10 +193,13 @@ def update( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update.metadata['url'] # type: ignore @@ -212,13 +217,12 @@ def update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultPatchParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -257,7 +261,9 @@ def delete( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" @@ -309,9 +315,12 @@ def get( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -328,7 +337,7 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -371,10 +380,13 @@ def update_access_policy( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultAccessPolicyParameters"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_access_policy.metadata['url'] # type: ignore @@ -393,13 +405,12 @@ def update_access_policy( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultAccessPolicyParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -427,7 +438,7 @@ def list_by_resource_group( ): # type: (...) -> Iterable["models.VaultListResult"] """The List operation gets information about the vaults associated with the subscription and - within the specified resource group. + within the specified resource group. :param resource_group_name: The name of the Resource Group to which the vault belongs. :type resource_group_name: str @@ -439,14 +450,17 @@ def list_by_resource_group( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -509,14 +523,17 @@ def list_by_subscription( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -575,14 +592,17 @@ def list_deleted( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DeletedVaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -645,9 +665,12 @@ def get_deleted( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DeletedVault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" + accept = "application/json" # Construct URL url = self.get_deleted.metadata['url'] # type: ignore @@ -664,7 +687,7 @@ def get_deleted( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -690,7 +713,9 @@ def _purge_deleted_initial( ): # type: (...) -> None cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" @@ -798,15 +823,18 @@ def list( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ResourceListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) filter = "resourceType eq 'Microsoft.KeyVault/vaults'" api_version = "2015-11-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -869,10 +897,13 @@ def check_name_availability( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.CheckNameAvailabilityResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2018-02-14" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.check_name_availability.metadata['url'] # type: ignore @@ -888,13 +919,12 @@ def check_name_availability( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(vault_name, 'VaultCheckNameAvailabilityParameters') 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 diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/__init__.py index 1f618cc50426..e03c4a3b857a 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/__init__.py @@ -10,7 +10,7 @@ __all__ = ['KeyVaultManagementClient'] try: - from ._patch import patch_sdk + from ._patch import patch_sdk # type: ignore patch_sdk() except ImportError: pass diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/_configuration.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/_configuration.py index f94da1f835aa..94ce5c06ea4f 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/_configuration.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/_configuration.py @@ -10,6 +10,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -47,8 +48,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.api_version = "2019-09-01" - self.credential_scopes = ['https://management.azure.com/.default'] - self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-keyvault/{}'.format(VERSION)) self._configure(**kwargs) @@ -61,6 +61,7 @@ def _configure( self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/_key_vault_management_client.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/_key_vault_management_client.py index 002dd4926bf8..db2f51d30a1b 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/_key_vault_management_client.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/_key_vault_management_client.py @@ -59,6 +59,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.vaults = VaultsOperations( diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/_metadata.json b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/_metadata.json index 707414eac945..b52026f36224 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/_metadata.json +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/_metadata.json @@ -4,7 +4,11 @@ "client": { "name": "KeyVaultManagementClient", "filename": "_key_vault_management_client", - "description": "The Azure management API provides a RESTful set of web services that interact with Azure Key Vault." + "description": "The Azure management API provides a RESTful set of web services that interact with Azure Key Vault.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true }, "global_parameters": { "sync_method": { @@ -41,7 +45,10 @@ }, "config": { "credential": true, - "credential_scopes": ["https://management.azure.com/.default"] + "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 }, "operation_groups": { "vaults": "VaultsOperations", diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/__init__.py index 018d48d4060b..f54ed88d6ad2 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/__init__.py @@ -6,5 +6,5 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._key_vault_management_client_async import KeyVaultManagementClient +from ._key_vault_management_client import KeyVaultManagementClient __all__ = ['KeyVaultManagementClient'] diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/_configuration_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/_configuration.py similarity index 91% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/_configuration_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/_configuration.py index dd4d7f9a309e..162e11e7018e 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/_configuration_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/_configuration.py @@ -10,6 +10,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -44,8 +45,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id self.api_version = "2019-09-01" - self.credential_scopes = ['https://management.azure.com/.default'] - self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-keyvault/{}'.format(VERSION)) self._configure(**kwargs) @@ -57,6 +57,7 @@ def _configure( self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/_key_vault_management_client_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/_key_vault_management_client.py similarity index 88% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/_key_vault_management_client_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/_key_vault_management_client.py index 2a79eafb034c..47d9136db386 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/_key_vault_management_client_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/_key_vault_management_client.py @@ -15,11 +15,11 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -from ._configuration_async import KeyVaultManagementClientConfiguration -from .operations_async import VaultsOperations -from .operations_async import PrivateEndpointConnectionsOperations -from .operations_async import PrivateLinkResourcesOperations -from .operations_async import Operations +from ._configuration import KeyVaultManagementClientConfiguration +from .operations import VaultsOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from .operations import Operations from .. import models @@ -27,13 +27,13 @@ class KeyVaultManagementClient(object): """The Azure management API provides a RESTful set of web services that interact with Azure Key Vault. :ivar vaults: VaultsOperations operations - :vartype vaults: azure.mgmt.keyvault.v2019_09_01.aio.operations_async.VaultsOperations + :vartype vaults: azure.mgmt.keyvault.v2019_09_01.aio.operations.VaultsOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations - :vartype private_endpoint_connections: azure.mgmt.keyvault.v2019_09_01.aio.operations_async.PrivateEndpointConnectionsOperations + :vartype private_endpoint_connections: azure.mgmt.keyvault.v2019_09_01.aio.operations.PrivateEndpointConnectionsOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations - :vartype private_link_resources: azure.mgmt.keyvault.v2019_09_01.aio.operations_async.PrivateLinkResourcesOperations + :vartype private_link_resources: azure.mgmt.keyvault.v2019_09_01.aio.operations.PrivateLinkResourcesOperations :ivar operations: Operations operations - :vartype operations: azure.mgmt.keyvault.v2019_09_01.aio.operations_async.Operations + :vartype operations: azure.mgmt.keyvault.v2019_09_01.aio.operations.Operations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -56,6 +56,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.vaults = VaultsOperations( diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations_async/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/__init__.py similarity index 68% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations_async/__init__.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/__init__.py index 4b4b20e273c3..ad4413dd4cae 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations_async/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/__init__.py @@ -6,10 +6,10 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._vaults_operations_async import VaultsOperations -from ._private_endpoint_connections_operations_async import PrivateEndpointConnectionsOperations -from ._private_link_resources_operations_async import PrivateLinkResourcesOperations -from ._operations_async import Operations +from ._vaults_operations import VaultsOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._operations import Operations __all__ = [ 'VaultsOperations', diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations_async/_operations_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_operations.py similarity index 91% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations_async/_operations_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_operations.py index 2550e07a34f6..63deb155db10 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations_async/_operations_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_operations.py @@ -9,7 +9,7 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +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 @@ -53,14 +53,17 @@ def list( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations_async/_private_endpoint_connections_operations_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_private_endpoint_connections_operations.py similarity index 94% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations_async/_private_endpoint_connections_operations_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_private_endpoint_connections_operations.py index d178f5229c2f..75e4e4933218 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations_async/_private_endpoint_connections_operations_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_private_endpoint_connections_operations.py @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +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 @@ -64,9 +64,12 @@ async def get( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -84,7 +87,7 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -127,10 +130,13 @@ async def put( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.put.metadata['url'] # type: ignore @@ -149,13 +155,12 @@ async def put( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(properties, 'PrivateEndpointConnection') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -182,9 +187,12 @@ async def _delete_initial( **kwargs ) -> Optional["models.PrivateEndpointConnection"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.PrivateEndpointConnection"]] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -202,7 +210,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -241,7 +249,7 @@ async def begin_delete( :param vault_name: The name of the key vault. :type vault_name: str :param private_endpoint_connection_name: Name of the private endpoint connection associated - with the key vault. + with the key vault. :type private_endpoint_connection_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. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations_async/_private_link_resources_operations_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_private_link_resources_operations.py similarity index 91% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations_async/_private_link_resources_operations_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_private_link_resources_operations.py index bd21613268b5..79df6ecfec61 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations_async/_private_link_resources_operations_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_private_link_resources_operations.py @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +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 @@ -58,9 +58,12 @@ async def list_by_vault( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateLinkResourceListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" # Construct URL url = self.list_by_vault.metadata['url'] # type: ignore @@ -77,7 +80,7 @@ async def list_by_vault( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations_async/_vaults_operations_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_vaults_operations.py similarity index 93% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations_async/_vaults_operations_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_vaults_operations.py index eaddd56bf6af..b68fb2b7e84b 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations_async/_vaults_operations_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_vaults_operations.py @@ -9,7 +9,7 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +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 @@ -51,10 +51,13 @@ async def _create_or_update_initial( **kwargs ) -> "models.Vault": cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -72,13 +75,12 @@ async def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultCreateOrUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -184,10 +186,13 @@ async def update( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update.metadata['url'] # type: ignore @@ -205,13 +210,12 @@ async def update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultPatchParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -249,7 +253,9 @@ async def delete( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" @@ -300,9 +306,12 @@ async def get( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -319,7 +328,7 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -361,10 +370,13 @@ async def update_access_policy( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultAccessPolicyParameters"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_access_policy.metadata['url'] # type: ignore @@ -383,13 +395,12 @@ async def update_access_policy( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultAccessPolicyParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -416,7 +427,7 @@ def list_by_resource_group( **kwargs ) -> AsyncIterable["models.VaultListResult"]: """The List operation gets information about the vaults associated with the subscription and - within the specified resource group. + within the specified resource group. :param resource_group_name: The name of the Resource Group to which the vault belongs. :type resource_group_name: str @@ -428,14 +439,17 @@ def list_by_resource_group( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -497,14 +511,17 @@ def list_by_subscription( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -562,14 +579,17 @@ def list_deleted( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DeletedVaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -631,9 +651,12 @@ async def get_deleted( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DeletedVault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" # Construct URL url = self.get_deleted.metadata['url'] # type: ignore @@ -650,7 +673,7 @@ async def get_deleted( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -675,7 +698,9 @@ async def _purge_deleted_initial( **kwargs ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" @@ -781,15 +806,18 @@ def list( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ResourceListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) filter = "resourceType eq 'Microsoft.KeyVault/vaults'" api_version = "2015-11-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -851,10 +879,13 @@ async def check_name_availability( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.CheckNameAvailabilityResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.check_name_availability.metadata['url'] # type: ignore @@ -870,13 +901,12 @@ async def check_name_availability( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(vault_name, 'VaultCheckNameAvailabilityParameters') 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 diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/__init__.py index 236e5a302a3d..118b959ac33a 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/__init__.py @@ -86,6 +86,7 @@ PrivateEndpointServiceConnectionStatus, Reason, SecretPermissions, + SkuFamily, SkuName, StoragePermissions, ) @@ -134,6 +135,7 @@ 'PrivateEndpointServiceConnectionStatus', 'Reason', 'SecretPermissions', + 'SkuFamily', 'SkuName', 'StoragePermissions', ] diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_key_vault_management_client_enums.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_key_vault_management_client_enums.py index 296505d1a453..a56975b172c7 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_key_vault_management_client_enums.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_key_vault_management_client_enums.py @@ -6,134 +6,158 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from enum import Enum - -class AccessPolicyUpdateKind(str, Enum): - - add = "add" - replace = "replace" - remove = "remove" - -class CertificatePermissions(str, Enum): - - get = "get" - list = "list" - delete = "delete" - create = "create" - import_enum = "import" - update = "update" - managecontacts = "managecontacts" - getissuers = "getissuers" - listissuers = "listissuers" - setissuers = "setissuers" - deleteissuers = "deleteissuers" - manageissuers = "manageissuers" - recover = "recover" - purge = "purge" - backup = "backup" - restore = "restore" - -class CreateMode(str, Enum): +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AccessPolicyUpdateKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + ADD = "add" + REPLACE = "replace" + REMOVE = "remove" + +class CertificatePermissions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + GET = "get" + LIST = "list" + DELETE = "delete" + CREATE = "create" + IMPORT_ENUM = "import" + UPDATE = "update" + MANAGECONTACTS = "managecontacts" + GETISSUERS = "getissuers" + LISTISSUERS = "listissuers" + SETISSUERS = "setissuers" + DELETEISSUERS = "deleteissuers" + MANAGEISSUERS = "manageissuers" + RECOVER = "recover" + PURGE = "purge" + BACKUP = "backup" + RESTORE = "restore" + +class CreateMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The vault's create mode to indicate whether the vault need to be recovered or not. """ - recover = "recover" - default = "default" - -class KeyPermissions(str, Enum): - - encrypt = "encrypt" - decrypt = "decrypt" - wrap_key = "wrapKey" - unwrap_key = "unwrapKey" - sign = "sign" - verify = "verify" - get = "get" - list = "list" - create = "create" - update = "update" - import_enum = "import" - delete = "delete" - backup = "backup" - restore = "restore" - recover = "recover" - purge = "purge" - -class NetworkRuleAction(str, Enum): + RECOVER = "recover" + DEFAULT = "default" + +class KeyPermissions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + ENCRYPT = "encrypt" + DECRYPT = "decrypt" + WRAP_KEY = "wrapKey" + UNWRAP_KEY = "unwrapKey" + SIGN = "sign" + VERIFY = "verify" + GET = "get" + LIST = "list" + CREATE = "create" + UPDATE = "update" + IMPORT_ENUM = "import" + DELETE = "delete" + BACKUP = "backup" + RESTORE = "restore" + RECOVER = "recover" + PURGE = "purge" + +class NetworkRuleAction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated. """ - allow = "Allow" - deny = "Deny" + ALLOW = "Allow" + DENY = "Deny" -class NetworkRuleBypassOptions(str, Enum): +class NetworkRuleBypassOptions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the default is 'AzureServices'. """ - azure_services = "AzureServices" - none = "None" + AZURE_SERVICES = "AzureServices" + NONE = "None" -class PrivateEndpointConnectionProvisioningState(str, Enum): +class PrivateEndpointConnectionProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The current provisioning state. """ - succeeded = "Succeeded" - creating = "Creating" - updating = "Updating" - deleting = "Deleting" - failed = "Failed" - disconnected = "Disconnected" + SUCCEEDED = "Succeeded" + CREATING = "Creating" + UPDATING = "Updating" + DELETING = "Deleting" + FAILED = "Failed" + DISCONNECTED = "Disconnected" -class PrivateEndpointServiceConnectionStatus(str, Enum): +class PrivateEndpointServiceConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The private endpoint connection status. """ - pending = "Pending" - approved = "Approved" - rejected = "Rejected" - disconnected = "Disconnected" + PENDING = "Pending" + APPROVED = "Approved" + REJECTED = "Rejected" + DISCONNECTED = "Disconnected" -class Reason(str, Enum): +class Reason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The reason that a vault name could not be used. The Reason element is only returned if NameAvailable is false. """ - account_name_invalid = "AccountNameInvalid" - already_exists = "AlreadyExists" + ACCOUNT_NAME_INVALID = "AccountNameInvalid" + ALREADY_EXISTS = "AlreadyExists" -class SecretPermissions(str, Enum): +class SecretPermissions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): - get = "get" - list = "list" - set = "set" - delete = "delete" - backup = "backup" - restore = "restore" - recover = "recover" - purge = "purge" + GET = "get" + LIST = "list" + SET = "set" + DELETE = "delete" + BACKUP = "backup" + RESTORE = "restore" + RECOVER = "recover" + PURGE = "purge" -class SkuName(str, Enum): +class SkuFamily(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """SKU family name + """ + + A = "A" + +class SkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """SKU name to specify whether the key vault is a standard vault or a premium vault. """ - standard = "standard" - premium = "premium" - -class StoragePermissions(str, Enum): - - get = "get" - list = "list" - delete = "delete" - set = "set" - update = "update" - regeneratekey = "regeneratekey" - recover = "recover" - purge = "purge" - backup = "backup" - restore = "restore" - setsas = "setsas" - listsas = "listsas" - getsas = "getsas" - deletesas = "deletesas" + STANDARD = "standard" + PREMIUM = "premium" + +class StoragePermissions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + GET = "get" + LIST = "list" + DELETE = "delete" + SET = "set" + UPDATE = "update" + REGENERATEKEY = "regeneratekey" + RECOVER = "recover" + PURGE = "purge" + BACKUP = "backup" + RESTORE = "restore" + SETSAS = "setsas" + LISTSAS = "listsas" + GETSAS = "getsas" + DELETESAS = "deletesas" diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models.py index ced2c10c856a..e051addc79e8 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models.py @@ -735,19 +735,17 @@ def __init__( class Sku(msrest.serialization.Model): """SKU details. - Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :ivar family: Required. SKU family name. Default value: "A". - :vartype family: str + :param family: Required. SKU family name. Possible values include: "A". + :type family: str or ~azure.mgmt.keyvault.v2019_09_01.models.SkuFamily :param name: Required. SKU name to specify whether the key vault is a standard vault or a premium vault. Possible values include: "standard", "premium". :type name: str or ~azure.mgmt.keyvault.v2019_09_01.models.SkuName """ _validation = { - 'family': {'required': True, 'constant': True}, + 'family': {'required': True}, 'name': {'required': True}, } @@ -756,13 +754,12 @@ class Sku(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, } - family = "A" - def __init__( self, **kwargs ): super(Sku, self).__init__(**kwargs) + self.family = kwargs['family'] self.name = kwargs['name'] diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models_py3.py index 278d21ba1c4c..b369d2e9008b 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models_py3.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/models/_models_py3.py @@ -800,19 +800,17 @@ def __init__( class Sku(msrest.serialization.Model): """SKU details. - Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :ivar family: Required. SKU family name. Default value: "A". - :vartype family: str + :param family: Required. SKU family name. Possible values include: "A". + :type family: str or ~azure.mgmt.keyvault.v2019_09_01.models.SkuFamily :param name: Required. SKU name to specify whether the key vault is a standard vault or a premium vault. Possible values include: "standard", "premium". :type name: str or ~azure.mgmt.keyvault.v2019_09_01.models.SkuName """ _validation = { - 'family': {'required': True, 'constant': True}, + 'family': {'required': True}, 'name': {'required': True}, } @@ -821,15 +819,15 @@ class Sku(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, } - family = "A" - def __init__( self, *, + family: Union[str, "SkuFamily"], name: Union[str, "SkuName"], **kwargs ): super(Sku, self).__init__(**kwargs) + self.family = family self.name = name diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_operations.py index 78b6b93255ed..a7393136ec23 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_operations.py @@ -8,7 +8,7 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -58,14 +58,17 @@ def list( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_private_endpoint_connections_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_private_endpoint_connections_operations.py index 843ee7f45cd1..6634d6a13037 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_private_endpoint_connections_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_private_endpoint_connections_operations.py @@ -8,7 +8,7 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +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 @@ -69,9 +69,12 @@ def get( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -89,7 +92,7 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -133,10 +136,13 @@ def put( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.put.metadata['url'] # type: ignore @@ -155,13 +161,12 @@ def put( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(properties, 'PrivateEndpointConnection') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -189,9 +194,12 @@ def _delete_initial( ): # type: (...) -> Optional["models.PrivateEndpointConnection"] cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.PrivateEndpointConnection"]] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -209,7 +217,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -249,7 +257,7 @@ def begin_delete( :param vault_name: The name of the key vault. :type vault_name: str :param private_endpoint_connection_name: Name of the private endpoint connection associated - with the key vault. + with the key vault. :type private_endpoint_connection_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. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_private_link_resources_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_private_link_resources_operations.py index db08e491b020..f28d08707d8c 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_private_link_resources_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_private_link_resources_operations.py @@ -8,7 +8,7 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +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 @@ -63,9 +63,12 @@ def list_by_vault( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateLinkResourceListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" # Construct URL url = self.list_by_vault.metadata['url'] # type: ignore @@ -82,7 +85,7 @@ def list_by_vault( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_vaults_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_vaults_operations.py index b71de4d0827f..75eecc42fc3d 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_vaults_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/operations/_vaults_operations.py @@ -8,7 +8,7 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -56,10 +56,13 @@ def _create_or_update_initial( ): # type: (...) -> "models.Vault" cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -77,13 +80,12 @@ def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultCreateOrUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -191,10 +193,13 @@ def update( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update.metadata['url'] # type: ignore @@ -212,13 +217,12 @@ def update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultPatchParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -257,7 +261,9 @@ def delete( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" @@ -309,9 +315,12 @@ def get( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -328,7 +337,7 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -371,10 +380,13 @@ def update_access_policy( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultAccessPolicyParameters"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_access_policy.metadata['url'] # type: ignore @@ -393,13 +405,12 @@ def update_access_policy( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultAccessPolicyParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -427,7 +438,7 @@ def list_by_resource_group( ): # type: (...) -> Iterable["models.VaultListResult"] """The List operation gets information about the vaults associated with the subscription and - within the specified resource group. + within the specified resource group. :param resource_group_name: The name of the Resource Group to which the vault belongs. :type resource_group_name: str @@ -439,14 +450,17 @@ def list_by_resource_group( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -509,14 +523,17 @@ def list_by_subscription( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -575,14 +592,17 @@ def list_deleted( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DeletedVaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -645,9 +665,12 @@ def get_deleted( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DeletedVault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" # Construct URL url = self.get_deleted.metadata['url'] # type: ignore @@ -664,7 +687,7 @@ def get_deleted( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -690,7 +713,9 @@ def _purge_deleted_initial( ): # type: (...) -> None cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" @@ -798,15 +823,18 @@ def list( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ResourceListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) filter = "resourceType eq 'Microsoft.KeyVault/vaults'" api_version = "2015-11-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -869,10 +897,13 @@ def check_name_availability( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.CheckNameAvailabilityResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.check_name_availability.metadata['url'] # type: ignore @@ -888,13 +919,12 @@ def check_name_availability( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(vault_name, 'VaultCheckNameAvailabilityParameters') 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 diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/__init__.py index 1f618cc50426..e03c4a3b857a 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/__init__.py @@ -10,7 +10,7 @@ __all__ = ['KeyVaultManagementClient'] try: - from ._patch import patch_sdk + from ._patch import patch_sdk # type: ignore patch_sdk() except ImportError: pass diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/_configuration.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/_configuration.py index 2ba5d31afdca..903070479297 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/_configuration.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/_configuration.py @@ -10,6 +10,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -46,8 +47,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.credential_scopes = ['https://management.azure.com/.default'] - self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-keyvault/{}'.format(VERSION)) self._configure(**kwargs) @@ -60,6 +60,7 @@ def _configure( self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) self.retry_policy = kwargs.get('retry_policy') or policies.RetryPolicy(**kwargs) self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) self.redirect_policy = kwargs.get('redirect_policy') or policies.RedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/_key_vault_management_client.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/_key_vault_management_client.py index bd919b7d3ca8..d3a6247e4892 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/_key_vault_management_client.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/_key_vault_management_client.py @@ -62,6 +62,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.vaults = VaultsOperations( diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/_metadata.json b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/_metadata.json index 6c57a74e2791..2fd2010f7828 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/_metadata.json +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/_metadata.json @@ -4,7 +4,11 @@ "client": { "name": "KeyVaultManagementClient", "filename": "_key_vault_management_client", - "description": "The Azure management API provides a RESTful set of web services that interact with Azure Key Vault." + "description": "The Azure management API provides a RESTful set of web services that interact with Azure Key Vault.", + "base_url": "\u0027https://management.azure.com\u0027", + "custom_base_url": null, + "azure_arm": true, + "has_lro_operations": true }, "global_parameters": { "sync_method": { @@ -41,7 +45,10 @@ }, "config": { "credential": true, - "credential_scopes": ["https://management.azure.com/.default"] + "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 }, "operation_groups": { "vaults": "VaultsOperations", diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/__init__.py index 018d48d4060b..f54ed88d6ad2 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/__init__.py @@ -6,5 +6,5 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._key_vault_management_client_async import KeyVaultManagementClient +from ._key_vault_management_client import KeyVaultManagementClient __all__ = ['KeyVaultManagementClient'] diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/_configuration_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/_configuration.py similarity index 91% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/_configuration_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/_configuration.py index 1365feaccf05..247e3ad647f2 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/_configuration_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/_configuration.py @@ -10,6 +10,7 @@ from azure.core.configuration import Configuration from azure.core.pipeline import policies +from azure.mgmt.core.policies import ARMHttpLoggingPolicy if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports @@ -43,8 +44,7 @@ def __init__( self.credential = credential self.subscription_id = subscription_id - self.credential_scopes = ['https://management.azure.com/.default'] - self.credential_scopes.extend(kwargs.pop('credential_scopes', [])) + self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default']) kwargs.setdefault('sdk_moniker', 'mgmt-keyvault/{}'.format(VERSION)) self._configure(**kwargs) @@ -56,6 +56,7 @@ def _configure( self.headers_policy = kwargs.get('headers_policy') or policies.HeadersPolicy(**kwargs) self.proxy_policy = kwargs.get('proxy_policy') or policies.ProxyPolicy(**kwargs) self.logging_policy = kwargs.get('logging_policy') or policies.NetworkTraceLoggingPolicy(**kwargs) + self.http_logging_policy = kwargs.get('http_logging_policy') or ARMHttpLoggingPolicy(**kwargs) self.retry_policy = kwargs.get('retry_policy') or policies.AsyncRetryPolicy(**kwargs) self.custom_hook_policy = kwargs.get('custom_hook_policy') or policies.CustomHookPolicy(**kwargs) self.redirect_policy = kwargs.get('redirect_policy') or policies.AsyncRedirectPolicy(**kwargs) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/_key_vault_management_client_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/_key_vault_management_client.py similarity index 86% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/_key_vault_management_client_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/_key_vault_management_client.py index 63f8675657a3..54af762c448c 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/_key_vault_management_client_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/_key_vault_management_client.py @@ -15,12 +15,12 @@ # pylint: disable=unused-import,ungrouped-imports from azure.core.credentials_async import AsyncTokenCredential -from ._configuration_async import KeyVaultManagementClientConfiguration -from .operations_async import VaultsOperations -from .operations_async import PrivateEndpointConnectionsOperations -from .operations_async import PrivateLinkResourcesOperations -from .operations_async import Operations -from .operations_async import ManagedHsmsOperations +from ._configuration import KeyVaultManagementClientConfiguration +from .operations import VaultsOperations +from .operations import PrivateEndpointConnectionsOperations +from .operations import PrivateLinkResourcesOperations +from .operations import Operations +from .operations import ManagedHsmsOperations from .. import models @@ -28,15 +28,15 @@ class KeyVaultManagementClient(object): """The Azure management API provides a RESTful set of web services that interact with Azure Key Vault. :ivar vaults: VaultsOperations operations - :vartype vaults: azure.mgmt.keyvault.v2020_04_01_preview.aio.operations_async.VaultsOperations + :vartype vaults: azure.mgmt.keyvault.v2020_04_01_preview.aio.operations.VaultsOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations - :vartype private_endpoint_connections: azure.mgmt.keyvault.v2020_04_01_preview.aio.operations_async.PrivateEndpointConnectionsOperations + :vartype private_endpoint_connections: azure.mgmt.keyvault.v2020_04_01_preview.aio.operations.PrivateEndpointConnectionsOperations :ivar private_link_resources: PrivateLinkResourcesOperations operations - :vartype private_link_resources: azure.mgmt.keyvault.v2020_04_01_preview.aio.operations_async.PrivateLinkResourcesOperations + :vartype private_link_resources: azure.mgmt.keyvault.v2020_04_01_preview.aio.operations.PrivateLinkResourcesOperations :ivar operations: Operations operations - :vartype operations: azure.mgmt.keyvault.v2020_04_01_preview.aio.operations_async.Operations + :vartype operations: azure.mgmt.keyvault.v2020_04_01_preview.aio.operations.Operations :ivar managed_hsms: ManagedHsmsOperations operations - :vartype managed_hsms: azure.mgmt.keyvault.v2020_04_01_preview.aio.operations_async.ManagedHsmsOperations + :vartype managed_hsms: azure.mgmt.keyvault.v2020_04_01_preview.aio.operations.ManagedHsmsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -59,6 +59,7 @@ def __init__( client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self._serialize = Serializer(client_models) + self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) self.vaults = VaultsOperations( diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations_async/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/__init__.py similarity index 64% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations_async/__init__.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/__init__.py index dea31d59299c..f3d25e38adc9 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations_async/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/__init__.py @@ -6,11 +6,11 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from ._vaults_operations_async import VaultsOperations -from ._private_endpoint_connections_operations_async import PrivateEndpointConnectionsOperations -from ._private_link_resources_operations_async import PrivateLinkResourcesOperations -from ._operations_async import Operations -from ._managed_hsms_operations_async import ManagedHsmsOperations +from ._vaults_operations import VaultsOperations +from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations +from ._private_link_resources_operations import PrivateLinkResourcesOperations +from ._operations import Operations +from ._managed_hsms_operations import ManagedHsmsOperations __all__ = [ 'VaultsOperations', diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations_async/_managed_hsms_operations_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_managed_hsms_operations.py similarity index 94% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations_async/_managed_hsms_operations_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_managed_hsms_operations.py index 637d2db53918..c5e72887db61 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations_async/_managed_hsms_operations_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_managed_hsms_operations.py @@ -9,7 +9,7 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +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 @@ -51,10 +51,13 @@ async def _create_or_update_initial( **kwargs ) -> "models.ManagedHsm": cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedHsm"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2020-04-01-preview" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -72,13 +75,12 @@ async def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'ManagedHsm') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -172,10 +174,13 @@ async def _update_initial( **kwargs ) -> "models.ManagedHsm": cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedHsm"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2020-04-01-preview" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self._update_initial.metadata['url'] # type: ignore @@ -193,13 +198,12 @@ async def _update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'ManagedHsm') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -292,9 +296,12 @@ async def _delete_initial( **kwargs ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2020-04-01-preview" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -311,6 +318,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -402,9 +410,12 @@ async def get( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedHsm"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2020-04-01-preview" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -421,7 +432,7 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -447,7 +458,7 @@ def list_by_resource_group( **kwargs ) -> AsyncIterable["models.ManagedHsmListResult"]: """The List operation gets information about the managed HSM Pools associated with the - subscription and within the specified resource group. + subscription and within the specified resource group. :param resource_group_name: Name of the resource group that contains the managed HSM pool. :type resource_group_name: str @@ -459,14 +470,17 @@ def list_by_resource_group( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedHsmListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2020-04-01-preview" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -520,7 +534,7 @@ def list_by_subscription( **kwargs ) -> AsyncIterable["models.ManagedHsmListResult"]: """The List operation gets information about the managed HSM Pools associated with the - subscription. + subscription. :param top: Maximum number of results to return. :type top: int @@ -530,14 +544,17 @@ def list_by_subscription( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedHsmListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2020-04-01-preview" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations_async/_operations_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_operations.py similarity index 91% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations_async/_operations_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_operations.py index 73744c866e99..b7fd0a186d42 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations_async/_operations_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_operations.py @@ -9,7 +9,7 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +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 @@ -53,14 +53,17 @@ def list( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations_async/_private_endpoint_connections_operations_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_private_endpoint_connections_operations.py similarity index 94% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations_async/_private_endpoint_connections_operations_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_private_endpoint_connections_operations.py index 90c258498b94..8cfd0cd24389 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations_async/_private_endpoint_connections_operations_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_private_endpoint_connections_operations.py @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar, Union import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +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 @@ -64,9 +64,12 @@ async def get( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -84,7 +87,7 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -127,10 +130,13 @@ async def put( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.put.metadata['url'] # type: ignore @@ -149,13 +155,12 @@ async def put( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(properties, 'PrivateEndpointConnection') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -182,9 +187,12 @@ async def _delete_initial( **kwargs ) -> Optional["models.PrivateEndpointConnection"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.PrivateEndpointConnection"]] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -202,7 +210,7 @@ async def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) @@ -241,7 +249,7 @@ async def begin_delete( :param vault_name: The name of the key vault. :type vault_name: str :param private_endpoint_connection_name: Name of the private endpoint connection associated - with the key vault. + with the key vault. :type private_endpoint_connection_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. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations_async/_private_link_resources_operations_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_private_link_resources_operations.py similarity index 91% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations_async/_private_link_resources_operations_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_private_link_resources_operations.py index 132c4877d372..a1fca642a74f 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations_async/_private_link_resources_operations_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_private_link_resources_operations.py @@ -8,7 +8,7 @@ from typing import Any, Callable, Dict, Generic, Optional, TypeVar import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +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 @@ -58,9 +58,12 @@ async def list_by_vault( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateLinkResourceListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" # Construct URL url = self.list_by_vault.metadata['url'] # type: ignore @@ -77,7 +80,7 @@ async def list_by_vault( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations_async/_vaults_operations_async.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_vaults_operations.py similarity index 93% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations_async/_vaults_operations_async.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_vaults_operations.py index 02b6554371c7..54fb6c383db7 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations_async/_vaults_operations_async.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_vaults_operations.py @@ -9,7 +9,7 @@ import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +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 @@ -51,10 +51,13 @@ async def _create_or_update_initial( **kwargs ) -> "models.Vault": cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -72,13 +75,12 @@ async def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultCreateOrUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -184,10 +186,13 @@ async def update( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update.metadata['url'] # type: ignore @@ -205,13 +210,12 @@ async def update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultPatchParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -249,7 +253,9 @@ async def delete( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" @@ -300,9 +306,12 @@ async def get( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -319,7 +328,7 @@ async def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -361,10 +370,13 @@ async def update_access_policy( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultAccessPolicyParameters"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_access_policy.metadata['url'] # type: ignore @@ -383,13 +395,12 @@ async def update_access_policy( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultAccessPolicyParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -416,7 +427,7 @@ def list_by_resource_group( **kwargs ) -> AsyncIterable["models.VaultListResult"]: """The List operation gets information about the vaults associated with the subscription and - within the specified resource group. + within the specified resource group. :param resource_group_name: The name of the Resource Group to which the vault belongs. :type resource_group_name: str @@ -428,14 +439,17 @@ def list_by_resource_group( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -497,14 +511,17 @@ def list_by_subscription( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -562,14 +579,17 @@ def list_deleted( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DeletedVaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -631,9 +651,12 @@ async def get_deleted( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DeletedVault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" # Construct URL url = self.get_deleted.metadata['url'] # type: ignore @@ -650,7 +673,7 @@ async def get_deleted( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -675,7 +698,9 @@ async def _purge_deleted_initial( **kwargs ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" @@ -781,15 +806,18 @@ def list( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ResourceListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) filter = "resourceType eq 'Microsoft.KeyVault/vaults'" api_version = "2015-11-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -851,10 +879,13 @@ async def check_name_availability( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.CheckNameAvailabilityResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.check_name_availability.metadata['url'] # type: ignore @@ -870,13 +901,12 @@ async def check_name_availability( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(vault_name, 'VaultCheckNameAvailabilityParameters') 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 diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/models/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/models/__init__.py index f43f12a3280e..bf8ab6a200c3 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/models/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/models/__init__.py @@ -94,6 +94,7 @@ CertificatePermissions, CreateMode, KeyPermissions, + ManagedHsmSkuFamily, ManagedHsmSkuName, NetworkRuleAction, NetworkRuleBypassOptions, @@ -102,6 +103,7 @@ ProvisioningState, Reason, SecretPermissions, + SkuFamily, SkuName, StoragePermissions, ) @@ -151,6 +153,7 @@ 'CertificatePermissions', 'CreateMode', 'KeyPermissions', + 'ManagedHsmSkuFamily', 'ManagedHsmSkuName', 'NetworkRuleAction', 'NetworkRuleBypassOptions', @@ -159,6 +162,7 @@ 'ProvisioningState', 'Reason', 'SecretPermissions', + 'SkuFamily', 'SkuName', 'StoragePermissions', ] diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/models/_key_vault_management_client_enums.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/models/_key_vault_management_client_enums.py index 0e2262705491..89443ea901e9 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/models/_key_vault_management_client_enums.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/models/_key_vault_management_client_enums.py @@ -6,154 +6,184 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -from enum import Enum - -class AccessPolicyUpdateKind(str, Enum): - - add = "add" - replace = "replace" - remove = "remove" - -class CertificatePermissions(str, Enum): - - get = "get" - list = "list" - delete = "delete" - create = "create" - import_enum = "import" - update = "update" - managecontacts = "managecontacts" - getissuers = "getissuers" - listissuers = "listissuers" - setissuers = "setissuers" - deleteissuers = "deleteissuers" - manageissuers = "manageissuers" - recover = "recover" - purge = "purge" - backup = "backup" - restore = "restore" - -class CreateMode(str, Enum): +from enum import Enum, EnumMeta +from six import with_metaclass + +class _CaseInsensitiveEnumMeta(EnumMeta): + def __getitem__(self, name): + return super().__getitem__(name.upper()) + + def __getattr__(cls, name): + """Return the enum member matching `name` + We use __getattr__ instead of descriptors or inserting into the enum + class' __dict__ in order to support `name` and `value` being both + properties for enum members (which live in the class' __dict__) and + enum members themselves. + """ + try: + return cls._member_map_[name.upper()] + except KeyError: + raise AttributeError(name) + + +class AccessPolicyUpdateKind(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + ADD = "add" + REPLACE = "replace" + REMOVE = "remove" + +class CertificatePermissions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + GET = "get" + LIST = "list" + DELETE = "delete" + CREATE = "create" + IMPORT_ENUM = "import" + UPDATE = "update" + MANAGECONTACTS = "managecontacts" + GETISSUERS = "getissuers" + LISTISSUERS = "listissuers" + SETISSUERS = "setissuers" + DELETEISSUERS = "deleteissuers" + MANAGEISSUERS = "manageissuers" + RECOVER = "recover" + PURGE = "purge" + BACKUP = "backup" + RESTORE = "restore" + +class CreateMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The vault's create mode to indicate whether the vault need to be recovered or not. """ - recover = "recover" - default = "default" - -class KeyPermissions(str, Enum): - - encrypt = "encrypt" - decrypt = "decrypt" - wrap_key = "wrapKey" - unwrap_key = "unwrapKey" - sign = "sign" - verify = "verify" - get = "get" - list = "list" - create = "create" - update = "update" - import_enum = "import" - delete = "delete" - backup = "backup" - restore = "restore" - recover = "recover" - purge = "purge" - -class ManagedHsmSkuName(str, Enum): + RECOVER = "recover" + DEFAULT = "default" + +class KeyPermissions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + ENCRYPT = "encrypt" + DECRYPT = "decrypt" + WRAP_KEY = "wrapKey" + UNWRAP_KEY = "unwrapKey" + SIGN = "sign" + VERIFY = "verify" + GET = "get" + LIST = "list" + CREATE = "create" + UPDATE = "update" + IMPORT_ENUM = "import" + DELETE = "delete" + BACKUP = "backup" + RESTORE = "restore" + RECOVER = "recover" + PURGE = "purge" + +class ManagedHsmSkuFamily(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """SKU Family of the managed HSM Pool + """ + + B = "B" + +class ManagedHsmSkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """SKU of the managed HSM Pool """ - standard_b1 = "Standard_B1" - custom_b32 = "Custom_B32" + STANDARD_B1 = "Standard_B1" + CUSTOM_B32 = "Custom_B32" -class NetworkRuleAction(str, Enum): +class NetworkRuleAction(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The default action when no rule from ipRules and from virtualNetworkRules match. This is only used after the bypass property has been evaluated. """ - allow = "Allow" - deny = "Deny" + ALLOW = "Allow" + DENY = "Deny" -class NetworkRuleBypassOptions(str, Enum): +class NetworkRuleBypassOptions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Tells what traffic can bypass network rules. This can be 'AzureServices' or 'None'. If not specified the default is 'AzureServices'. """ - azure_services = "AzureServices" - none = "None" + AZURE_SERVICES = "AzureServices" + NONE = "None" -class PrivateEndpointConnectionProvisioningState(str, Enum): +class PrivateEndpointConnectionProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The current provisioning state. """ - succeeded = "Succeeded" - creating = "Creating" - updating = "Updating" - deleting = "Deleting" - failed = "Failed" - disconnected = "Disconnected" + SUCCEEDED = "Succeeded" + CREATING = "Creating" + UPDATING = "Updating" + DELETING = "Deleting" + FAILED = "Failed" + DISCONNECTED = "Disconnected" -class PrivateEndpointServiceConnectionStatus(str, Enum): +class PrivateEndpointServiceConnectionStatus(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The private endpoint connection status. """ - pending = "Pending" - approved = "Approved" - rejected = "Rejected" - disconnected = "Disconnected" + PENDING = "Pending" + APPROVED = "Approved" + REJECTED = "Rejected" + DISCONNECTED = "Disconnected" -class ProvisioningState(str, Enum): +class ProvisioningState(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """Provisioning state. """ - succeeded = "Succeeded" #: The managed HSM Pool has been full provisioned. - provisioning = "Provisioning" #: The managed HSM Pool is currently being provisioned. - failed = "Failed" #: Provisioning of the managed HSM Pool has failed. - updating = "Updating" #: The managed HSM Pool is currently being updated. - deleting = "Deleting" #: The managed HSM Pool is currently being deleted. - activated = "Activated" #: The managed HSM pool is ready for normal use. - security_domain_restore = "SecurityDomainRestore" #: The managed HSM pool is waiting for a security domain restore action. - restoring = "Restoring" #: The managed HSM pool is being restored from full HSM backup. + SUCCEEDED = "Succeeded" #: The managed HSM Pool has been full provisioned. + PROVISIONING = "Provisioning" #: The managed HSM Pool is currently being provisioned. + FAILED = "Failed" #: Provisioning of the managed HSM Pool has failed. + UPDATING = "Updating" #: The managed HSM Pool is currently being updated. + DELETING = "Deleting" #: The managed HSM Pool is currently being deleted. + ACTIVATED = "Activated" #: The managed HSM pool is ready for normal use. + SECURITY_DOMAIN_RESTORE = "SecurityDomainRestore" #: The managed HSM pool is waiting for a security domain restore action. + RESTORING = "Restoring" #: The managed HSM pool is being restored from full HSM backup. -class Reason(str, Enum): +class Reason(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The reason that a vault name could not be used. The Reason element is only returned if NameAvailable is false. """ - account_name_invalid = "AccountNameInvalid" - already_exists = "AlreadyExists" + ACCOUNT_NAME_INVALID = "AccountNameInvalid" + ALREADY_EXISTS = "AlreadyExists" -class SecretPermissions(str, Enum): +class SecretPermissions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + GET = "get" + LIST = "list" + SET = "set" + DELETE = "delete" + BACKUP = "backup" + RESTORE = "restore" + RECOVER = "recover" + PURGE = "purge" + +class SkuFamily(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """SKU family name + """ - get = "get" - list = "list" - set = "set" - delete = "delete" - backup = "backup" - restore = "restore" - recover = "recover" - purge = "purge" + A = "A" -class SkuName(str, Enum): +class SkuName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """SKU name to specify whether the key vault is a standard vault or a premium vault. """ - standard = "standard" - premium = "premium" - -class StoragePermissions(str, Enum): - - get = "get" - list = "list" - delete = "delete" - set = "set" - update = "update" - regeneratekey = "regeneratekey" - recover = "recover" - purge = "purge" - backup = "backup" - restore = "restore" - setsas = "setsas" - listsas = "listsas" - getsas = "getsas" - deletesas = "deletesas" + STANDARD = "standard" + PREMIUM = "premium" + +class StoragePermissions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + + GET = "get" + LIST = "list" + DELETE = "delete" + SET = "set" + UPDATE = "update" + REGENERATEKEY = "regeneratekey" + RECOVER = "recover" + PURGE = "purge" + BACKUP = "backup" + RESTORE = "restore" + SETSAS = "setsas" + LISTSAS = "listsas" + GETSAS = "getsas" + DELETESAS = "deletesas" diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/models/_models.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/models/_models.py index 1fb95240da11..a8f30bf91c4b 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/models/_models.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/models/_models.py @@ -524,19 +524,17 @@ def __init__( class ManagedHsmSku(msrest.serialization.Model): """SKU details. - Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :ivar family: Required. SKU Family of the managed HSM Pool. Default value: "B". - :vartype family: str + :param family: Required. SKU Family of the managed HSM Pool. Possible values include: "B". + :type family: str or ~azure.mgmt.keyvault.v2020_04_01_preview.models.ManagedHsmSkuFamily :param name: Required. SKU of the managed HSM Pool. Possible values include: "Standard_B1", "Custom_B32". :type name: str or ~azure.mgmt.keyvault.v2020_04_01_preview.models.ManagedHsmSkuName """ _validation = { - 'family': {'required': True, 'constant': True}, + 'family': {'required': True}, 'name': {'required': True}, } @@ -545,13 +543,12 @@ class ManagedHsmSku(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, } - family = "B" - def __init__( self, **kwargs ): super(ManagedHsmSku, self).__init__(**kwargs) + self.family = kwargs['family'] self.name = kwargs['name'] @@ -1020,19 +1017,17 @@ def __init__( class Sku(msrest.serialization.Model): """SKU details. - Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :ivar family: Required. SKU family name. Default value: "A". - :vartype family: str + :param family: Required. SKU family name. Possible values include: "A". + :type family: str or ~azure.mgmt.keyvault.v2020_04_01_preview.models.SkuFamily :param name: Required. SKU name to specify whether the key vault is a standard vault or a premium vault. Possible values include: "standard", "premium". :type name: str or ~azure.mgmt.keyvault.v2020_04_01_preview.models.SkuName """ _validation = { - 'family': {'required': True, 'constant': True}, + 'family': {'required': True}, 'name': {'required': True}, } @@ -1041,13 +1036,12 @@ class Sku(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, } - family = "A" - def __init__( self, **kwargs ): super(Sku, self).__init__(**kwargs) + self.family = kwargs['family'] self.name = kwargs['name'] diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/models/_models_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/models/_models_py3.py index 2a3c9b602e77..8c412828d295 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/models/_models_py3.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/models/_models_py3.py @@ -567,19 +567,17 @@ def __init__( class ManagedHsmSku(msrest.serialization.Model): """SKU details. - Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :ivar family: Required. SKU Family of the managed HSM Pool. Default value: "B". - :vartype family: str + :param family: Required. SKU Family of the managed HSM Pool. Possible values include: "B". + :type family: str or ~azure.mgmt.keyvault.v2020_04_01_preview.models.ManagedHsmSkuFamily :param name: Required. SKU of the managed HSM Pool. Possible values include: "Standard_B1", "Custom_B32". :type name: str or ~azure.mgmt.keyvault.v2020_04_01_preview.models.ManagedHsmSkuName """ _validation = { - 'family': {'required': True, 'constant': True}, + 'family': {'required': True}, 'name': {'required': True}, } @@ -588,15 +586,15 @@ class ManagedHsmSku(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, } - family = "B" - def __init__( self, *, + family: Union[str, "ManagedHsmSkuFamily"], name: Union[str, "ManagedHsmSkuName"], **kwargs ): super(ManagedHsmSku, self).__init__(**kwargs) + self.family = family self.name = name @@ -1107,19 +1105,17 @@ def __init__( class Sku(msrest.serialization.Model): """SKU details. - Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :ivar family: Required. SKU family name. Default value: "A". - :vartype family: str + :param family: Required. SKU family name. Possible values include: "A". + :type family: str or ~azure.mgmt.keyvault.v2020_04_01_preview.models.SkuFamily :param name: Required. SKU name to specify whether the key vault is a standard vault or a premium vault. Possible values include: "standard", "premium". :type name: str or ~azure.mgmt.keyvault.v2020_04_01_preview.models.SkuName """ _validation = { - 'family': {'required': True, 'constant': True}, + 'family': {'required': True}, 'name': {'required': True}, } @@ -1128,15 +1124,15 @@ class Sku(msrest.serialization.Model): 'name': {'key': 'name', 'type': 'str'}, } - family = "A" - def __init__( self, *, + family: Union[str, "SkuFamily"], name: Union[str, "SkuName"], **kwargs ): super(Sku, self).__init__(**kwargs) + self.family = family self.name = name diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_managed_hsms_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_managed_hsms_operations.py index 7d64eeab3739..d044fc749808 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_managed_hsms_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_managed_hsms_operations.py @@ -8,7 +8,7 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -56,10 +56,13 @@ def _create_or_update_initial( ): # type: (...) -> "models.ManagedHsm" cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedHsm"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2020-04-01-preview" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -77,13 +80,12 @@ def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'ManagedHsm') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -179,10 +181,13 @@ def _update_initial( ): # type: (...) -> "models.ManagedHsm" cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedHsm"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2020-04-01-preview" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self._update_initial.metadata['url'] # type: ignore @@ -200,13 +205,12 @@ def _update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'ManagedHsm') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -301,9 +305,12 @@ def _delete_initial( ): # type: (...) -> None cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2020-04-01-preview" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -320,6 +327,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -413,9 +421,12 @@ def get( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedHsm"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2020-04-01-preview" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -432,7 +443,7 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -459,7 +470,7 @@ def list_by_resource_group( ): # type: (...) -> Iterable["models.ManagedHsmListResult"] """The List operation gets information about the managed HSM Pools associated with the - subscription and within the specified resource group. + subscription and within the specified resource group. :param resource_group_name: Name of the resource group that contains the managed HSM pool. :type resource_group_name: str @@ -471,14 +482,17 @@ def list_by_resource_group( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedHsmListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2020-04-01-preview" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -533,7 +547,7 @@ def list_by_subscription( ): # type: (...) -> Iterable["models.ManagedHsmListResult"] """The List operation gets information about the managed HSM Pools associated with the - subscription. + subscription. :param top: Maximum number of results to return. :type top: int @@ -543,14 +557,17 @@ def list_by_subscription( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ManagedHsmListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2020-04-01-preview" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_operations.py index b4500ebc1f0a..d5352d2ccd47 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_operations.py @@ -8,7 +8,7 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -58,14 +58,17 @@ def list( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.OperationListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_private_endpoint_connections_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_private_endpoint_connections_operations.py index 09c75f99ea40..613b6990116e 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_private_endpoint_connections_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_private_endpoint_connections_operations.py @@ -8,7 +8,7 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +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 @@ -69,9 +69,12 @@ def get( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -89,7 +92,7 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -133,10 +136,13 @@ def put( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateEndpointConnection"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.put.metadata['url'] # type: ignore @@ -155,13 +161,12 @@ def put( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(properties, 'PrivateEndpointConnection') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -189,9 +194,12 @@ def _delete_initial( ): # type: (...) -> Optional["models.PrivateEndpointConnection"] cls = kwargs.pop('cls', None) # type: ClsType[Optional["models.PrivateEndpointConnection"]] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" # Construct URL url = self._delete_initial.metadata['url'] # type: ignore @@ -209,7 +217,7 @@ def _delete_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) @@ -249,7 +257,7 @@ def begin_delete( :param vault_name: The name of the key vault. :type vault_name: str :param private_endpoint_connection_name: Name of the private endpoint connection associated - with the key vault. + with the key vault. :type private_endpoint_connection_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. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_private_link_resources_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_private_link_resources_operations.py index f5eba48e9676..dc2dd1396d84 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_private_link_resources_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_private_link_resources_operations.py @@ -8,7 +8,7 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +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 @@ -63,9 +63,12 @@ def list_by_vault( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.PrivateLinkResourceListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" # Construct URL url = self.list_by_vault.metadata['url'] # type: ignore @@ -82,7 +85,7 @@ def list_by_vault( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_vaults_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_vaults_operations.py index f98a64f04dc9..8a47698f6909 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_vaults_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_vaults_operations.py @@ -8,7 +8,7 @@ from typing import TYPE_CHECKING import warnings -from azure.core.exceptions import HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse @@ -56,10 +56,13 @@ def _create_or_update_initial( ): # type: (...) -> "models.Vault" cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self._create_or_update_initial.metadata['url'] # type: ignore @@ -77,13 +80,12 @@ def _create_or_update_initial( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultCreateOrUpdateParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -191,10 +193,13 @@ def update( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update.metadata['url'] # type: ignore @@ -212,13 +217,12 @@ def update( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultPatchParameters') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -257,7 +261,9 @@ def delete( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" @@ -309,9 +315,12 @@ def get( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.Vault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore @@ -328,7 +337,7 @@ def get( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -371,10 +380,13 @@ def update_access_policy( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultAccessPolicyParameters"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.update_access_policy.metadata['url'] # type: ignore @@ -393,13 +405,12 @@ def update_access_policy( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, 'VaultAccessPolicyParameters') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) - pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response @@ -427,7 +438,7 @@ def list_by_resource_group( ): # type: (...) -> Iterable["models.VaultListResult"] """The List operation gets information about the vaults associated with the subscription and - within the specified resource group. + within the specified resource group. :param resource_group_name: The name of the Resource Group to which the vault belongs. :type resource_group_name: str @@ -439,14 +450,17 @@ def list_by_resource_group( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -509,14 +523,17 @@ def list_by_subscription( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.VaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -575,14 +592,17 @@ def list_deleted( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DeletedVaultListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -645,9 +665,12 @@ def get_deleted( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.DeletedVault"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" + accept = "application/json" # Construct URL url = self.get_deleted.metadata['url'] # type: ignore @@ -664,7 +687,7 @@ def get_deleted( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + 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) @@ -690,7 +713,9 @@ def _purge_deleted_initial( ): # type: (...) -> None cls = kwargs.pop('cls', None) # type: ClsType[None] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" @@ -798,15 +823,18 @@ def list( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.ResourceListResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) filter = "resourceType eq 'Microsoft.KeyVault/vaults'" api_version = "2015-11-01" + accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL @@ -869,10 +897,13 @@ def check_name_availability( :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["models.CheckNameAvailabilityResult"] - error_map = {404: ResourceNotFoundError, 409: ResourceExistsError} + error_map = { + 401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError + } error_map.update(kwargs.pop('error_map', {})) api_version = "2019-09-01" content_type = kwargs.pop("content_type", "application/json") + accept = "application/json" # Construct URL url = self.check_name_availability.metadata['url'] # type: ignore @@ -888,13 +919,12 @@ def check_name_availability( # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') - header_parameters['Accept'] = 'application/json' + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(vault_name, 'VaultCheckNameAvailabilityParameters') 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 diff --git a/sdk/keyvault/azure-mgmt-keyvault/tests/recordings/test_cli_mgmt_keyvault.test_keyvault.yaml b/sdk/keyvault/azure-mgmt-keyvault/tests/recordings/test_cli_mgmt_keyvault.test_keyvault.yaml index 117c0930d729..3d519a87df33 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/tests/recordings/test_cli_mgmt_keyvault.test_keyvault.yaml +++ b/sdk/keyvault/azure-mgmt-keyvault/tests/recordings/test_cli_mgmt_keyvault.test_keyvault.yaml @@ -22,7 +22,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxz?api-version=2019-09-01 response: @@ -36,7 +36,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 09 Sep 2020 03:22:31 GMT + - Tue, 15 Sep 2020 06:46:49 GMT expires: - '-1' pragma: @@ -54,9 +54,9 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.1.31.0 + - 1.1.55.0 x-ms-ratelimit-remaining-subscription-writes: - - '1197' + - '1199' x-powered-by: - ASP.NET status: @@ -72,7 +72,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxz?api-version=2019-09-01 response: @@ -86,7 +86,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 09 Sep 2020 03:23:02 GMT + - Tue, 15 Sep 2020 06:47:20 GMT expires: - '-1' pragma: @@ -104,7 +104,7 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.1.31.0 + - 1.1.55.0 x-powered-by: - ASP.NET status: @@ -126,7 +126,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxz/accessPolicies/add?api-version=2019-09-01 response: @@ -140,7 +140,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 09 Sep 2020 03:23:03 GMT + - Tue, 15 Sep 2020 06:47:21 GMT expires: - '-1' pragma: @@ -158,9 +158,9 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.1.31.0 + - 1.1.55.0 x-ms-ratelimit-remaining-subscription-writes: - - '1196' + - '1198' x-powered-by: - ASP.NET status: @@ -176,7 +176,7 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxz?api-version=2019-09-01 response: @@ -190,7 +190,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 09 Sep 2020 03:23:04 GMT + - Tue, 15 Sep 2020 06:47:21 GMT expires: - '-1' pragma: @@ -208,7 +208,7 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.1.31.0 + - 1.1.55.0 x-powered-by: - ASP.NET status: @@ -228,7 +228,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxz?api-version=2019-09-01 response: @@ -242,7 +242,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 09 Sep 2020 03:23:06 GMT + - Tue, 15 Sep 2020 06:47:24 GMT expires: - '-1' pragma: @@ -260,9 +260,9 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.1.31.0 + - 1.1.55.0 x-ms-ratelimit-remaining-subscription-writes: - - '1195' + - '1197' x-powered-by: - ASP.NET status: @@ -282,7 +282,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/checkNameAvailability?api-version=2019-09-01 response: @@ -297,7 +297,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 09 Sep 2020 03:23:07 GMT + - Tue, 15 Sep 2020 06:47:24 GMT expires: - '-1' pragma: @@ -315,7 +315,7 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.1.31.0 + - 1.1.55.0 x-powered-by: - ASP.NET status: @@ -333,7 +333,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxz?api-version=2019-09-01 response: @@ -345,7 +345,7 @@ interactions: content-length: - '0' date: - - Wed, 09 Sep 2020 03:23:12 GMT + - Tue, 15 Sep 2020 06:47:30 GMT expires: - '-1' pragma: @@ -359,9 +359,9 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.1.31.0 + - 1.1.55.0 x-ms-ratelimit-remaining-subscription-deletes: - - '14998' + - '14999' x-powered-by: - ASP.NET status: @@ -377,12 +377,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/myValtZikfikxz?api-version=2019-09-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/myValtZikfikxz","name":"myValtZikfikxz","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxz","location":"eastus","tags":{},"deletionDate":"2020-09-09T03:23:08Z","scheduledPurgeDate":"2020-12-08T03:23:08Z"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/myValtZikfikxz","name":"myValtZikfikxz","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxz","location":"eastus","tags":{},"deletionDate":"2020-09-15T06:47:25Z","scheduledPurgeDate":"2020-12-14T06:47:25Z"}}' headers: cache-control: - no-cache @@ -391,7 +391,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 09 Sep 2020 03:23:14 GMT + - Tue, 15 Sep 2020 06:47:30 GMT expires: - '-1' pragma: @@ -409,7 +409,7 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.1.31.0 + - 1.1.55.0 x-powered-by: - ASP.NET status: @@ -427,7 +427,7 @@ interactions: Content-Length: - '0' User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/myValtZikfikxz/purge?api-version=2019-09-01 response: @@ -439,11 +439,11 @@ interactions: content-length: - '0' date: - - Wed, 09 Sep 2020 03:23:14 GMT + - Tue, 15 Sep 2020 06:47:31 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1MjE4NTk2NTYzOTI4OHxCQ0Q0NkIwQTNGOEM0RTk5QTc1NTg3MjUxMkREOTg3OA?api-version=2019-09-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1NzQ5MjUyNDU4Njg2OXxFNkQ4Qzk5OTUyQjk0OTVFQTlCMDE2NzE0OENEOEY0OA?api-version=2019-09-01 pragma: - no-cache server: @@ -455,101 +455,9 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.1.31.0 + - 1.1.55.0 x-ms-ratelimit-remaining-subscription-writes: - - '1198' - x-powered-by: - - ASP.NET - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1MjE4NTk2NTYzOTI4OHxCQ0Q0NkIwQTNGOEM0RTk5QTc1NTg3MjUxMkREOTg3OA?api-version=2019-09-01 - response: - body: - string: '{"createdDateTime":"2020-09-09 03:23:15Z","status":"NotStarted"}' - headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 09 Sep 2020 03:23:20 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1MjE4NTk2NTYzOTI4OHxCQ0Q0NkIwQTNGOEM0RTk5QTc1NTg3MjUxMkREOTg3OA?api-version=2019-09-01 - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-service-version: - - 1.1.31.0 - x-powered-by: - - ASP.NET - status: - code: 202 - message: Accepted -- request: - body: null - headers: - Accept: - - '*/*' - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1MjE4NTk2NTYzOTI4OHxCQ0Q0NkIwQTNGOEM0RTk5QTc1NTg3MjUxMkREOTg3OA?api-version=2019-09-01 - response: - body: - string: '{"createdDateTime":"2020-09-09 03:23:15Z","status":"NotStarted"}' - headers: - cache-control: - - no-cache - content-length: - - '64' - content-type: - - application/json; charset=utf-8 - date: - - Wed, 09 Sep 2020 03:23:25 GMT - expires: - - '-1' - location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1MjE4NTk2NTYzOTI4OHxCQ0Q0NkIwQTNGOEM0RTk5QTc1NTg3MjUxMkREOTg3OA?api-version=2019-09-01 - pragma: - - no-cache - server: - - Microsoft-IIS/10.0 - strict-transport-security: - - max-age=31536000; includeSubDomains - x-aspnet-version: - - 4.0.30319 - x-content-type-options: - - nosniff - x-ms-keyvault-service-version: - - 1.1.31.0 + - '1199' x-powered-by: - ASP.NET status: @@ -565,12 +473,12 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1MjE4NTk2NTYzOTI4OHxCQ0Q0NkIwQTNGOEM0RTk5QTc1NTg3MjUxMkREOTg3OA?api-version=2019-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1NzQ5MjUyNDU4Njg2OXxFNkQ4Qzk5OTUyQjk0OTVFQTlCMDE2NzE0OENEOEY0OA?api-version=2019-09-01 response: body: - string: '{"createdDateTime":"2020-09-09 03:23:15Z","status":"NotStarted"}' + string: '{"createdDateTime":"2020-09-15 06:47:31Z","status":"NotStarted"}' headers: cache-control: - no-cache @@ -579,11 +487,11 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 09 Sep 2020 03:23:31 GMT + - Tue, 15 Sep 2020 06:47:36 GMT expires: - '-1' location: - - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1MjE4NTk2NTYzOTI4OHxCQ0Q0NkIwQTNGOEM0RTk5QTc1NTg3MjUxMkREOTg3OA?api-version=2019-09-01 + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1NzQ5MjUyNDU4Njg2OXxFNkQ4Qzk5OTUyQjk0OTVFQTlCMDE2NzE0OENEOEY0OA?api-version=2019-09-01 pragma: - no-cache server: @@ -595,7 +503,7 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.1.31.0 + - 1.1.55.0 x-powered-by: - ASP.NET status: @@ -611,13 +519,13 @@ interactions: Connection: - keep-alive User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1MjE4NTk2NTYzOTI4OHxCQ0Q0NkIwQTNGOEM0RTk5QTc1NTg3MjUxMkREOTg3OA?api-version=2019-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1NzQ5MjUyNDU4Njg2OXxFNkQ4Qzk5OTUyQjk0OTVFQTlCMDE2NzE0OENEOEY0OA?api-version=2019-09-01 response: body: - string: '{"createdDateTime":"2020-09-09 03:23:15Z","lastActionDateTime":"2020-09-09 - 03:23:34Z","status":"Succeeded"}' + string: '{"createdDateTime":"2020-09-15 06:47:31Z","lastActionDateTime":"2020-09-15 + 06:47:40Z","status":"Succeeded"}' headers: cache-control: - no-cache @@ -626,7 +534,7 @@ interactions: content-type: - application/json; charset=utf-8 date: - - Wed, 09 Sep 2020 03:23:36 GMT + - Tue, 15 Sep 2020 06:47:42 GMT expires: - '-1' pragma: @@ -644,7 +552,7 @@ interactions: x-content-type-options: - nosniff x-ms-keyvault-service-version: - - 1.1.31.0 + - 1.1.55.0 x-powered-by: - ASP.NET status: diff --git a/sdk/keyvault/azure-mgmt-keyvault/tests/recordings/test_cli_mgmt_keyvault_async.test_keyvault.yaml b/sdk/keyvault/azure-mgmt-keyvault/tests/recordings/test_cli_mgmt_keyvault_async.test_keyvault.yaml index 722b8b70ee5d..bca752877685 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/tests/recordings/test_cli_mgmt_keyvault_async.test_keyvault.yaml +++ b/sdk/keyvault/azure-mgmt-keyvault/tests/recordings/test_cli_mgmt_keyvault_async.test_keyvault.yaml @@ -18,7 +18,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 response: @@ -28,7 +28,7 @@ interactions: cache-control: no-cache content-encoding: gzip content-type: application/json; charset=utf-8 - date: Wed, 09 Sep 2020 03:23:54 GMT + date: Tue, 15 Sep 2020 06:48:00 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 @@ -37,18 +37,18 @@ interactions: vary: Accept-Encoding x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.1.31.0 - x-ms-ratelimit-remaining-subscription-writes: '1198' + x-ms-keyvault-service-version: 1.1.55.0 + x-ms-ratelimit-remaining-subscription-writes: '1199' x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/6mglktq2lpe27ihaclbw3hhuek72gvh426gmu2gzjke2etygh26upentdb476hz2jiz7ot35ecb/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 + url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/lqr3l54nbmoy5alzsabk2vy2icyijhd2es6kqkk6zvqxq2tpdxk2pxqf2fghwmrpj46oquqtx7j/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 - request: body: null headers: User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 response: @@ -58,7 +58,7 @@ interactions: cache-control: no-cache content-encoding: gzip content-type: application/json; charset=utf-8 - date: Wed, 09 Sep 2020 03:24:30 GMT + date: Tue, 15 Sep 2020 06:48:33 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 @@ -67,12 +67,12 @@ interactions: vary: Accept-Encoding x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.1.31.0 + x-ms-keyvault-service-version: 1.1.55.0 x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/6mglktq2lpe27ihaclbw3hhuek72gvh426gmu2gzjke2etygh26upentdb476hz2jiz7ot35ecb/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 + url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/lqr3l54nbmoy5alzsabk2vy2icyijhd2es6kqkk6zvqxq2tpdxk2pxqf2fghwmrpj46oquqtx7j/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 - request: body: 'b''{"properties": {"accessPolicies": [{"tenantId": "00000000-0000-0000-0000-000000000000", "objectId": "00000000-0000-0000-0000-000000000000", "permissions": {"keys": @@ -85,7 +85,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: PUT uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz/accessPolicies/add?api-version=2019-09-01 response: @@ -95,7 +95,7 @@ interactions: cache-control: no-cache content-encoding: gzip content-type: application/json; charset=utf-8 - date: Wed, 09 Sep 2020 03:24:31 GMT + date: Tue, 15 Sep 2020 06:48:34 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 @@ -104,20 +104,20 @@ interactions: vary: Accept-Encoding x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.1.31.0 - x-ms-ratelimit-remaining-subscription-writes: '1197' + x-ms-keyvault-service-version: 1.1.55.0 + x-ms-ratelimit-remaining-subscription-writes: '1199' x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/6mglktq2lpe27ihaclbw3hhuek72gvh426gmu2gzjke2etygh26upentdb476hz2jiz7ot35ecb/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz/accessPolicies/add?api-version=2019-09-01 + url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/lqr3l54nbmoy5alzsabk2vy2icyijhd2es6kqkk6zvqxq2tpdxk2pxqf2fghwmrpj46oquqtx7j/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz/accessPolicies/add?api-version=2019-09-01 - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 response: @@ -127,7 +127,7 @@ interactions: cache-control: no-cache content-encoding: gzip content-type: application/json; charset=utf-8 - date: Wed, 09 Sep 2020 03:24:31 GMT + date: Tue, 15 Sep 2020 06:48:34 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 @@ -136,19 +136,19 @@ interactions: vary: Accept-Encoding x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.1.31.0 + x-ms-keyvault-service-version: 1.1.55.0 x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/6mglktq2lpe27ihaclbw3hhuek72gvh426gmu2gzjke2etygh26upentdb476hz2jiz7ot35ecb/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 + url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/lqr3l54nbmoy5alzsabk2vy2icyijhd2es6kqkk6zvqxq2tpdxk2pxqf2fghwmrpj46oquqtx7j/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01 response: @@ -158,7 +158,7 @@ interactions: cache-control: no-cache content-encoding: gzip content-type: application/json; charset=utf-8 - date: Wed, 09 Sep 2020 03:24:32 GMT + date: Tue, 15 Sep 2020 06:48:35 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 @@ -167,19 +167,19 @@ interactions: vary: Accept-Encoding x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.1.31.0 + x-ms-keyvault-service-version: 1.1.55.0 x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/6mglktq2lpe27ihaclbw3hhuek72gvh426gmu2gzjke2etygh26upentdb476hz2jiz7ot35ecb/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01 + url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/lqr3l54nbmoy5alzsabk2vy2icyijhd2es6kqkk6zvqxq2tpdxk2pxqf2fghwmrpj46oquqtx7j/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01 - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Tm9uZSxiWGxXWVd4MFdtbHJabWxyZUhsNmVnPT0= response: @@ -189,7 +189,7 @@ interactions: cache-control: no-cache content-encoding: gzip content-type: application/json; charset=utf-8 - date: Wed, 09 Sep 2020 03:24:32 GMT + date: Tue, 15 Sep 2020 06:48:36 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 @@ -198,36 +198,36 @@ interactions: vary: Accept-Encoding x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.1.31.0 + x-ms-keyvault-service-version: 1.1.55.0 x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/6mglktq2lpe27ihaclbw3hhuek72gvh426gmu2gzjke2etygh26upentdb476hz2jiz7ot35ecb/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Tm9uZSxiWGxXWVd4MFdtbHJabWxyZUhsNmVnPT0= + url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/lqr3l54nbmoy5alzsabk2vy2icyijhd2es6kqkk6zvqxq2tpdxk2pxqf2fghwmrpj46oquqtx7j/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ServiceBased,Tm9uZSxiWGxXWVd4MFdtbHJabWxyZUhsNmVnPT0= - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/mykeyvaultaxcydzc","name":"mykeyvaultaxcydzc","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/3uansqi7mpfvbay3womiao2ujazdjzw4cfi7jplhqeovoof2pwifcvcpp3dxu53m7otrkjsnjtu/providers/Microsoft.KeyVault/vaults/mykeyvaultaxcydzc","location":"eastus","tags":{},"deletionDate":"2020-09-08T10:00:45Z","scheduledPurgeDate":"2020-12-07T10:00:45Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/mykeyvaultaxcyd","name":"mykeyvaultaxcyd","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/2nc6wkutozzcub47gofzc6k674s2vbqa4z5re5dac5nv7kjlmiw5bftvxca5z52o5bf2ldl6ffn/providers/Microsoft.KeyVault/vaults/mykeyvaultaxcyd","location":"eastus","tags":{},"deletionDate":"2020-09-08T09:57:05Z","scheduledPurgeDate":"2020-12-07T09:57:05Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/mykeyvaultxyzxxxyyc","name":"mykeyvaultxyzxxxyyc","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pin6touna3sz2jjgifix4pji7v4six2pyckw26hkmvqtf5ou6bn2rkfd4u2q52j4hvvkbquca2y/providers/Microsoft.KeyVault/vaults/mykeyvaultxyzxxxyyc","location":"eastus","tags":{},"deletionDate":"2020-09-08T09:53:00Z","scheduledPurgeDate":"2020-12-07T09:53:00Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/mykeyvaultxyzxx","name":"mykeyvaultxyzxx","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/d56kr4henyuz22h6bijul4pogfrdxqqkxa227xcdixdlbfe6o2pkdsc6kdfbceqanvtcgm3mr77/providers/Microsoft.KeyVault/vaults/mykeyvaultxyzxx","location":"eastus","tags":{},"deletionDate":"2020-09-08T09:46:17Z","scheduledPurgeDate":"2020-12-07T09:46:17Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/test-changlong","name":"test-changlong","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test-changlong/providers/Microsoft.KeyVault/vaults/test-changlong","location":"eastus","tags":{},"deletionDate":"2020-06-12T07:38:10Z","scheduledPurgeDate":"2020-09-10T07:38:10Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/myVaultSsss","name":"myVaultSsss","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_keyvault_test_keyvault14930f02/providers/Microsoft.KeyVault/vaults/myVaultSsss","location":"westus","tags":{},"deletionDate":"2020-09-03T03:15:06Z","scheduledPurgeDate":"2020-12-02T03:15:06Z"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3VBfa4MwHPwuMvY0q7G6aqEMV%2bNot1%2fENLHs0Wp0NlaLsf8s%2fe6TfYzBPdwdxx3cXWvEtf%2bqGqm0%2bV3D%2fobxjTbXfvr%2bqOaGcUibtBQH0fSTdDh1YpK1B0OddirrqmNftY0yPKvwnNwt9Gn2OtNtZNm6h7KZ7maFOcvyXWHZyDh27bnKRacMqLKuVW3RTz7FLUlPdW%2fkoha9yP%2bEekuPlX4ek2P5wjKRp5sj0POTkuNiK0Wz4DLZ0mTNKKchwwnfcC%2f64jUvghUCVl4hAAQDXCLm3yKW3aLg3Y15ggkrLcrjS8x8hwQj35fTWMKV4DAYfQQy%2fCB4pb1oW%2fwPfrjAgB0ylA4M0oa9b8E%2bcYGRENh6SQNpgkkDgumSshoTzsdPViaRSRDxbwcw1h6PXw%3d%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/keyvaultxmmxh32430fb8","name":"keyvaultxmmxh32430fb8","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/tiw5dpa2zy346t6hunfwg5pxiilcmegswmahp2dzrj3i5yoa4plnt4z3pdznd62nv3oodlazsim/providers/Microsoft.KeyVault/vaults/keyvaultxmmxh32430fb8","location":"eastus","tags":{},"deletionDate":"2020-09-11T09:56:44Z","scheduledPurgeDate":"2020-12-10T09:56:44Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/keyvaultxmmxe32430fb8","name":"keyvaultxmmxe32430fb8","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/s3oeoyzo5cyz6jyc52podrokehtipesmzodutcs43flkpcmlk63yaauo7vhtygxcillueectyh2/providers/Microsoft.KeyVault/vaults/keyvaultxmmxe32430fb8","location":"eastus","tags":{},"deletionDate":"2020-09-11T09:04:43Z","scheduledPurgeDate":"2020-12-10T09:04:43Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/keyvaultxmmxd32430fb8","name":"keyvaultxmmxd32430fb8","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/b44f24gov2kllu6csktjkxu5gkzlgwtlbnahtixhbnocyi3tgjgnvglijf57gz5bs4pl7xfppbo/providers/Microsoft.KeyVault/vaults/keyvaultxmmxd32430fb8","location":"eastus","tags":{},"deletionDate":"2020-09-11T08:37:59Z","scheduledPurgeDate":"2020-12-10T08:37:59Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/keyvaultxmmxc32430fb8","name":"keyvaultxmmxc32430fb8","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/h5sszcwmen4kbqttweo7dc5ytq2ix347xwel3bcmng5fsnngvzxv67nhz3kwyua56auwuygjg4t/providers/Microsoft.KeyVault/vaults/keyvaultxmmxc32430fb8","location":"eastus","tags":{},"deletionDate":"2020-09-11T08:34:01Z","scheduledPurgeDate":"2020-12-10T08:34:01Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/keyvaultxmmxb32430fb8","name":"keyvaultxmmxb32430fb8","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/nnhlotnhcbqybovxcywdow67psoobvz6vyuqdndscxmwjrrayeqtdzfvvgprtp6c2pwqdl5p2gd/providers/Microsoft.KeyVault/vaults/keyvaultxmmxb32430fb8","location":"eastus","tags":{},"deletionDate":"2020-09-11T08:24:55Z","scheduledPurgeDate":"2020-12-10T08:24:55Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/westus/deletedVaults/myVaultSsss","name":"myVaultSsss","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_keyvault_test_keyvault14930f02/providers/Microsoft.KeyVault/vaults/myVaultSsss","location":"westus","tags":{},"deletionDate":"2020-09-03T03:15:06Z","scheduledPurgeDate":"2020-12-02T03:15:06Z"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=3ZBfb4IwAMS%2fS7PsaUhBmGBiFmer0dkaaovxEaE4LAKh9c8wfveRfYwl93LJ5S73e4BK3s26qJQG4wfA0y0XWzAG38Y0emzb56RKjvIsKzNIuksrB2l9tvXloNO2aExRV9oO3Tz0syC3hun7yPIc17NCJx1ZQZrDUZodctdz7Katr0UmW22TIm1rXedm8CV%2f4uRSGjuTpTQy%2bzP6I2kK69on%2b%2fKJC53Qgr2c1xet%2bsVayWoiVLxj8YozweYcx2Irws1alCJHS4fw442cIm%2bD8I0i5VO%2bdCmfB0zs7wRhyHC8iLrVgmI8JBj7pPvETEQORdGdCQxJtwdvYIf%2fBYcO%2b7Q79h%2bVR05Tl5zigHA6J3w1Y0hBAhmimM0YLzEVwqdoCamK0Ubs%2fZ4NeD5%2fAQ%3d%3d"}' headers: cache-control: no-cache content-encoding: gzip - content-length: '1504' + content-length: '1524' content-type: application/json; charset=utf-8 - date: Wed, 09 Sep 2020 03:24:39 GMT + date: Tue, 15 Sep 2020 06:48:38 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: bd91f0ae-ff7e-4a2f-8ffb-3ff888013b91 + x-ms-original-request-ids: fbd18df4-54d2-4854-a7cc-2e8a9f240182 status: code: 200 message: OK @@ -238,9 +238,65 @@ interactions: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZBfb4IwAMS/S7PsaUhBmGBiFmer0dkaaovxEaE4LAKh9c8wfveRfYwl93LJ5S73e4BK3s26qJQG4wfA0y0XWzAG38Y0emzb56RKjvIsKzNIuksrB2l9tvXloNO2aExRV9oO3Tz0syC3hun7yPIc17NCJx1ZQZrDUZodctdz7Katr0UmW22TIm1rXedm8CV/4uRSGjuTpTQy%2BzP6I2kK69on%2B/KJC53Qgr2c1xet%2BsVayWoiVLxj8YozweYcx2Irws1alCJHS4fw442cIm%2BD8I0i5VO%2BdCmfB0zs7wRhyHC8iLrVgmI8JBj7pPvETEQORdGdCQxJtwdvYIf/BYcO%2B7Q79h%2BVR05Tl5zigHA6J3w1Y0hBAhmimM0YLzEVwqdoCamK0Ubs/Z4NeD5/AQ%3D%3D + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/keyvaultxmmxa32430fb8","name":"keyvaultxmmxa32430fb8","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/djikdyzsgcthkgb45hmtbsgibzznxvojr4ez4mgeeq4iwcvcbh3wmpdulra3e3z2dzgel6ktpdk/providers/Microsoft.KeyVault/vaults/keyvaultxmmxa32430fb8","location":"eastus","tags":{},"deletionDate":"2020-09-11T08:14:14Z","scheduledPurgeDate":"2020-12-10T08:14:14Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/keyvaultxmmx32430fb8","name":"keyvaultxmmx32430fb8","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/yzo3obfcbfvfwutf2l7jzz6hkjzhlvlr2im7qehbdzlqajzc6gvg6mrzk2kqe73kalwtswfwpn2/providers/Microsoft.KeyVault/vaults/keyvaultxmmx32430fb8","location":"eastus","tags":{},"deletionDate":"2020-09-11T08:08:03Z","scheduledPurgeDate":"2020-12-10T08:08:03Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/keyvaultxmmy32430fb8","name":"keyvaultxmmy32430fb8","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qb27bs5kbv2nrz4pmzqrr2tonpm7ygto2xyn3kcuu47skezjsomtaxe45qta64tro2daruufy2g/providers/Microsoft.KeyVault/vaults/keyvaultxmmy32430fb8","location":"eastus","tags":{},"deletionDate":"2020-09-10T09:03:59Z","scheduledPurgeDate":"2020-12-09T09:03:59Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/keyvaultxmm32430fb8","name":"keyvaultxmm32430fb8","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ssxziydvsxidgmwlltanpnuwxncqoz4f32xdrocd6wqpxlxkeeucl4dtebeyghgvalafavcw2it/providers/Microsoft.KeyVault/vaults/keyvaultxmm32430fb8","location":"eastus","tags":{},"deletionDate":"2020-09-10T08:57:22Z","scheduledPurgeDate":"2020-12-09T08:57:22Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/mykeyvaultaxcydzc","name":"mykeyvaultaxcydzc","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/3uansqi7mpfvbay3womiao2ujazdjzw4cfi7jplhqeovoof2pwifcvcpp3dxu53m7otrkjsnjtu/providers/Microsoft.KeyVault/vaults/mykeyvaultaxcydzc","location":"eastus","tags":{},"deletionDate":"2020-09-08T10:00:45Z","scheduledPurgeDate":"2020-12-07T10:00:45Z"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1da4MwAEX%2fi4y9aRKnswplKOnGtsaiJo4%2b2hidVaOY2E%2f63yeD%2b3APXM69G1Jc9LaRrTKCu7EJM8oyIzB%2btR5VAEBfyKIWvZDaKm7zJCw%2b9EDNB8WnZtTNIBXw7cp3y1VlvvBXz3SQ7Zg%2b4p654hX0eHmobAeBcRpOTSkmBUjDp0ENlba%2bxTUv5k6DUnRCi%2fIf1FsxNuZpWS7ytQ2Rb8Il6PlJtcvj0Aq5Zm3%2bk%2bZfNGXpO93kLGP%2bbss6VuFPRGh9JkcOCWUoxuxCcAjjW7lKYGInMMY7GroE10vbu4R2H8kxxYTGUcr25xRHUcKY8Xj8AQ%3d%3d"}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '1394' + content-type: application/json; charset=utf-8 + date: Tue, 15 Sep 2020 06:48:38 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000; includeSubDomains + vary: Accept-Encoding + x-content-type-options: nosniff + x-ms-original-request-ids: d83be350-b3c1-4d1e-a214-2d872a59ebbb + status: + code: 200 + message: OK + url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3ZBfb4IwAMS/S7PsaUhBmGBiFmer0dkaaovxEaE4LAKh9c8wfveRfYwl93LJ5S73e4BK3s26qJQG4wfA0y0XWzAG38Y0emzb56RKjvIsKzNIuksrB2l9tvXloNO2aExRV9oO3Tz0syC3hun7yPIc17NCJx1ZQZrDUZodctdz7Katr0UmW22TIm1rXedm8CV/4uRSGjuTpTQy%2BzP6I2kK69on%2B/KJC53Qgr2c1xet%2BsVayWoiVLxj8YozweYcx2Irws1alCJHS4fw442cIm%2BD8I0i5VO%2BdCmfB0zs7wRhyHC8iLrVgmI8JBj7pPvETEQORdGdCQxJtwdvYIf/BYcO%2B7Q79h%2BVR05Tl5zigHA6J3w1Y0hBAhmimM0YLzEVwqdoCamK0Ubs/Z4NeD5/AQ%3D%3D +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/i4y9aRKnswplKOnGtsaiJo4%2B2hidVaOY2E/63yeD%2B3APXM69G1Jc9LaRrTKCu7EJM8oyIzB%2BtR5VAEBfyKIWvZDaKm7zJCw%2B9EDNB8WnZtTNIBXw7cp3y1VlvvBXz3SQ7Zg%2B4p654hX0eHmobAeBcRpOTSkmBUjDp0ENlba%2BxTUv5k6DUnRCi/If1FsxNuZpWS7ytQ2Rb8Il6PlJtcvj0Aq5Zm3%2Bk%2BZfNGXpO93kLGP%2Bbss6VuFPRGh9JkcOCWUoxuxCcAjjW7lKYGInMMY7GroE10vbu4R2H8kxxYTGUcr25xRHUcKY8Xj8AQ%3D%3D + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/mykeyvaultaxcyd","name":"mykeyvaultaxcyd","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/2nc6wkutozzcub47gofzc6k674s2vbqa4z5re5dac5nv7kjlmiw5bftvxca5z52o5bf2ldl6ffn/providers/Microsoft.KeyVault/vaults/mykeyvaultaxcyd","location":"eastus","tags":{},"deletionDate":"2020-09-08T09:57:05Z","scheduledPurgeDate":"2020-12-07T09:57:05Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/mykeyvaultxyzxxxyyc","name":"mykeyvaultxyzxxxyyc","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/pin6touna3sz2jjgifix4pji7v4six2pyckw26hkmvqtf5ou6bn2rkfd4u2q52j4hvvkbquca2y/providers/Microsoft.KeyVault/vaults/mykeyvaultxyzxxxyyc","location":"eastus","tags":{},"deletionDate":"2020-09-08T09:53:00Z","scheduledPurgeDate":"2020-12-07T09:53:00Z"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/mykeyvaultxyzxx","name":"mykeyvaultxyzxx","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/d56kr4henyuz22h6bijul4pogfrdxqqkxa227xcdixdlbfe6o2pkdsc6kdfbceqanvtcgm3mr77/providers/Microsoft.KeyVault/vaults/mykeyvaultxyzxx","location":"eastus","tags":{},"deletionDate":"2020-09-08T09:46:17Z","scheduledPurgeDate":"2020-12-07T09:46:17Z"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&%24skiptoken=HY1ba4MwAIX%2fi4y9aaK18wJlbFPBrVGMxrG92Ri7eMfEtrb0v1cG5zx8cPjOTenZRe553wjFvSn%2bW5qRVHGVPylH4QLQFX1xZB3rpVZc54lpdOiAmA%2bCTnyUfOgFcIzK2ZZ2pW7oi6WaumGqjk4t1aYVtGh5qAxTB%2bM0nHjJJgEQp9MghkpqX2zJi7mVoGQtk6z8B%2fFajFw9rctVvjOg7qhwjf78JJr1cWhYvyNN%2fo3zzwwTHGR%2bTlLixHvSksoLdZQdz6imENXJguofGGXUiOpfOyaBt9aPCIG4QZvIR2fcBH6cvX8kV7IkMLxgL9xGfqjc7w8%3d"}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '1147' + content-type: application/json; charset=utf-8 + date: Tue, 15 Sep 2020 06:48:39 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000; includeSubDomains + vary: Accept-Encoding + x-content-type-options: nosniff + x-ms-original-request-ids: 65b66365-e664-4c4b-a61b-a09869ef10a3 + status: + code: 200 + message: OK + url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1da4MwAEX/i4y9aRKnswplKOnGtsaiJo4%2B2hidVaOY2E/63yeD%2B3APXM69G1Jc9LaRrTKCu7EJM8oyIzB%2BtR5VAEBfyKIWvZDaKm7zJCw%2B9EDNB8WnZtTNIBXw7cp3y1VlvvBXz3SQ7Zg%2B4p654hX0eHmobAeBcRpOTSkmBUjDp0ENlba%2BxTUv5k6DUnRCi/If1FsxNuZpWS7ytQ2Rb8Il6PlJtcvj0Aq5Zm3%2Bk%2BZfNGXpO93kLGP%2Bbss6VuFPRGh9JkcOCWUoxuxCcAjjW7lKYGInMMY7GroE10vbu4R2H8kxxYTGUcr25xRHUcKY8Xj8AQ%3D%3D +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3VBfa4MwHPwuMvY0q7G6aqEMV%2BNot1/ENLHs0Wp0NlaLsf8s/e6TfYzBPdwdxx3cXWvEtf%2BqGqm0%2BV3D/obxjTbXfvr%2BqOaGcUibtBQH0fSTdDh1YpK1B0OddirrqmNftY0yPKvwnNwt9Gn2OtNtZNm6h7KZ7maFOcvyXWHZyDh27bnKRacMqLKuVW3RTz7FLUlPdW/koha9yP%2BEekuPlX4ek2P5wjKRp5sj0POTkuNiK0Wz4DLZ0mTNKKchwwnfcC/64jUvghUCVl4hAAQDXCLm3yKW3aLg3Y15ggkrLcrjS8x8hwQj35fTWMKV4DAYfQQy/CB4pb1oW/wPfrjAgB0ylA4M0oa9b8E%2BcYGRENh6SQNpgkkDgumSshoTzsdPViaRSRDxbwcw1h6PXw%3D%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAIX/i4y9aaK18wJlbFPBrVGMxrG92Ri7eMfEtrb0v1cG5zx8cPjOTenZRe553wjFvSn%2BW5qRVHGVPylH4QLQFX1xZB3rpVZc54lpdOiAmA%2BCTnyUfOgFcIzK2ZZ2pW7oi6WaumGqjk4t1aYVtGh5qAxTB%2BM0nHjJJgEQp9MghkpqX2zJi7mVoGQtk6z8B/FajFw9rctVvjOg7qhwjf78JJr1cWhYvyNN/o3zzwwTHGR%2BTlLixHvSksoLdZQdz6imENXJguofGGXUiOpfOyaBt9aPCIG4QZvIR2fcBH6cvX8kV7IkMLxgL9xGfqjc7w8%3D response: body: string: '{"value":[]}' @@ -249,41 +305,41 @@ interactions: content-encoding: gzip content-length: '133' content-type: application/json; charset=utf-8 - date: Wed, 09 Sep 2020 03:24:40 GMT + date: Tue, 15 Sep 2020 06:48:39 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 58fcc89f-070e-4971-9713-221d3a24854d + x-ms-original-request-ids: 32b921ab-0fdf-436e-9142-9ffc6e1ad93d status: code: 200 message: OK - url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=3VBfa4MwHPwuMvY0q7G6aqEMV%2BNot1/ENLHs0Wp0NlaLsf8s/e6TfYzBPdwdxx3cXWvEtf%2BqGqm0%2BV3D/obxjTbXfvr%2BqOaGcUibtBQH0fSTdDh1YpK1B0OddirrqmNftY0yPKvwnNwt9Gn2OtNtZNm6h7KZ7maFOcvyXWHZyDh27bnKRacMqLKuVW3RTz7FLUlPdW/koha9yP%2BEekuPlX4ek2P5wjKRp5sj0POTkuNiK0Wz4DLZ0mTNKKchwwnfcC/64jUvghUCVl4hAAQDXCLm3yKW3aLg3Y15ggkrLcrjS8x8hwQj35fTWMKV4DAYfQQy/CB4pb1oW/wPfrjAgB0ylA4M0oa9b8E%2BcYGRENh6SQNpgkkDgumSshoTzsdPViaRSRDxbwcw1h6PXw%3D%3D + url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/providers/Microsoft.KeyVault/deletedVaults?api-version=2019-09-01&$skiptoken=HY1ba4MwAIX/i4y9aaK18wJlbFPBrVGMxrG92Ri7eMfEtrb0v1cG5zx8cPjOTenZRe553wjFvSn%2BW5qRVHGVPylH4QLQFX1xZB3rpVZc54lpdOiAmA%2BCTnyUfOgFcIzK2ZZ2pW7oi6WaumGqjk4t1aYVtGh5qAxTB%2BM0nHjJJgEQp9MghkpqX2zJi7mVoGQtk6z8B/FajFw9rctVvjOg7qhwjf78JJr1cWhYvyNN/o3zzwwTHGR%2BTlLixHvSksoLdZQdz6imENXJguofGGXUiOpfOyaBt9aPCIG4QZvIR2fcBH6cvX8kV7IkMLxgL9xGfqjc7w8%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz","name":"myValtZikfikxyzz","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"00000000-0000-0000-0000-000000000000","permissions":{"keys":["encrypt","decrypt","wrapKey","unwrapKey","sign","verify","get","list","create","update","import","delete","backup","restore","recover","purge"],"secrets":["get","list","set","delete","backup","restore","recover","purge"],"certificates":["get","list","delete","create","import","update","managecontacts","getissuers","listissuers","setissuers","deleteissuers","manageissuers","recover","purge"]}}],"enabledForDeployment":true,"enabledForDiskEncryption":true,"enabledForTemplateDeployment":true,"enableSoftDelete":true,"vaultUri":"https://myvaltzikfikxyzz.vault.azure.net/","provisioningState":"Succeeded"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/git2gridtesting/providers/Microsoft.KeyVault/vaults/git2gridkv","name":"git2gridkv","type":"Microsoft.KeyVault/vaults","location":"centralus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"7b5d64cb-f02f-4b19-ab5d-60dca4916c54","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"vaultUri":"https://git2gridkv.vault.azure.net/","provisioningState":"Succeeded"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-sdk-for-node/providers/Microsoft.KeyVault/vaults/node-sdk-kv","name":"node-sdk-kv","type":"Microsoft.KeyVault/vaults","location":"westus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"52bcebf6-9dc1-4a9a-8b3b-6962bb22a6aa","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"vaultUri":"https://node-sdk-kv.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=1ZLRbqMwEEX%2fBVV9KgGTsAmR0KppCNqkuC0QG3gztkkIGBAmCVD135fu%2fsSuNLq6D1czOlfzqVS8717zqpDK%2blNxnoPwGChr5dx1jVxrmiAVOXHBq25GxmvLZ7QWmrymkrZ50%2bV1JTXLyCyTrTJ1Tn8s1QUwFqoF6FJd0UxfUpZmxgJoTVvfcsZbqXk5bWtZZ93swAdErmWn3b5V%2fnzo6sYGj6TJ1duUnJbbhg4sVZ8GPD7IYrpYF7yyA97ecso3RHL2FArrmgT9xTd6EAozYMKPID5DT18YIQZ3iuohdcEZu%2fQe6%2bxOncWIw83FE3c9xOYLRMXAthCSsrnF4a%2feEzA%2bCvCGxqIPBTiwI7gG1Z6kyLknO%2f%2fAHfMYVLs33zgNiQt0gmGMRJMgpwZJQXuInQFdUJEe4z4uzgF0UUy3fhm4J5AgBt8%2fbFt5Ul4cGPrPr%2f9%2b2YlR6p5gA8G%2bnkRw4jWrzGUN2%2b4rKsqCzONvHuz8D5%2fDXDSynXVJ3TJLMesm3yZRacQRkpP%2fAxgZXcmj5Mxwr3vhh%2bmNG%2bFt96s0KvHfHBzp3LOVr6%2ff"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/git2gridtesting/providers/Microsoft.KeyVault/vaults/git2gridkv","name":"git2gridkv","type":"Microsoft.KeyVault/vaults","location":"centralus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"7b5d64cb-f02f-4b19-ab5d-60dca4916c54","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"vaultUri":"https://git2gridkv.vault.azure.net/","provisioningState":"Succeeded"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-sdk-for-node/providers/Microsoft.KeyVault/vaults/node-sdk-kv","name":"node-sdk-kv","type":"Microsoft.KeyVault/vaults","location":"westus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"52bcebf6-9dc1-4a9a-8b3b-6962bb22a6aa","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"vaultUri":"https://node-sdk-kv.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=1ZLpbqMwFIXfBVX9VQImISmVolFpWIYp6QwYG%2fzPGCdh97CEJFXffYjmKSpdXemT7qJzdD6lhl%2bG97wpe%2bnlU7JeQxiF0ot0GgbRvyhKTRt65DVvhgW9jR1fsLZW%2bjHtWZeLIW%2bbXjG0g6Fnzwd5ydYbeQW0lWwAtpGf2UHdsCw9aCugiK495xnvesXPWdf27WFY%2fOJXRMdqUM733v94GFqxBY9U5PJ5npyPbzUVGLI6F3h86Mv5Y1vyZhvy7pwzbtKeZ0%2bwNkYSXmiwNKcEeuEeoxHWOvGBd565pJFuodrIse2J5OaVzK5GtiN5Wh%2bvSeFNPNJdVJCP4GaPuMowt3Q33e3nffEXY9Dw%2bs%2fVjzMa2uSWaMDmlYhgQfYp%2bqnhwsNM1YdsZxYB8K6kzNTUQQmuTyVaHicSsUvmIDeIxZ5W9hpGGaWRYf6G6lZ6kt6sPQxe37%2bp4X49TRCDkmM7jgqTYms1JYiBtCYucc0ysMQ4G9ZTzbrh%2f4Kx9V3jVQaArImV6LT23NQhOdIC9c6sEkm68wie43Fn3xYJLMzEb4KeoBOlThDznblHtgVgLN7SCFhhccqxc4kxOmGmBQ5sROGrqiF9ff0D"}' headers: cache-control: no-cache content-encoding: gzip - content-length: '1759' + content-length: '1519' content-type: application/json; charset=utf-8 - date: Wed, 09 Sep 2020 03:24:40 GMT + date: Tue, 15 Sep 2020 06:48:40 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 567fd87a-70de-49d0-89b1-a5ee75f47766 + x-ms-original-request-ids: e1713c90-e0e5-47bc-a714-d4f8ae02400b status: code: 200 message: OK @@ -294,37 +350,65 @@ interactions: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZLRbqMwEEX/BVV9KgGTsAmR0KppCNqkuC0QG3gztkkIGBAmCVD135fu/sSuNLq6D1czOlfzqVS8717zqpDK%2BlNxnoPwGChr5dx1jVxrmiAVOXHBq25GxmvLZ7QWmrymkrZ50%2BV1JTXLyCyTrTJ1Tn8s1QUwFqoF6FJd0UxfUpZmxgJoTVvfcsZbqXk5bWtZZ93swAdErmWn3b5V/nzo6sYGj6TJ1duUnJbbhg4sVZ8GPD7IYrpYF7yyA97ecso3RHL2FArrmgT9xTd6EAozYMKPID5DT18YIQZ3iuohdcEZu/Qe6%2BxOncWIw83FE3c9xOYLRMXAthCSsrnF4a/eEzA%2BCvCGxqIPBTiwI7gG1Z6kyLknO/AHfMYVLs33zgNiQt0gmGMRJMgpwZJQXuInQFdUJEe4z4uzgF0UUy3fhm4J5AgBt8/bFt5Ul4cGPrPr/9%2B2YlR6p5gA8G%2BnkRw4jWrzGUN2%2B4rKsqCzONvHuz8D5/DXDSynXVJ3TJLMesm3yZRacQRkpP/AxgZXcmj5Mxwr3vhh%2BmNG%2BFt96s0KvHfHBzp3LOVr6/f + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZLpbqMwFIXfBVX9VQImISmVolFpWIYp6QwYG/zPGCdh97CEJFXffYjmKSpdXemT7qJzdD6lhl%2BG97wpe%2BnlU7JeQxiF0ot0GgbRvyhKTRt65DVvhgW9jR1fsLZW%2BjHtWZeLIW%2BbXjG0g6Fnzwd5ydYbeQW0lWwAtpGf2UHdsCw9aCugiK495xnvesXPWdf27WFY/OJXRMdqUM733v94GFqxBY9U5PJ5npyPbzUVGLI6F3h86Mv5Y1vyZhvy7pwzbtKeZ0%2BwNkYSXmiwNKcEeuEeoxHWOvGBd565pJFuodrIse2J5OaVzK5GtiN5Wh%2BvSeFNPNJdVJCP4GaPuMowt3Q33e3nffEXY9Dw%2Bs/VjzMa2uSWaMDmlYhgQfYp%2BqnhwsNM1YdsZxYB8K6kzNTUQQmuTyVaHicSsUvmIDeIxZ5W9hpGGaWRYf6G6lZ6kt6sPQxe37%2Bp4X49TRCDkmM7jgqTYms1JYiBtCYucc0ysMQ4G9ZTzbrh/4Kx9V3jVQaArImV6LT23NQhOdIC9c6sEkm68wie43Fn3xYJLMzEb4KeoBOlThDznblHtgVgLN7SCFhhccqxc4kxOmGmBQ5sROGrqiF9ff0D response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qiaozhatest/providers/Microsoft.KeyVault/vaults/testsdkjs","name":"testsdkjs","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"e0f63e9f-e67d-46b9-a50d-c5846cc99ed2","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":false,"vaultUri":"https://testsdkjs.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=FY3daoMwAEbfJZReLcY4VxtBxgZthU3GtHXUu5jENWQmLonSH%2fruc%2fBxrg7nuwEtzv5dauVAegObl2p%2fqEAKTt4PLkWop5p%2bi15oH9DraEXATI%2fc2Dpm5eCl0Q6RqCNPfN3BR7ZKYIyjGBLMErhmXZgw3nZRjNFgzSS5sA4VklnjTOeDN3Gp6fjj0fRP97zwZsjwkg4STrM5x7MoxASG8%2fBy4dT8aJTQWSXsJJl4pU7wh31PxqY6qxI3q2ZTnGm%2fzUtd00KfomOP1ceuzGs9qM%2fr9vd44Dtem4vIG9l%2bFQTc738%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz","name":"myValtZikfikxyzz","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"00000000-0000-0000-0000-000000000000","permissions":{"keys":["encrypt","decrypt","wrapKey","unwrapKey","sign","verify","get","list","create","update","import","delete","backup","restore","recover","purge"],"secrets":["get","list","set","delete","backup","restore","recover","purge"],"certificates":["get","list","delete","create","import","update","managecontacts","getissuers","listissuers","setissuers","deleteissuers","manageissuers","recover","purge"]}}],"enabledForDeployment":true,"enabledForDiskEncryption":true,"enabledForTemplateDeployment":true,"enableSoftDelete":true,"vaultUri":"https://myvaltzikfikxyzz.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=FY3RToMwAEX%2fhRifZFBG3VhCzJYgiLJFYGXwVtoiUChIAXHGf3cmN%2bfp5NwfRbBlfKsEl8ruR3H2UXyOlJ1SjmMvd5rWYoE%2fWMvEuMLXaWAr0rWanHJJhqofq05IzTIKC9Jtoa7J40Y1gWGqFiAbdUsKfUNoXhgm0PqhmyvKBqkFFRk62RXj6pV9Izw1ozb%2fUz7djV1vg3vcV%2bp8M29x29CBpeq3gfs7yW%2bPHWfCjtgwV4QdsGT0IW6tKYuWGukNjGv%2flXF4oW7DMe9BasA5cI9eEGd14vQwTmBEW396F%2bEpMJYpc4jJEvSSe%2bgYiPAzey5R4JjXWPg48Q5Len2B1A29sA4xenaWFJQRduDnuT7UeVzChFOXJWGKWtAgp58yTvXcRWnSlhytP76yM1moi87xpTmFDlgnLfCPe9tWfn%2f%2fAA%3d%3d"}' headers: cache-control: no-cache content-encoding: gzip - content-length: '1128' + content-length: '1328' content-type: application/json; charset=utf-8 - date: Wed, 09 Sep 2020 03:24:41 GMT + date: Tue, 15 Sep 2020 06:48:40 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: f3832d77-ce2a-407a-915c-0b62bb256cbb + x-ms-original-request-ids: 3c0bf0c0-0fbb-4193-a30e-e1ec2bab398a status: code: 200 message: OK - url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZLRbqMwEEX/BVV9KgGTsAmR0KppCNqkuC0QG3gztkkIGBAmCVD135fu/sSuNLq6D1czOlfzqVS8717zqpDK%2BlNxnoPwGChr5dx1jVxrmiAVOXHBq25GxmvLZ7QWmrymkrZ50%2BV1JTXLyCyTrTJ1Tn8s1QUwFqoF6FJd0UxfUpZmxgJoTVvfcsZbqXk5bWtZZ93swAdErmWn3b5V/nzo6sYGj6TJ1duUnJbbhg4sVZ8GPD7IYrpYF7yyA97ecso3RHL2FArrmgT9xTd6EAozYMKPID5DT18YIQZ3iuohdcEZu/Qe6%2BxOncWIw83FE3c9xOYLRMXAthCSsrnF4a/eEzA%2BCvCGxqIPBTiwI7gG1Z6kyLknO//AHfMYVLs33zgNiQt0gmGMRJMgpwZJQXuInQFdUJEe4z4uzgF0UUy3fhm4J5AgBt8/bFt5Ul4cGPrPr/9%2B2YlR6p5gA8G%2BnkRw4jWrzGUN2%2B4rKsqCzONvHuz8D5/DXDSynXVJ3TJLMesm3yZRacQRkpP/AxgZXcmj5Mxwr3vhh%2BmNG%2BFt96s0KvHfHBzp3LOVr6/f + url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZLpbqMwFIXfBVX9VQImISmVolFpWIYp6QwYG/zPGCdh97CEJFXffYjmKSpdXemT7qJzdD6lhl%2BG97wpe%2BnlU7JeQxiF0ot0GgbRvyhKTRt65DVvhgW9jR1fsLZW%2BjHtWZeLIW%2BbXjG0g6Fnzwd5ydYbeQW0lWwAtpGf2UHdsCw9aCugiK495xnvesXPWdf27WFY/OJXRMdqUM733v94GFqxBY9U5PJ5npyPbzUVGLI6F3h86Mv5Y1vyZhvy7pwzbtKeZ0%2BwNkYSXmiwNKcEeuEeoxHWOvGBd565pJFuodrIse2J5OaVzK5GtiN5Wh%2BvSeFNPNJdVJCP4GaPuMowt3Q33e3nffEXY9Dw%2Bs/VjzMa2uSWaMDmlYhgQfYp%2BqnhwsNM1YdsZxYB8K6kzNTUQQmuTyVaHicSsUvmIDeIxZ5W9hpGGaWRYf6G6lZ6kt6sPQxe37%2Bp4X49TRCDkmM7jgqTYms1JYiBtCYucc0ysMQ4G9ZTzbrh/4Kx9V3jVQaArImV6LT23NQhOdIC9c6sEkm68wie43Fn3xYJLMzEb4KeoBOlThDznblHtgVgLN7SCFhhccqxc4kxOmGmBQ5sROGrqiF9ff0D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3daoMwAEbfJZReLcY4VxtBxgZthU3GtHXUu5jENWQmLonSH/ruc/Bxrg7nuwEtzv5dauVAegObl2p/qEAKTt4PLkWop5p%2Bi15oH9DraEXATI/c2Dpm5eCl0Q6RqCNPfN3BR7ZKYIyjGBLMErhmXZgw3nZRjNFgzSS5sA4VklnjTOeDN3Gp6fjj0fRP97zwZsjwkg4STrM5x7MoxASG8/By4dT8aJTQWSXsJJl4pU7wh31PxqY6qxI3q2ZTnGm/zUtd00KfomOP1ceuzGs9qM/r9vd44Dtem4vIG9l%2BFQTc738%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3RToMwAEX/hRifZFBG3VhCzJYgiLJFYGXwVtoiUChIAXHGf3cmN%2Bfp5NwfRbBlfKsEl8ruR3H2UXyOlJ1SjmMvd5rWYoE/WMvEuMLXaWAr0rWanHJJhqofq05IzTIKC9Jtoa7J40Y1gWGqFiAbdUsKfUNoXhgm0PqhmyvKBqkFFRk62RXj6pV9Izw1ozb/Uz7djV1vg3vcV%2Bp8M29x29CBpeq3gfs7yW%2BPHWfCjtgwV4QdsGT0IW6tKYuWGukNjGv/lXF4oW7DMe9BasA5cI9eEGd14vQwTmBEW396F%2BEpMJYpc4jJEvSSe%2BgYiPAzey5R4JjXWPg48Q5Len2B1A29sA4xenaWFJQRduDnuT7UeVzChFOXJWGKWtAgp58yTvXcRWnSlhytP76yM1moi87xpTmFDlgnLfCPe9tWfn/AA%3D%3D + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qiaozhatest/providers/Microsoft.KeyVault/vaults/testsdkjs","name":"testsdkjs","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"e0f63e9f-e67d-46b9-a50d-c5846cc99ed2","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":false,"vaultUri":"https://testsdkjs.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=FY3tboIwAEXfhZj9GkLBL0zIovFjuoEZIFX%2blVIEoaXSwkTju48lNze5ycm5T4WRu%2fzOWSGU%2bVNZL%2fzg6CtzJZOSi7mmUcTQhVDC5BA9mpoMcUU10cQC1zmXecWEZhmpNU5mqWriyVQdAWOkWgBP1RlO9SlO4tQYAY3XVZsnpBaak%2bO6ElUqh1%2bkC1FTSq39b%2fExkBW3wRviudr2ZC%2b3DR1Yqt4HvA1E0T9WBWG2T%2bo2x2SJBEneA2o1kX8v4efSCILdGIVcBrREcclltHKhs%2bE3n7kHhy2MCHIUG%2bsOr6LMMy%2fducj2BG5Ozsq9hiBqIQS%2bS%2fc7j2ZZzJa3gILCKfkEMu%2fa7y6AQCcbfjybPHOK6NH7fUJ%2fOnh1r97DG0dFosfb8AxpVoTm5Tc64nuyDdfBqTx4a2BCCvbuwraV1%2bsP"}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '1262' + content-type: application/json; charset=utf-8 + date: Tue, 15 Sep 2020 06:48:40 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000; includeSubDomains + vary: Accept-Encoding + x-content-type-options: nosniff + x-ms-original-request-ids: 6682e6f7-2e78-4d67-b5d9-d7d35832721a + status: + code: 200 + message: OK + url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3RToMwAEX/hRifZFBG3VhCzJYgiLJFYGXwVtoiUChIAXHGf3cmN%2Bfp5NwfRbBlfKsEl8ruR3H2UXyOlJ1SjmMvd5rWYoE/WMvEuMLXaWAr0rWanHJJhqofq05IzTIKC9Jtoa7J40Y1gWGqFiAbdUsKfUNoXhgm0PqhmyvKBqkFFRk62RXj6pV9Izw1ozb/Uz7djV1vg3vcV%2Bp8M29x29CBpeq3gfs7yW%2BPHWfCjtgwV4QdsGT0IW6tKYuWGukNjGv/lXF4oW7DMe9BasA5cI9eEGd14vQwTmBEW396F%2BEpMJYpc4jJEvSSe%2BgYiPAzey5R4JjXWPg48Q5Len2B1A29sA4xenaWFJQRduDnuT7UeVzChFOXJWGKWtAgp58yTvXcRWnSlhytP76yM1moi87xpTmFDlgnLfCPe9tWfn//AA%3D%3D +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3tboIwAEXfhZj9GkLBL0zIovFjuoEZIFX%2BlVIEoaXSwkTju48lNze5ycm5T4WRu/zOWSGU%2BVNZL/zg6CtzJZOSi7mmUcTQhVDC5BA9mpoMcUU10cQC1zmXecWEZhmpNU5mqWriyVQdAWOkWgBP1RlO9SlO4tQYAY3XVZsnpBaak%2BO6ElUqh1%2BkC1FTSq39b/ExkBW3wRviudr2ZC%2B3DR1Yqt4HvA1E0T9WBWG2T%2Bo2x2SJBEneA2o1kX8v4efSCILdGIVcBrREcclltHKhs%2BE3n7kHhy2MCHIUG%2BsOr6LMMy/ducj2BG5Ozsq9hiBqIQS%2BS/c7j2ZZzJa3gILCKfkEMu/a7y6AQCcbfjybPHOK6NH7fUJ/Onh1r97DG0dFosfb8AxpVoTm5Tc64nuyDdfBqTx4a2BCCvbuwraV1%2BsP response: body: string: '{"value":[]}' @@ -333,41 +417,41 @@ interactions: content-encoding: gzip content-length: '133' content-type: application/json; charset=utf-8 - date: Wed, 09 Sep 2020 03:24:41 GMT + date: Tue, 15 Sep 2020 06:48:41 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: b7e17a6b-28fd-47bf-94bd-2f181ea4fcb6 + x-ms-original-request-ids: 4e64bbd8-ae62-49cc-80bd-a58cb285e46d status: code: 200 message: OK - url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3daoMwAEbfJZReLcY4VxtBxgZthU3GtHXUu5jENWQmLonSH/ruc/Bxrg7nuwEtzv5dauVAegObl2p/qEAKTt4PLkWop5p%2Bi15oH9DraEXATI/c2Dpm5eCl0Q6RqCNPfN3BR7ZKYIyjGBLMErhmXZgw3nZRjNFgzSS5sA4VklnjTOeDN3Gp6fjj0fRP97zwZsjwkg4STrM5x7MoxASG8/By4dT8aJTQWSXsJJl4pU7wh31PxqY6qxI3q2ZTnGm/zUtd00KfomOP1ceuzGs9qM/r9vd44Dtem4vIG9l%2BFQTc738%3D + url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3tboIwAEXfhZj9GkLBL0zIovFjuoEZIFX%2BlVIEoaXSwkTju48lNze5ycm5T4WRu/zOWSGU%2BVNZL/zg6CtzJZOSi7mmUcTQhVDC5BA9mpoMcUU10cQC1zmXecWEZhmpNU5mqWriyVQdAWOkWgBP1RlO9SlO4tQYAY3XVZsnpBaak%2BO6ElUqh1%2BkC1FTSq39b/ExkBW3wRviudr2ZC%2B3DR1Yqt4HvA1E0T9WBWG2T%2Bo2x2SJBEneA2o1kX8v4efSCILdGIVcBrREcclltHKhs%2BE3n7kHhy2MCHIUG%2BsOr6LMMy/ducj2BG5Ozsq9hiBqIQS%2BS/c7j2ZZzJa3gILCKfkEMu/a7y6AQCcbfjybPHOK6NH7fUJ/Onh1r97DG0dFosfb8AxpVoTm5Tc64nuyDdfBqTx4a2BCCvbuwraV1%2BsP - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01 response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz","name":"myValtZikfikxyzz","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"00000000-0000-0000-0000-000000000000","permissions":{"keys":["encrypt","decrypt","wrapKey","unwrapKey","sign","verify","get","list","create","update","import","delete","backup","restore","recover","purge"],"secrets":["get","list","set","delete","backup","restore","recover","purge"],"certificates":["get","list","delete","create","import","update","managecontacts","getissuers","listissuers","setissuers","deleteissuers","manageissuers","recover","purge"]}}],"enabledForDeployment":true,"enabledForDiskEncryption":true,"enabledForTemplateDeployment":true,"enableSoftDelete":true,"vaultUri":"https://myvaltzikfikxyzz.vault.azure.net/","provisioningState":"Succeeded"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/git2gridtesting/providers/Microsoft.KeyVault/vaults/git2gridkv","name":"git2gridkv","type":"Microsoft.KeyVault/vaults","location":"centralus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"7b5d64cb-f02f-4b19-ab5d-60dca4916c54","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"vaultUri":"https://git2gridkv.vault.azure.net/","provisioningState":"Succeeded"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-sdk-for-node/providers/Microsoft.KeyVault/vaults/node-sdk-kv","name":"node-sdk-kv","type":"Microsoft.KeyVault/vaults","location":"westus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"52bcebf6-9dc1-4a9a-8b3b-6962bb22a6aa","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"vaultUri":"https://node-sdk-kv.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=1VLRbqMwEPwXVPWpBGygCZGiU3NHiLgaqQnFhjdjm0KCgWJD0lT996O6n7iTVqt5GM1odvbTaMVVP9ftWRnrTyN4OiavR2NtVFr3am1Zkrb0TUjR6gW9jYNYsE5aaiwUG%2bpe112rLB%2bWvsdXpemwx6XpAuiaPmBLc8VKe8l4UUIXWP3QTTUXg7JQzYZOdaVe%2fBYfKR0bbU3fW%2f24012%2fAfe0r81pZs7iG2gD37TnAfd36jw7dmfRbljYjHF7mDj2KuTEj0j27zlsJCVvNgv7PnYym8HGRe3Wy6B20CnvKASQkYOMsQ9iGY2ojYZcvtg8ia5xEr3HYQW51DUj6SlLIq8MgUdh6nG5A8X%2b4ArSu2JfeQKjjfFg%2fAzi5PD0%2fO%2ff6iiGqWZiS5XgD4n0x%2fx4pUheLgkGZ4F35PW0pThwL1nKQCHzfb7fng9BP2YQKAqDG07s78A4%2bB8%2bg4fpje%2f8UxE2ZYG5nvGQkwZmJFUztnMS2wTqRpC84vhqo%2bTFQ7etRL%2biVUEa%2fJcX35gzt%2fz19Qc%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/git2gridtesting/providers/Microsoft.KeyVault/vaults/git2gridkv","name":"git2gridkv","type":"Microsoft.KeyVault/vaults","location":"centralus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"7b5d64cb-f02f-4b19-ab5d-60dca4916c54","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"vaultUri":"https://git2gridkv.vault.azure.net/","provisioningState":"Succeeded"}},{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/azure-sdk-for-node/providers/Microsoft.KeyVault/vaults/node-sdk-kv","name":"node-sdk-kv","type":"Microsoft.KeyVault/vaults","location":"westus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"52bcebf6-9dc1-4a9a-8b3b-6962bb22a6aa","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"vaultUri":"https://node-sdk-kv.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=1ZLpbqMwFIXfBVX9VQImISmVolFpWIYp6QwYG%2fzPGCdh97CEJFXffYjmKSpdXemT7qJzdD6lhl%2bG97wpe%2bnlU7JeQxiF0ot0GgbRvyhKTRt65DVvhgW9jR1fsLZW%2bjHtWZeLIW%2bbXjG0g6Fnzwd5ydYbeQW0lWwAtpGf2UHdsCw9aCugiK495xnvesXPWdf27WFY%2fOJXRMdqUM733v94GFqxBY9U5PJ5npyPbzUVGLI6F3h86Mv5Y1vyZhvy7pwzbtKeZ0%2bwNkYSXmiwNKcEeuEeoxHWOvGBd565pJFuodrIse2J5OaVzK5GtiN5Wh%2bvSeFNPNJdVJCP4GaPuMowt3Q33e3nffEXY9Dw%2bs%2fVjzMa2uSWaMDmlYhgQfYp%2bqnhwsNM1YdsZxYB8K6kzNTUQQmuTyVaHicSsUvmIDeIxZ5W9hpGGaWRYf6G6lZ6kt6sPQxe37%2bp4X49TRCDkmM7jgqTYms1JYiBtCYucc0ysMQ4G9ZTzbrh%2f4Kx9V3jVQaArImV6LT23NQhOdIC9c6sEkm68wie43Fn3xYJLMzEb4KeoBOlThDznblHtgVgLN7SCFhhccqxc4kxOmGmBQ5sROGrqiF9ff0D"}' headers: cache-control: no-cache content-encoding: gzip - content-length: '1731' + content-length: '1519' content-type: application/json; charset=utf-8 - date: Wed, 09 Sep 2020 03:24:42 GMT + date: Tue, 15 Sep 2020 06:48:41 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 327c31d7-8479-4b67-87e0-e6a75e7ba5ab + x-ms-original-request-ids: c6b12503-4be1-424e-9623-39c1328d7169 status: code: 200 message: OK @@ -378,37 +462,65 @@ interactions: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZLpbqMwFIXfBVX9VQImISmVolFpWIYp6QwYG/zPGCdh97CEJFXffYjmKSpdXemT7qJzdD6lhl%2BG97wpe%2BnlU7JeQxiF0ot0GgbRvyhKTRt65DVvhgW9jR1fsLZW%2BjHtWZeLIW%2BbXjG0g6Fnzwd5ydYbeQW0lWwAtpGf2UHdsCw9aCugiK495xnvesXPWdf27WFY/OJXRMdqUM733v94GFqxBY9U5PJ5npyPbzUVGLI6F3h86Mv5Y1vyZhvy7pwzbtKeZ0%2BwNkYSXmiwNKcEeuEeoxHWOvGBd565pJFuodrIse2J5OaVzK5GtiN5Wh%2BvSeFNPNJdVJCP4GaPuMowt3Q33e3nffEXY9Dw%2Bs/VjzMa2uSWaMDmlYhgQfYp%2BqnhwsNM1YdsZxYB8K6kzNTUQQmuTyVaHicSsUvmIDeIxZ5W9hpGGaWRYf6G6lZ6kt6sPQxe37%2Bp4X49TRCDkmM7jgqTYms1JYiBtCYucc0ysMQ4G9ZTzbrh/4Kx9V3jVQaArImV6LT23NQhOdIC9c6sEkm68wie43Fn3xYJLMzEb4KeoBOlThDznblHtgVgLN7SCFhhccqxc4kxOmGmBQ5sROGrqiF9ff0D + response: + body: + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz","name":"myValtZikfikxyzz","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"00000000-0000-0000-0000-000000000000","permissions":{"keys":["encrypt","decrypt","wrapKey","unwrapKey","sign","verify","get","list","create","update","import","delete","backup","restore","recover","purge"],"secrets":["get","list","set","delete","backup","restore","recover","purge"],"certificates":["get","list","delete","create","import","update","managecontacts","getissuers","listissuers","setissuers","deleteissuers","manageissuers","recover","purge"]}}],"enabledForDeployment":true,"enabledForDiskEncryption":true,"enabledForTemplateDeployment":true,"enableSoftDelete":true,"vaultUri":"https://myvaltzikfikxyzz.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=FY3RToMwAEX%2fhRifZFBG3VhCzJYgiLJFYGXwVtoiUChIAXHGf3cmN%2bfp5NwfRbBlfKsEl8ruR3H2UXyOlJ1SjmMvd5rWYoE%2fWMvEuMLXaWAr0rWanHJJhqofq05IzTIKC9Jtoa7J40Y1gWGqFiAbdUsKfUNoXhgm0PqhmyvKBqkFFRk62RXj6pV9Izw1ozb%2fUz7djV1vg3vcV%2bp8M29x29CBpeq3gfs7yW%2bPHWfCjtgwV4QdsGT0IW6tKYuWGukNjGv%2flXF4oW7DMe9BasA5cI9eEGd14vQwTmBEW396F%2bEpMJYpc4jJEvSSe%2bgYiPAzey5R4JjXWPg48Q5Len2B1A29sA4xenaWFJQRduDnuT7UeVzChFOXJWGKWtAgp58yTvXcRWnSlhytP76yM1moi87xpTmFDlgnLfCPe9tWfn%2f%2fAA%3d%3d"}' + headers: + cache-control: no-cache + content-encoding: gzip + content-length: '1328' + content-type: application/json; charset=utf-8 + date: Tue, 15 Sep 2020 06:48:42 GMT + expires: '-1' + pragma: no-cache + strict-transport-security: max-age=31536000; includeSubDomains + vary: Accept-Encoding + x-content-type-options: nosniff + x-ms-original-request-ids: f51f7acc-94af-4460-8fbd-dca84f9f1bfc + status: + code: 200 + message: OK + url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1ZLpbqMwFIXfBVX9VQImISmVolFpWIYp6QwYG/zPGCdh97CEJFXffYjmKSpdXemT7qJzdD6lhl%2BG97wpe%2BnlU7JeQxiF0ot0GgbRvyhKTRt65DVvhgW9jR1fsLZW%2BjHtWZeLIW%2BbXjG0g6Fnzwd5ydYbeQW0lWwAtpGf2UHdsCw9aCugiK495xnvesXPWdf27WFY/OJXRMdqUM733v94GFqxBY9U5PJ5npyPbzUVGLI6F3h86Mv5Y1vyZhvy7pwzbtKeZ0%2BwNkYSXmiwNKcEeuEeoxHWOvGBd565pJFuodrIse2J5OaVzK5GtiN5Wh%2BvSeFNPNJdVJCP4GaPuMowt3Q33e3nffEXY9Dw%2Bs/VjzMa2uSWaMDmlYhgQfYp%2BqnhwsNM1YdsZxYB8K6kzNTUQQmuTyVaHicSsUvmIDeIxZ5W9hpGGaWRYf6G6lZ6kt6sPQxe37%2Bp4X49TRCDkmM7jgqTYms1JYiBtCYucc0ysMQ4G9ZTzbrh/4Kx9V3jVQaArImV6LT23NQhOdIC9c6sEkm68wie43Fn3xYJLMzEb4KeoBOlThDznblHtgVgLN7SCFhhccqxc4kxOmGmBQ5sROGrqiF9ff0D +- request: + body: null + headers: + Accept: + - application/json + User-Agent: + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1VLRbqMwEPwXVPWpBGygCZGiU3NHiLgaqQnFhjdjm0KCgWJD0lT996O6n7iTVqt5GM1odvbTaMVVP9ftWRnrTyN4OiavR2NtVFr3am1Zkrb0TUjR6gW9jYNYsE5aaiwUG%2Bpe112rLB%2BWvsdXpemwx6XpAuiaPmBLc8VKe8l4UUIXWP3QTTUXg7JQzYZOdaVe/BYfKR0bbU3fW/24012/Afe0r81pZs7iG2gD37TnAfd36jw7dmfRbljYjHF7mDj2KuTEj0j27zlsJCVvNgv7PnYym8HGRe3Wy6B20CnvKASQkYOMsQ9iGY2ojYZcvtg8ia5xEr3HYQW51DUj6SlLIq8MgUdh6nG5A8X%2B4ArSu2JfeQKjjfFg/Azi5PD0/O/f6iiGqWZiS5XgD4n0x/x4pUheLgkGZ4F35PW0pThwL1nKQCHzfb7fng9BP2YQKAqDG07s78A4%2BB8%2Bg4fpje/8UxE2ZYG5nvGQkwZmJFUztnMS2wTqRpC84vhqo%2BTFQ7etRL%2BiVUEa/JcX35gzt/z19Qc%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3RToMwAEX/hRifZFBG3VhCzJYgiLJFYGXwVtoiUChIAXHGf3cmN%2Bfp5NwfRbBlfKsEl8ruR3H2UXyOlJ1SjmMvd5rWYoE/WMvEuMLXaWAr0rWanHJJhqofq05IzTIKC9Jtoa7J40Y1gWGqFiAbdUsKfUNoXhgm0PqhmyvKBqkFFRk62RXj6pV9Izw1ozb/Uz7djV1vg3vcV%2Bp8M29x29CBpeq3gfs7yW%2BPHWfCjtgwV4QdsGT0IW6tKYuWGukNjGv/lXF4oW7DMe9BasA5cI9eEGd14vQwTmBEW396F%2BEpMJYpc4jJEvSSe%2BgYiPAzey5R4JjXWPg48Q5Len2B1A29sA4xenaWFJQRduDnuT7UeVzChFOXJWGKWtAgp58yTvXcRWnSlhytP76yM1moi87xpTmFDlgnLfCPe9tWfn/AA%3D%3D response: body: - string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qiaozhatest/providers/Microsoft.KeyVault/vaults/testsdkjs","name":"testsdkjs","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"e0f63e9f-e67d-46b9-a50d-c5846cc99ed2","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":false,"vaultUri":"https://testsdkjs.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=ZY3LasMwFET%2fRQTvZFmKWz%2fAlBKSLNKs3HrRnaxHqzqWhK5s8sD%2fXnddGGZxGM48kFXX%2bGbsAKh%2boP1r%2b%2f7Rohp9x%2bihJmTkln%2bpUdmY8vsUVCrcSGDqQQTjo3EWSMV09SRLjbfiucA5ZTmuqChwKXRWCNlrllPig5uNVAHI2YjgwOmYntSt49Mlkvmv4WUTnW9owr3B87pc5Q3LaIWzNTTZwLA%2bukHZRh67u9zRH348TJ%2fsOvejLP8z0aBl%2bQU%3d"}' + string: '{"value":[{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/qiaozhatest/providers/Microsoft.KeyVault/vaults/testsdkjs","name":"testsdkjs","type":"Microsoft.KeyVault/vaults","location":"eastus","tags":{},"properties":{"sku":{"family":"A","name":"Standard"},"tenantId":"00000000-0000-0000-0000-000000000000","accessPolicies":[{"tenantId":"00000000-0000-0000-0000-000000000000","objectId":"e0f63e9f-e67d-46b9-a50d-c5846cc99ed2","permissions":{"keys":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore"],"secrets":["Get","List","Set","Delete","Recover","Backup","Restore"],"certificates":["Get","List","Update","Create","Import","Delete","Recover","Backup","Restore","ManageContacts","ManageIssuers","GetIssuers","ListIssuers","SetIssuers","DeleteIssuers"]}}],"enabledForDeployment":false,"enabledForDiskEncryption":false,"enabledForTemplateDeployment":false,"enableSoftDelete":true,"softDeleteRetentionInDays":90,"enableRbacAuthorization":false,"vaultUri":"https://testsdkjs.vault.azure.net/","provisioningState":"Succeeded"}}],"nextLink":"https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?%24top=1&api-version=2019-09-01&%24skiptoken=FY3tboIwAEXfhZj9GkLBL0zIovFjuoEZIFX%2blVIEoaXSwkTju48lNze5ycm5T4WRu%2fzOWSGU%2bVNZL%2fzg6CtzJZOSi7mmUcTQhVDC5BA9mpoMcUU10cQC1zmXecWEZhmpNU5mqWriyVQdAWOkWgBP1RlO9SlO4tQYAY3XVZsnpBaak%2bO6ElUqh1%2bkC1FTSq39b%2fExkBW3wRviudr2ZC%2b3DR1Yqt4HvA1E0T9WBWG2T%2bo2x2SJBEneA2o1kX8v4efSCILdGIVcBrREcclltHKhs%2bE3n7kHhy2MCHIUG%2bsOr6LMMy%2fducj2BG5Ozsq9hiBqIQS%2bS%2fc7j2ZZzJa3gILCKfkEMu%2fa7y6AQCcbfjybPHOK6NH7fUJ%2fOnh1r97DG0dFosfb8AxpVoTm5Tc64nuyDdfBqTx4a2BCCvbuwraV1%2bsP"}' headers: cache-control: no-cache content-encoding: gzip - content-length: '1082' + content-length: '1262' content-type: application/json; charset=utf-8 - date: Wed, 09 Sep 2020 03:24:42 GMT + date: Tue, 15 Sep 2020 06:48:42 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: fba5a2b0-57e4-434a-b7cf-ddc1ccc5bf96 + x-ms-original-request-ids: ab12689e-5b9a-4a43-91e0-1ebecc88bc3f status: code: 200 message: OK - url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=1VLRbqMwEPwXVPWpBGygCZGiU3NHiLgaqQnFhjdjm0KCgWJD0lT996O6n7iTVqt5GM1odvbTaMVVP9ftWRnrTyN4OiavR2NtVFr3am1Zkrb0TUjR6gW9jYNYsE5aaiwUG%2Bpe112rLB%2BWvsdXpemwx6XpAuiaPmBLc8VKe8l4UUIXWP3QTTUXg7JQzYZOdaVe/BYfKR0bbU3fW/24012/Afe0r81pZs7iG2gD37TnAfd36jw7dmfRbljYjHF7mDj2KuTEj0j27zlsJCVvNgv7PnYym8HGRe3Wy6B20CnvKASQkYOMsQ9iGY2ojYZcvtg8ia5xEr3HYQW51DUj6SlLIq8MgUdh6nG5A8X%2B4ArSu2JfeQKjjfFg/Azi5PD0/O/f6iiGqWZiS5XgD4n0x/x4pUheLgkGZ4F35PW0pThwL1nKQCHzfb7fng9BP2YQKAqDG07s78A4%2BB8%2Bg4fpje/8UxE2ZYG5nvGQkwZmJFUztnMS2wTqRpC84vhqo%2BTFQ7etRL%2BiVUEa/JcX35gzt/z19Qc%3D + url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3RToMwAEX/hRifZFBG3VhCzJYgiLJFYGXwVtoiUChIAXHGf3cmN%2Bfp5NwfRbBlfKsEl8ruR3H2UXyOlJ1SjmMvd5rWYoE/WMvEuMLXaWAr0rWanHJJhqofq05IzTIKC9Jtoa7J40Y1gWGqFiAbdUsKfUNoXhgm0PqhmyvKBqkFFRk62RXj6pV9Izw1ozb/Uz7djV1vg3vcV%2Bp8M29x29CBpeq3gfs7yW%2BPHWfCjtgwV4QdsGT0IW6tKYuWGukNjGv/lXF4oW7DMe9BasA5cI9eEGd14vQwTmBEW396F%2BEpMJYpc4jJEvSSe%2BgYiPAzey5R4JjXWPg48Q5Len2B1A29sA4xenaWFJQRduDnuT7UeVzChFOXJWGKWtAgp58yTvXcRWnSlhytP76yM1moi87xpTmFDlgnLfCPe9tWfn//AA%3D%3D - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ZY3LasMwFET/RQTvZFmKWz/AlBKSLNKs3HrRnaxHqzqWhK5s8sD/XnddGGZxGM48kFXX%2BGbsAKh%2BoP1r%2B/7Rohp9x%2BihJmTkln%2BpUdmY8vsUVCrcSGDqQQTjo3EWSMV09SRLjbfiucA5ZTmuqChwKXRWCNlrllPig5uNVAHI2YjgwOmYntSt49Mlkvmv4WUTnW9owr3B87pc5Q3LaIWzNTTZwLA%2BukHZRh67u9zRH348TJ/sOvejLP8z0aBl%2BQU%3D + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3tboIwAEXfhZj9GkLBL0zIovFjuoEZIFX%2BlVIEoaXSwkTju48lNze5ycm5T4WRu/zOWSGU%2BVNZL/zg6CtzJZOSi7mmUcTQhVDC5BA9mpoMcUU10cQC1zmXecWEZhmpNU5mqWriyVQdAWOkWgBP1RlO9SlO4tQYAY3XVZsnpBaak%2BO6ElUqh1%2BkC1FTSq39b/ExkBW3wRviudr2ZC%2B3DR1Yqt4HvA1E0T9WBWG2T%2Bo2x2SJBEneA2o1kX8v4efSCILdGIVcBrREcclltHKhs%2BE3n7kHhy2MCHIUG%2BsOr6LMMy/ducj2BG5Ozsq9hiBqIQS%2BS/c7j2ZZzJa3gILCKfkEMu/a7y6AQCcbfjybPHOK6NH7fUJ/Onh1r97DG0dFosfb8AxpVoTm5Tc64nuyDdfBqTx4a2BCCvbuwraV1%2BsP response: body: string: '{"value":[]}' @@ -417,24 +529,24 @@ interactions: content-encoding: gzip content-length: '133' content-type: application/json; charset=utf-8 - date: Wed, 09 Sep 2020 03:24:42 GMT + date: Tue, 15 Sep 2020 06:48:42 GMT expires: '-1' pragma: no-cache strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-content-type-options: nosniff - x-ms-original-request-ids: 37271c2c-6db8-4d8d-ae97-a3601800b0e2 + x-ms-original-request-ids: 1b89dd6d-87a5-4ea1-a96c-711d6c352a9e status: code: 200 message: OK - url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=ZY3LasMwFET/RQTvZFmKWz/AlBKSLNKs3HrRnaxHqzqWhK5s8sD/XnddGGZxGM48kFXX%2BGbsAKh%2BoP1r%2B/7Rohp9x%2BihJmTkln%2BpUdmY8vsUVCrcSGDqQQTjo3EWSMV09SRLjbfiucA5ZTmuqChwKXRWCNlrllPig5uNVAHI2YjgwOmYntSt49Mlkvmv4WUTnW9owr3B87pc5Q3LaIWzNTTZwLA%2BukHZRh67u9zRH348TJ/sOvejLP8z0aBl%2BQU%3D + url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/providers/Microsoft.KeyVault/vaults?$top=1&api-version=2019-09-01&$skiptoken=FY3tboIwAEXfhZj9GkLBL0zIovFjuoEZIFX%2BlVIEoaXSwkTju48lNze5ycm5T4WRu/zOWSGU%2BVNZL/zg6CtzJZOSi7mmUcTQhVDC5BA9mpoMcUU10cQC1zmXecWEZhmpNU5mqWriyVQdAWOkWgBP1RlO9SlO4tQYAY3XVZsnpBaak%2BO6ElUqh1%2BkC1FTSq39b/ExkBW3wRviudr2ZC%2B3DR1Yqt4HvA1E0T9WBWG2T%2Bo2x2SJBEneA2o1kX8v4efSCILdGIVcBrREcclltHKhs%2BE3n7kHhy2MCHIUG%2BsOr6LMMy/ducj2BG5Ozsq9hiBqIQS%2BS/c7j2ZZzJa3gILCKfkEMu/a7y6AQCcbfjybPHOK6NH7fUJ/Onh1r97DG0dFosfb8AxpVoTm5Tc64nuyDdfBqTx4a2BCCvbuwraV1%2BsP - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/providers/Microsoft.KeyVault/operations?api-version=2019-09-01 response: @@ -678,7 +790,7 @@ interactions: cache-control: no-cache content-encoding: gzip content-type: application/json; charset=utf-8 - date: Wed, 09 Sep 2020 03:24:43 GMT + date: Tue, 15 Sep 2020 06:48:43 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 @@ -687,7 +799,7 @@ interactions: vary: Accept-Encoding x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.1.31.0 + x-ms-keyvault-service-version: 1.1.55.0 x-powered-by: ASP.NET status: code: 200 @@ -703,7 +815,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: PATCH uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 response: @@ -713,7 +825,7 @@ interactions: cache-control: no-cache content-encoding: gzip content-type: application/json; charset=utf-8 - date: Wed, 09 Sep 2020 03:24:45 GMT + date: Tue, 15 Sep 2020 06:48:45 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 @@ -722,13 +834,13 @@ interactions: vary: Accept-Encoding x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.1.31.0 - x-ms-ratelimit-remaining-subscription-writes: '1196' + x-ms-keyvault-service-version: 1.1.55.0 + x-ms-ratelimit-remaining-subscription-writes: '1198' x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/6mglktq2lpe27ihaclbw3hhuek72gvh426gmu2gzjke2etygh26upentdb476hz2jiz7ot35ecb/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 + url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/lqr3l54nbmoy5alzsabk2vy2icyijhd2es6kqkk6zvqxq2tpdxk2pxqf2fghwmrpj46oquqtx7j/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 - request: body: '{"name": "sample-vault", "type": "Microsoft.KeyVault/vaults"}' headers: @@ -739,7 +851,7 @@ interactions: Content-Type: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/checkNameAvailability?api-version=2019-09-01 response: @@ -750,7 +862,7 @@ interactions: cache-control: no-cache content-encoding: gzip content-type: application/json; charset=utf-8 - date: Wed, 09 Sep 2020 03:24:46 GMT + date: Tue, 15 Sep 2020 06:48:51 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 @@ -759,7 +871,7 @@ interactions: vary: Accept-Encoding x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.1.31.0 + x-ms-keyvault-service-version: 1.1.55.0 x-powered-by: ASP.NET status: code: 200 @@ -769,7 +881,7 @@ interactions: body: null headers: User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: DELETE uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 response: @@ -778,37 +890,37 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Wed, 09 Sep 2020 03:24:54 GMT + date: Tue, 15 Sep 2020 06:48:58 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.1.31.0 + x-ms-keyvault-service-version: 1.1.55.0 x-ms-ratelimit-remaining-subscription-deletes: '14999' x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/6mglktq2lpe27ihaclbw3hhuek72gvh426gmu2gzjke2etygh26upentdb476hz2jiz7ot35ecb/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 + url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/resourceGroups/lqr3l54nbmoy5alzsabk2vy2icyijhd2es6kqkk6zvqxq2tpdxk2pxqf2fghwmrpj46oquqtx7j/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz?api-version=2019-09-01 - request: body: null headers: Accept: - application/json User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/myValtZikfikxyzz?api-version=2019-09-01 response: body: - string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/myValtZikfikxyzz","name":"myValtZikfikxyzz","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz","location":"eastus","tags":{},"deletionDate":"2020-09-09T03:24:47Z","scheduledPurgeDate":"2020-12-08T03:24:47Z"}}' + string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/myValtZikfikxyzz","name":"myValtZikfikxyzz","type":"Microsoft.KeyVault/deletedVaults","properties":{"vaultId":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/rgname/providers/Microsoft.KeyVault/vaults/myValtZikfikxyzz","location":"eastus","tags":{},"deletionDate":"2020-09-15T06:48:52Z","scheduledPurgeDate":"2020-12-14T06:48:52Z"}}' headers: cache-control: no-cache content-encoding: gzip content-type: application/json; charset=utf-8 - date: Wed, 09 Sep 2020 03:24:54 GMT + date: Tue, 15 Sep 2020 06:48:59 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 @@ -817,7 +929,7 @@ interactions: vary: Accept-Encoding x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.1.31.0 + x-ms-keyvault-service-version: 1.1.55.0 x-powered-by: ASP.NET status: code: 200 @@ -827,7 +939,7 @@ interactions: body: null headers: User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: POST uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/deletedVaults/myValtZikfikxyzz/purge?api-version=2019-09-01 response: @@ -836,15 +948,15 @@ interactions: headers: cache-control: no-cache content-length: '0' - date: Wed, 09 Sep 2020 03:24:55 GMT + date: Tue, 15 Sep 2020 06:48:59 GMT expires: '-1' - location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1MjE4Njk2NjYxNTQyMXw0NTVDMzNBRURCMkY0MTQwQTlFRTU0QURFODczMkY0RA?api-version=2019-09-01 + location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1NzQ5MzQwODMzNTcxOHw5MTAwQTBBMzE5MkQ0N0IwQUJBMDYwRjg1RUZFQzNCNg?api-version=2019-09-01 pragma: no-cache server: Microsoft-IIS/10.0 strict-transport-security: max-age=31536000; includeSubDomains x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.1.31.0 + x-ms-keyvault-service-version: 1.1.55.0 x-ms-ratelimit-remaining-subscription-writes: '1199' x-powered-by: ASP.NET status: @@ -855,102 +967,18 @@ interactions: body: null headers: User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1MjE4Njk2NjYxNTQyMXw0NTVDMzNBRURCMkY0MTQwQTlFRTU0QURFODczMkY0RA?api-version=2019-09-01 - response: - body: - string: '{"createdDateTime":"2020-09-09 03:24:55Z","status":"NotStarted"}' - headers: - cache-control: no-cache - content-length: '64' - content-type: application/json; charset=utf-8 - date: Wed, 09 Sep 2020 03:25:01 GMT - expires: '-1' - location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1MjE4Njk2NjYxNTQyMXw0NTVDMzNBRURCMkY0MTQwQTlFRTU0QURFODczMkY0RA?api-version=2019-09-01 - pragma: no-cache - server: Microsoft-IIS/10.0 - strict-transport-security: max-age=31536000; includeSubDomains - x-aspnet-version: 4.0.30319 - x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.1.31.0 - x-powered-by: ASP.NET - status: - code: 202 - message: Accepted - url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1MjE4Njk2NjYxNTQyMXw0NTVDMzNBRURCMkY0MTQwQTlFRTU0QURFODczMkY0RA?api-version=2019-09-01 -- request: - body: null - headers: - User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1MjE4Njk2NjYxNTQyMXw0NTVDMzNBRURCMkY0MTQwQTlFRTU0QURFODczMkY0RA?api-version=2019-09-01 - response: - body: - string: '{"createdDateTime":"2020-09-09 03:24:55Z","status":"NotStarted"}' - headers: - cache-control: no-cache - content-length: '64' - content-type: application/json; charset=utf-8 - date: Wed, 09 Sep 2020 03:25:07 GMT - expires: '-1' - location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1MjE4Njk2NjYxNTQyMXw0NTVDMzNBRURCMkY0MTQwQTlFRTU0QURFODczMkY0RA?api-version=2019-09-01 - pragma: no-cache - server: Microsoft-IIS/10.0 - strict-transport-security: max-age=31536000; includeSubDomains - x-aspnet-version: 4.0.30319 - x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.1.31.0 - x-powered-by: ASP.NET - status: - code: 202 - message: Accepted - url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1MjE4Njk2NjYxNTQyMXw0NTVDMzNBRURCMkY0MTQwQTlFRTU0QURFODczMkY0RA?api-version=2019-09-01 -- request: - body: null - headers: - User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) - method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1MjE4Njk2NjYxNTQyMXw0NTVDMzNBRURCMkY0MTQwQTlFRTU0QURFODczMkY0RA?api-version=2019-09-01 - response: - body: - string: '{"createdDateTime":"2020-09-09 03:24:55Z","status":"NotStarted"}' - headers: - cache-control: no-cache - content-length: '64' - content-type: application/json; charset=utf-8 - date: Wed, 09 Sep 2020 03:25:13 GMT - expires: '-1' - location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1MjE4Njk2NjYxNTQyMXw0NTVDMzNBRURCMkY0MTQwQTlFRTU0QURFODczMkY0RA?api-version=2019-09-01 - pragma: no-cache - server: Microsoft-IIS/10.0 - strict-transport-security: max-age=31536000; includeSubDomains - x-aspnet-version: 4.0.30319 - x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.1.31.0 - x-powered-by: ASP.NET - status: - code: 202 - message: Accepted - url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1MjE4Njk2NjYxNTQyMXw0NTVDMzNBRURCMkY0MTQwQTlFRTU0QURFODczMkY0RA?api-version=2019-09-01 -- request: - body: null - headers: - User-Agent: - - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.8.1 (Windows-10-10.0.19041-SP0) + - azsdk-python-azure-mgmt-keyvault/7.0.0b3 Python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) method: GET - uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1MjE4Njk2NjYxNTQyMXw0NTVDMzNBRURCMkY0MTQwQTlFRTU0QURFODczMkY0RA?api-version=2019-09-01 + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1NzQ5MzQwODMzNTcxOHw5MTAwQTBBMzE5MkQ0N0IwQUJBMDYwRjg1RUZFQzNCNg?api-version=2019-09-01 response: body: - string: '{"createdDateTime":"2020-09-09 03:24:55Z","lastActionDateTime":"2020-09-09 - 03:25:19Z","status":"Succeeded"}' + string: '{"createdDateTime":"2020-09-15 06:48:59Z","lastActionDateTime":"2020-09-15 + 06:49:03Z","status":"Succeeded"}' headers: cache-control: no-cache content-encoding: gzip content-type: application/json; charset=utf-8 - date: Wed, 09 Sep 2020 03:25:19 GMT + date: Tue, 15 Sep 2020 06:49:05 GMT expires: '-1' pragma: no-cache server: Microsoft-IIS/10.0 @@ -959,10 +987,10 @@ interactions: vary: Accept-Encoding x-aspnet-version: 4.0.30319 x-content-type-options: nosniff - x-ms-keyvault-service-version: 1.1.31.0 + x-ms-keyvault-service-version: 1.1.55.0 x-powered-by: ASP.NET status: code: 200 message: OK - url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1MjE4Njk2NjYxNTQyMXw0NTVDMzNBRURCMkY0MTQwQTlFRTU0QURFODczMkY0RA?api-version=2019-09-01 + url: https://management.azure.com/subscriptions/92f95d8f-3c67-4124-91c7-8cf07cdbf241/providers/Microsoft.KeyVault/locations/eastus/operationResults/VVR8MDYzNzM1NzQ5MzQwODMzNTcxOHw5MTAwQTBBMzE5MkQ0N0IwQUJBMDYwRjg1RUZFQzNCNg?api-version=2019-09-01 version: 1