From b3597c3fe5b7325485a682cfa356a6a5d30db782 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Fri, 21 May 2021 02:32:17 +0000 Subject: [PATCH] CodeGen from PR 14434 in Azure/azure-rest-api-specs Merge 9a5735b3a42d7739434d598f4d6f722a58f14438 into 857f053ff9f6eb8b61e666d1c52a51e5f8db2ca8 --- sdk/keyvault/azure-mgmt-keyvault/_meta.json | 11 +- .../keyvault/_key_vault_management_client.py | 3 + .../aio/_key_vault_management_client.py | 3 + .../mgmt/keyvault/v2016_10_01/_version.py | 2 +- .../v2016_10_01/aio/operations/_operations.py | 2 +- .../aio/operations/_vaults_operations.py | 30 +- .../operations/_vaults_operations.py | 4 +- .../mgmt/keyvault/v2018_02_14/_version.py | 2 +- .../v2018_02_14/aio/operations/_operations.py | 2 +- ...private_endpoint_connections_operations.py | 12 +- .../_private_link_resources_operations.py | 2 +- .../aio/operations/_vaults_operations.py | 36 +- .../keyvault/v2018_02_14/models/_models.py | 3 +- .../v2018_02_14/models/_models_py3.py | 3 +- ...private_endpoint_connections_operations.py | 4 +- .../operations/_vaults_operations.py | 8 +- .../mgmt/keyvault/v2019_09_01/_version.py | 2 +- .../aio/operations/_keys_operations.py | 10 +- .../v2019_09_01/aio/operations/_operations.py | 2 +- ...private_endpoint_connections_operations.py | 12 +- .../_private_link_resources_operations.py | 2 +- .../aio/operations/_vaults_operations.py | 36 +- .../keyvault/v2019_09_01/models/_models.py | 3 +- .../v2019_09_01/models/_models_py3.py | 3 +- ...private_endpoint_connections_operations.py | 4 +- .../operations/_vaults_operations.py | 8 +- .../_key_vault_management_client.py | 5 + .../v2020_04_01_preview/_metadata.json | 1 + .../keyvault/v2020_04_01_preview/_version.py | 2 +- .../aio/_key_vault_management_client.py | 5 + .../aio/operations/__init__.py | 2 + .../aio/operations/_keys_operations.py | 399 +++++++++++++++++ .../operations/_managed_hsms_operations.py | 30 +- .../aio/operations/_operations.py | 2 +- ...private_endpoint_connections_operations.py | 12 +- .../_private_link_resources_operations.py | 2 +- .../aio/operations/_secrets_operations.py | 8 +- .../aio/operations/_vaults_operations.py | 38 +- .../v2020_04_01_preview/models/__init__.py | 23 + .../_key_vault_management_client_enums.py | 42 ++ .../v2020_04_01_preview/models/_models.py | 325 ++++++++++++-- .../v2020_04_01_preview/models/_models_py3.py | 348 +++++++++++++-- .../operations/__init__.py | 2 + .../operations/_keys_operations.py | 408 ++++++++++++++++++ .../operations/_managed_hsms_operations.py | 12 +- ...private_endpoint_connections_operations.py | 4 +- .../operations/_vaults_operations.py | 10 +- .../keyvault/v2021_04_01_preview/_version.py | 2 +- .../operations/_managed_hsms_operations.py | 42 +- ...private_endpoint_connections_operations.py | 14 +- ..._mhsm_private_link_resources_operations.py | 2 +- .../aio/operations/_operations.py | 2 +- ...private_endpoint_connections_operations.py | 14 +- .../_private_link_resources_operations.py | 2 +- .../aio/operations/_secrets_operations.py | 8 +- .../aio/operations/_vaults_operations.py | 36 +- .../v2021_04_01_preview/models/__init__.py | 6 + .../v2021_04_01_preview/models/_models.py | 117 ++++- .../v2021_04_01_preview/models/_models_py3.py | 137 +++++- .../operations/_managed_hsms_operations.py | 16 +- ...private_endpoint_connections_operations.py | 4 +- ...private_endpoint_connections_operations.py | 4 +- .../operations/_vaults_operations.py | 8 +- 63 files changed, 1962 insertions(+), 341 deletions(-) create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_keys_operations.py create mode 100644 sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_keys_operations.py diff --git a/sdk/keyvault/azure-mgmt-keyvault/_meta.json b/sdk/keyvault/azure-mgmt-keyvault/_meta.json index d37df2680dc4..cf6484b5cb63 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/_meta.json +++ b/sdk/keyvault/azure-mgmt-keyvault/_meta.json @@ -1,8 +1,11 @@ { - "autorest": "3.3.0", - "use": "@autorest/python@5.6.5", - "commit": "afa4f1aa31962637ee6fd722511337016a681515", + "autorest": "3.4.2", + "use": [ + "@autorest/python@5.8.0", + "@autorest/modelerfour@4.19.1" + ], + "commit": "9e2b262477b672dc178e5127455bd667fef31514", "repository_url": "https://github.com/Azure/azure-rest-api-specs", - "autorest_command": "autorest specification/keyvault/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.6.5 --version=3.3.0", + "autorest_command": "autorest specification/keyvault/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/python@5.8.0 --use=@autorest/modelerfour@4.19.1 --version=3.4.2", "readme": "specification/keyvault/resource-manager/readme.md" } \ No newline at end of file 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 0eb44a06e5b2..320f322ba43b 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 @@ -119,10 +119,13 @@ def keys(self): """Instance depends on the API version: * 2019-09-01: :class:`KeysOperations` + * 2020-04-01-preview: :class:`KeysOperations` """ api_version = self._get_api_version('keys') if api_version == '2019-09-01': from .v2019_09_01.operations import KeysOperations as OperationClass + elif api_version == '2020-04-01-preview': + from .v2020_04_01_preview.operations import KeysOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'keys'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_key_vault_management_client.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_key_vault_management_client.py index 9fdc230f1cd0..b9b03e6b3f09 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_key_vault_management_client.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/aio/_key_vault_management_client.py @@ -117,10 +117,13 @@ def keys(self): """Instance depends on the API version: * 2019-09-01: :class:`KeysOperations` + * 2020-04-01-preview: :class:`KeysOperations` """ api_version = self._get_api_version('keys') if api_version == '2019-09-01': from ..v2019_09_01.aio.operations import KeysOperations as OperationClass + elif api_version == '2020-04-01-preview': + from ..v2020_04_01_preview.aio.operations import KeysOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'keys'".format(api_version)) return OperationClass(self._client, self._config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_version.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_version.py index b77ac9246082..e5754a47ce68 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_version.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations/_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations/_operations.py index 9b3dbffd14a8..2500793129a7 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations/_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations/_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationListResult"]: """Lists all of the available Key Vault Rest API operations. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations/_vaults_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations/_vaults_operations.py index fa3faebb1cdc..2555da08ad64 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations/_vaults_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/aio/operations/_vaults_operations.py @@ -48,7 +48,7 @@ async def create_or_update( resource_group_name: str, vault_name: str, parameters: "_models.VaultCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Vault": """Create or update a key vault in the specified subscription. @@ -118,7 +118,7 @@ async def update( resource_group_name: str, vault_name: str, parameters: "_models.VaultPatchParameters", - **kwargs + **kwargs: Any ) -> "_models.Vault": """Update a key vault in the specified subscription. @@ -187,7 +187,7 @@ async def delete( self, resource_group_name: str, vault_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified Azure key vault. @@ -240,7 +240,7 @@ async def get( self, resource_group_name: str, vault_name: str, - **kwargs + **kwargs: Any ) -> "_models.Vault": """Gets the specified Azure key vault. @@ -300,7 +300,7 @@ async def update_access_policy( vault_name: str, operation_kind: Union[str, "_models.AccessPolicyUpdateKind"], parameters: "_models.VaultAccessPolicyParameters", - **kwargs + **kwargs: Any ) -> "_models.VaultAccessPolicyParameters": """Update access policies in a key vault in the specified subscription. @@ -372,7 +372,7 @@ def list_by_resource_group( self, resource_group_name: str, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.VaultListResult"]: """The List operation gets information about the vaults associated with the subscription and within the specified resource group. @@ -447,7 +447,7 @@ async def get_next(next_link=None): def list_by_subscription( self, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.VaultListResult"]: """The List operation gets information about the vaults associated with the subscription. @@ -517,7 +517,7 @@ async def get_next(next_link=None): def list_deleted( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DeletedVaultListResult"]: """Gets information about the deleted vaults in a subscription. @@ -585,7 +585,7 @@ async def get_deleted( self, vault_name: str, location: str, - **kwargs + **kwargs: Any ) -> "_models.DeletedVault": """Gets the deleted Azure key vault. @@ -643,7 +643,7 @@ async def _purge_deleted_initial( self, vault_name: str, location: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -685,7 +685,7 @@ async def begin_purge_deleted( self, vault_name: str, location: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Permanently deletes the specified vault. aka Purges the deleted Azure key vault. @@ -695,8 +695,8 @@ async def begin_purge_deleted( :type location: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -748,7 +748,7 @@ def get_long_running_output(pipeline_response): def list( self, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ResourceListResult"]: """The List operation gets information about the vaults associated with the subscription. @@ -821,7 +821,7 @@ async def get_next(next_link=None): async def check_name_availability( self, vault_name: "_models.VaultCheckNameAvailabilityParameters", - **kwargs + **kwargs: Any ) -> "_models.CheckNameAvailabilityResult": """Checks that the vault name is valid and is not already in use. 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 4426301d80b9..a5c82bb8fce2 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 @@ -710,8 +710,8 @@ def begin_purge_deleted( :type location: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/_version.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/_version.py index b77ac9246082..e5754a47ce68 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/_version.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_operations.py index 6fc5c295d786..bb98dcc0dc8a 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationListResult"]: """Lists all of the available Key Vault Rest API operations. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_private_endpoint_connections_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_private_endpoint_connections_operations.py index 528271c3a68c..0cdf509a71d0 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_private_endpoint_connections_operations.py @@ -47,7 +47,7 @@ async def get( resource_group_name: str, vault_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> "_models.PrivateEndpointConnection": """Gets the specified private endpoint connection associated with the key vault. @@ -111,7 +111,7 @@ async def put( vault_name: str, private_endpoint_connection_name: str, properties: "_models.PrivateEndpointConnection", - **kwargs + **kwargs: Any ) -> "_models.PrivateEndpointConnection": """Updates the specified private endpoint connection associated with the key vault. @@ -184,7 +184,7 @@ async def _delete_initial( resource_group_name: str, vault_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.PrivateEndpointConnection"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] error_map = { @@ -240,7 +240,7 @@ async def begin_delete( resource_group_name: str, vault_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.PrivateEndpointConnection"]: """Deletes the specified private endpoint connection associated with the key vault. @@ -253,8 +253,8 @@ async def begin_delete( :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. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the result of cls(response) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_private_link_resources_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_private_link_resources_operations.py index 0674b3a6eafa..02c9cefb5eab 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_private_link_resources_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_private_link_resources_operations.py @@ -44,7 +44,7 @@ async def list_by_vault( self, resource_group_name: str, vault_name: str, - **kwargs + **kwargs: Any ) -> "_models.PrivateLinkResourceListResult": """Gets the private link resources supported for the key vault. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_vaults_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_vaults_operations.py index 4c0bbc3df7c0..80cb22e0e6fe 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_vaults_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2018_02_14/aio/operations/_vaults_operations.py @@ -48,7 +48,7 @@ async def _create_or_update_initial( resource_group_name: str, vault_name: str, parameters: "_models.VaultCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Vault": cls = kwargs.pop('cls', None) # type: ClsType["_models.Vault"] error_map = { @@ -105,7 +105,7 @@ async def begin_create_or_update( resource_group_name: str, vault_name: str, parameters: "_models.VaultCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Vault"]: """Create or update a key vault in the specified subscription. @@ -117,8 +117,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.keyvault.v2018_02_14.models.VaultCreateOrUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Vault or the result of cls(response) @@ -176,7 +176,7 @@ async def update( resource_group_name: str, vault_name: str, parameters: "_models.VaultPatchParameters", - **kwargs + **kwargs: Any ) -> "_models.Vault": """Update a key vault in the specified subscription. @@ -245,7 +245,7 @@ async def delete( self, resource_group_name: str, vault_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified Azure key vault. @@ -298,7 +298,7 @@ async def get( self, resource_group_name: str, vault_name: str, - **kwargs + **kwargs: Any ) -> "_models.Vault": """Gets the specified Azure key vault. @@ -358,7 +358,7 @@ async def update_access_policy( vault_name: str, operation_kind: Union[str, "_models.AccessPolicyUpdateKind"], parameters: "_models.VaultAccessPolicyParameters", - **kwargs + **kwargs: Any ) -> "_models.VaultAccessPolicyParameters": """Update access policies in a key vault in the specified subscription. @@ -430,7 +430,7 @@ def list_by_resource_group( self, resource_group_name: str, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.VaultListResult"]: """The List operation gets information about the vaults associated with the subscription and within the specified resource group. @@ -505,7 +505,7 @@ async def get_next(next_link=None): def list_by_subscription( self, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.VaultListResult"]: """The List operation gets information about the vaults associated with the subscription. @@ -575,7 +575,7 @@ async def get_next(next_link=None): def list_deleted( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DeletedVaultListResult"]: """Gets information about the deleted vaults in a subscription. @@ -643,7 +643,7 @@ async def get_deleted( self, vault_name: str, location: str, - **kwargs + **kwargs: Any ) -> "_models.DeletedVault": """Gets the deleted Azure key vault. @@ -701,7 +701,7 @@ async def _purge_deleted_initial( self, vault_name: str, location: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -743,7 +743,7 @@ async def begin_purge_deleted( self, vault_name: str, location: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Permanently deletes the specified vault. aka Purges the deleted Azure key vault. @@ -753,8 +753,8 @@ async def begin_purge_deleted( :type location: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -806,7 +806,7 @@ def get_long_running_output(pipeline_response): def list( self, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ResourceListResult"]: """The List operation gets information about the vaults associated with the subscription. @@ -879,7 +879,7 @@ async def get_next(next_link=None): async def check_name_availability( self, vault_name: "_models.VaultCheckNameAvailabilityParameters", - **kwargs + **kwargs: Any ) -> "_models.CheckNameAvailabilityResult": """Checks that the vault name is valid and is not already in use. 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 1b2e27f0780f..252a13cde91e 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 @@ -1162,8 +1162,7 @@ class VirtualNetworkRule(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param id: Required. Full resource id of a vnet subnet, such as - '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test- - vnet/subnets/subnet1'. + '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. :type id: str """ 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 d1cc5f8261ba..e5b5dd0ac340 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 @@ -1273,8 +1273,7 @@ class VirtualNetworkRule(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param id: Required. Full resource id of a vnet subnet, such as - '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test- - vnet/subnets/subnet1'. + '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. :type id: str """ 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 c6c14be270d4..7d44d6c3ffaf 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 @@ -261,8 +261,8 @@ def begin_delete( :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. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) 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 a0065188489a..005683a27811 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 @@ -123,8 +123,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.keyvault.v2018_02_14.models.VaultCreateOrUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Vault or the result of cls(response) @@ -769,8 +769,8 @@ def begin_purge_deleted( :type location: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/_version.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/_version.py index b77ac9246082..e5754a47ce68 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/_version.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_keys_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_keys_operations.py index 9e8312e5083d..4300c91f2cc1 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_keys_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_keys_operations.py @@ -47,7 +47,7 @@ async def create_if_not_exist( vault_name: str, key_name: str, parameters: "_models.KeyCreateParameters", - **kwargs + **kwargs: Any ) -> "_models.Key": """Creates the first version of a new key if it does not exist. If it already exists, then the existing key is returned without any write operations being performed. This API does not create @@ -119,7 +119,7 @@ async def get( resource_group_name: str, vault_name: str, key_name: str, - **kwargs + **kwargs: Any ) -> "_models.Key": """Gets the current version of the specified key from the specified key vault. @@ -181,7 +181,7 @@ def list( self, resource_group_name: str, vault_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.KeyListResult"]: """Lists the keys in the specified key vault. @@ -258,7 +258,7 @@ async def get_version( vault_name: str, key_name: str, key_version: str, - **kwargs + **kwargs: Any ) -> "_models.Key": """Gets the specified version of the specified key in the specified key vault. @@ -324,7 +324,7 @@ def list_versions( resource_group_name: str, vault_name: str, key_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.KeyListResult"]: """Lists the versions of the specified key in the specified key vault. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_operations.py index e811c9913ea3..d236a09d04b6 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationListResult"]: """Lists all of the available Key Vault Rest API operations. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_private_endpoint_connections_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_private_endpoint_connections_operations.py index 814ea710d74e..fb38961dbcf2 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_private_endpoint_connections_operations.py @@ -47,7 +47,7 @@ async def get( resource_group_name: str, vault_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.PrivateEndpointConnection"]: """Gets the specified private endpoint connection associated with the key vault. @@ -113,7 +113,7 @@ async def put( vault_name: str, private_endpoint_connection_name: str, properties: "_models.PrivateEndpointConnection", - **kwargs + **kwargs: Any ) -> "_models.PrivateEndpointConnection": """Updates the specified private endpoint connection associated with the key vault. @@ -186,7 +186,7 @@ async def _delete_initial( resource_group_name: str, vault_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.PrivateEndpointConnection"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] error_map = { @@ -242,7 +242,7 @@ async def begin_delete( resource_group_name: str, vault_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.PrivateEndpointConnection"]: """Deletes the specified private endpoint connection associated with the key vault. @@ -255,8 +255,8 @@ async def begin_delete( :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. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the result of cls(response) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_private_link_resources_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_private_link_resources_operations.py index 9d320374df2d..fa0ee15146b9 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_private_link_resources_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_private_link_resources_operations.py @@ -44,7 +44,7 @@ async def list_by_vault( self, resource_group_name: str, vault_name: str, - **kwargs + **kwargs: Any ) -> "_models.PrivateLinkResourceListResult": """Gets the private link resources supported for the key vault. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_vaults_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_vaults_operations.py index 56263f5acf32..da41e602d0a4 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_vaults_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2019_09_01/aio/operations/_vaults_operations.py @@ -48,7 +48,7 @@ async def _create_or_update_initial( resource_group_name: str, vault_name: str, parameters: "_models.VaultCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Vault": cls = kwargs.pop('cls', None) # type: ClsType["_models.Vault"] error_map = { @@ -105,7 +105,7 @@ async def begin_create_or_update( resource_group_name: str, vault_name: str, parameters: "_models.VaultCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Vault"]: """Create or update a key vault in the specified subscription. @@ -117,8 +117,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.keyvault.v2019_09_01.models.VaultCreateOrUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Vault or the result of cls(response) @@ -176,7 +176,7 @@ async def update( resource_group_name: str, vault_name: str, parameters: "_models.VaultPatchParameters", - **kwargs + **kwargs: Any ) -> "_models.Vault": """Update a key vault in the specified subscription. @@ -245,7 +245,7 @@ async def delete( self, resource_group_name: str, vault_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified Azure key vault. @@ -300,7 +300,7 @@ async def get( self, resource_group_name: str, vault_name: str, - **kwargs + **kwargs: Any ) -> "_models.Vault": """Gets the specified Azure key vault. @@ -360,7 +360,7 @@ async def update_access_policy( vault_name: str, operation_kind: Union[str, "_models.AccessPolicyUpdateKind"], parameters: "_models.VaultAccessPolicyParameters", - **kwargs + **kwargs: Any ) -> "_models.VaultAccessPolicyParameters": """Update access policies in a key vault in the specified subscription. @@ -432,7 +432,7 @@ def list_by_resource_group( self, resource_group_name: str, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.VaultListResult"]: """The List operation gets information about the vaults associated with the subscription and within the specified resource group. @@ -507,7 +507,7 @@ async def get_next(next_link=None): def list_by_subscription( self, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.VaultListResult"]: """The List operation gets information about the vaults associated with the subscription. @@ -577,7 +577,7 @@ async def get_next(next_link=None): def list_deleted( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DeletedVaultListResult"]: """Gets information about the deleted vaults in a subscription. @@ -645,7 +645,7 @@ async def get_deleted( self, vault_name: str, location: str, - **kwargs + **kwargs: Any ) -> "_models.DeletedVault": """Gets the deleted Azure key vault. @@ -703,7 +703,7 @@ async def _purge_deleted_initial( self, vault_name: str, location: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -747,7 +747,7 @@ async def begin_purge_deleted( self, vault_name: str, location: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Permanently deletes the specified vault. aka Purges the deleted Azure key vault. @@ -757,8 +757,8 @@ async def begin_purge_deleted( :type location: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -810,7 +810,7 @@ def get_long_running_output(pipeline_response): def list( self, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ResourceListResult"]: """The List operation gets information about the vaults associated with the subscription. @@ -883,7 +883,7 @@ async def get_next(next_link=None): async def check_name_availability( self, vault_name: "_models.VaultCheckNameAvailabilityParameters", - **kwargs + **kwargs: Any ) -> "_models.CheckNameAvailabilityResult": """Checks that the vault name is valid and is not already in use. 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 89a8a10f22bd..18c5962493eb 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 @@ -1586,8 +1586,7 @@ class VirtualNetworkRule(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param id: Required. Full resource id of a vnet subnet, such as - '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test- - vnet/subnets/subnet1'. + '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. :type id: str :param ignore_missing_vnet_service_endpoint: Property to specify whether NRP will ignore the check if parent subnet has serviceEndpoints configured. 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 68ac222b0b9f..b37e2dbbe99a 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 @@ -1749,8 +1749,7 @@ class VirtualNetworkRule(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param id: Required. Full resource id of a vnet subnet, such as - '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test- - vnet/subnets/subnet1'. + '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. :type id: str :param ignore_missing_vnet_service_endpoint: Property to specify whether NRP will ignore the check if parent subnet has serviceEndpoints configured. 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 41f0934c87c6..8ccbf6b1cafe 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 @@ -263,8 +263,8 @@ def begin_delete( :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. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) 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 34514dc10612..837a738402c9 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 @@ -123,8 +123,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.keyvault.v2019_09_01.models.VaultCreateOrUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Vault or the result of cls(response) @@ -773,8 +773,8 @@ def begin_purge_deleted( :type location: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) diff --git a/sdk/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 f5b78fd84874..50314d1a61e8 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 @@ -19,6 +19,7 @@ from azure.core.pipeline.transport import HttpRequest, HttpResponse from ._configuration import KeyVaultManagementClientConfiguration +from .operations import KeysOperations from .operations import VaultsOperations from .operations import PrivateEndpointConnectionsOperations from .operations import PrivateLinkResourcesOperations @@ -31,6 +32,8 @@ class KeyVaultManagementClient(object): """The Azure management API provides a RESTful set of web services that interact with Azure Key Vault. + :ivar keys: KeysOperations operations + :vartype keys: azure.mgmt.keyvault.v2020_04_01_preview.operations.KeysOperations :ivar vaults: VaultsOperations operations :vartype vaults: azure.mgmt.keyvault.v2020_04_01_preview.operations.VaultsOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations @@ -69,6 +72,8 @@ def __init__( self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) + self.keys = KeysOperations( + self._client, self._config, self._serialize, self._deserialize) self.vaults = VaultsOperations( self._client, self._config, self._serialize, self._deserialize) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( 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 7f2b6805f9a4..ca969660e3b7 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 @@ -98,6 +98,7 @@ "async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}" }, "operation_groups": { + "keys": "KeysOperations", "vaults": "VaultsOperations", "private_endpoint_connections": "PrivateEndpointConnectionsOperations", "private_link_resources": "PrivateLinkResourcesOperations", diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/_version.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/_version.py index b77ac9246082..e5754a47ce68 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/_version.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/_key_vault_management_client.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/_key_vault_management_client.py index 3e62ff97bb41..4dea08f9daa3 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/_key_vault_management_client.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/_key_vault_management_client.py @@ -17,6 +17,7 @@ from azure.core.credentials_async import AsyncTokenCredential from ._configuration import KeyVaultManagementClientConfiguration +from .operations import KeysOperations from .operations import VaultsOperations from .operations import PrivateEndpointConnectionsOperations from .operations import PrivateLinkResourcesOperations @@ -29,6 +30,8 @@ class KeyVaultManagementClient(object): """The Azure management API provides a RESTful set of web services that interact with Azure Key Vault. + :ivar keys: KeysOperations operations + :vartype keys: azure.mgmt.keyvault.v2020_04_01_preview.aio.operations.KeysOperations :ivar vaults: VaultsOperations operations :vartype vaults: azure.mgmt.keyvault.v2020_04_01_preview.aio.operations.VaultsOperations :ivar private_endpoint_connections: PrivateEndpointConnectionsOperations operations @@ -66,6 +69,8 @@ def __init__( self._serialize.client_side_validation = False self._deserialize = Deserializer(client_models) + self.keys = KeysOperations( + self._client, self._config, self._serialize, self._deserialize) self.vaults = VaultsOperations( self._client, self._config, self._serialize, self._deserialize) self.private_endpoint_connections = PrivateEndpointConnectionsOperations( diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/__init__.py index 70bb5851b26c..296660e7d1a6 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/__init__.py @@ -6,6 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from ._keys_operations import KeysOperations from ._vaults_operations import VaultsOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations from ._private_link_resources_operations import PrivateLinkResourcesOperations @@ -14,6 +15,7 @@ from ._managed_hsms_operations import ManagedHsmsOperations __all__ = [ + 'KeysOperations', 'VaultsOperations', 'PrivateEndpointConnectionsOperations', 'PrivateLinkResourcesOperations', diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_keys_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_keys_operations.py new file mode 100644 index 000000000000..e4bdfff25116 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_keys_operations.py @@ -0,0 +1,399 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar +import warnings + +from azure.core.async_paging import AsyncItemPaged, AsyncList +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest +from azure.mgmt.core.exceptions import ARMErrorFormat + +from ... import models as _models + +T = TypeVar('T') +ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] + +class KeysOperations: + """KeysOperations async operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.keyvault.v2020_04_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer) -> None: + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + async def create_if_not_exist( + self, + resource_group_name: str, + vault_name: str, + key_name: str, + parameters: "_models.KeyCreateParameters", + **kwargs: Any + ) -> "_models.Key": + """Creates the first version of a new key if it does not exist. If it already exists, then the + existing key is returned without any write operations being performed. This API does not create + subsequent versions, and does not update existing keys. + + :param resource_group_name: The name of the resource group which contains the specified key + vault. + :type resource_group_name: str + :param vault_name: The name of the key vault which contains the key to be created. + :type vault_name: str + :param key_name: The name of the key to be created. + :type key_name: str + :param parameters: The parameters used to create the specified key. + :type parameters: ~azure.mgmt.keyvault.v2020_04_01_preview.models.KeyCreateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Key, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2020_04_01_preview.models.Key + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Key"] + 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_if_not_exist.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'keyName': self._serialize.url("key_name", key_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'KeyCreateParameters') + 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 + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Key', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_if_not_exist.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}'} # type: ignore + + async def get( + self, + resource_group_name: str, + vault_name: str, + key_name: str, + **kwargs: Any + ) -> "_models.Key": + """Gets the current version of the specified key from the specified key vault. + + :param resource_group_name: The name of the resource group which contains the specified key + vault. + :type resource_group_name: str + :param vault_name: The name of the vault which contains the key to be retrieved. + :type vault_name: str + :param key_name: The name of the key to be retrieved. + :type key_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Key, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2020_04_01_preview.models.Key + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Key"] + 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 + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'keyName': self._serialize.url("key_name", key_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Key', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}'} # type: ignore + + def list( + self, + resource_group_name: str, + vault_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.KeyListResult"]: + """Lists the keys in the specified key vault. + + :param resource_group_name: The name of the resource group which contains the specified key + vault. + :type resource_group_name: str + :param vault_name: The name of the vault which contains the keys to be retrieved. + :type vault_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either KeyListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.keyvault.v2020_04_01_preview.models.KeyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyListResult"] + 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'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('KeyListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys'} # type: ignore + + async def get_version( + self, + resource_group_name: str, + vault_name: str, + key_name: str, + key_version: str, + **kwargs: Any + ) -> "_models.Key": + """Gets the specified version of the specified key in the specified key vault. + + :param resource_group_name: The name of the resource group which contains the specified key + vault. + :type resource_group_name: str + :param vault_name: The name of the vault which contains the key version to be retrieved. + :type vault_name: str + :param key_name: The name of the key version to be retrieved. + :type key_name: str + :param key_version: The version of the key to be retrieved. + :type key_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Key, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2020_04_01_preview.models.Key + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Key"] + 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_version.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'keyName': self._serialize.url("key_name", key_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), + 'keyVersion': self._serialize.url("key_version", key_version, 'str', pattern=r'^[a-fA-F0-9]{32}$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Key', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}/versions/{keyVersion}'} # type: ignore + + def list_versions( + self, + resource_group_name: str, + vault_name: str, + key_name: str, + **kwargs: Any + ) -> AsyncIterable["_models.KeyListResult"]: + """Lists the versions of the specified key in the specified key vault. + + :param resource_group_name: The name of the resource group which contains the specified key + vault. + :type resource_group_name: str + :param vault_name: The name of the vault which contains the key versions to be retrieved. + :type vault_name: str + :param key_name: The name of the key versions to be retrieved. + :type key_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either KeyListResult or the result of cls(response) + :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.keyvault.v2020_04_01_preview.models.KeyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyListResult"] + 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'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_versions.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'keyName': self._serialize.url("key_name", key_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + async def extract_data(pipeline_response): + deserialized = self._deserialize('KeyListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, AsyncList(list_of_elem) + + async def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return AsyncItemPaged( + get_next, extract_data + ) + list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}/versions'} # type: ignore diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_managed_hsms_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_managed_hsms_operations.py index 2596b185b1e8..196e78fd77e9 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_managed_hsms_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_managed_hsms_operations.py @@ -48,7 +48,7 @@ async def _create_or_update_initial( resource_group_name: str, name: str, parameters: "_models.ManagedHsm", - **kwargs + **kwargs: Any ) -> "_models.ManagedHsm": cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedHsm"] error_map = { @@ -106,7 +106,7 @@ async def begin_create_or_update( resource_group_name: str, name: str, parameters: "_models.ManagedHsm", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ManagedHsm"]: """Create or update a managed HSM Pool in the specified subscription. @@ -118,8 +118,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.keyvault.v2020_04_01_preview.models.ManagedHsm :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ManagedHsm or the result of cls(response) @@ -177,7 +177,7 @@ async def _update_initial( resource_group_name: str, name: str, parameters: "_models.ManagedHsm", - **kwargs + **kwargs: Any ) -> "_models.ManagedHsm": cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedHsm"] error_map = { @@ -235,7 +235,7 @@ async def begin_update( resource_group_name: str, name: str, parameters: "_models.ManagedHsm", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ManagedHsm"]: """Update a managed HSM Pool in the specified subscription. @@ -247,8 +247,8 @@ async def begin_update( :type parameters: ~azure.mgmt.keyvault.v2020_04_01_preview.models.ManagedHsm :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ManagedHsm or the result of cls(response) @@ -305,7 +305,7 @@ async def _delete_initial( self, resource_group_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -350,7 +350,7 @@ async def begin_delete( self, resource_group_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes the specified managed HSM Pool. @@ -360,8 +360,8 @@ async def begin_delete( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -414,7 +414,7 @@ async def get( self, resource_group_name: str, name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.ManagedHsm"]: """Gets the specified managed HSM Pool. @@ -475,7 +475,7 @@ def list_by_resource_group( self, resource_group_name: str, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ManagedHsmListResult"]: """The List operation gets information about the managed HSM Pools associated with the subscription and within the specified resource group. @@ -551,7 +551,7 @@ async def get_next(next_link=None): def list_by_subscription( self, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ManagedHsmListResult"]: """The List operation gets information about the managed HSM Pools associated with the subscription. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_operations.py index 82def0e207ab..b1491efc50bc 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationListResult"]: """Lists all of the available Key Vault Rest API operations. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_private_endpoint_connections_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_private_endpoint_connections_operations.py index 5e7a5507c1b4..dfa7d8fd6ea1 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_private_endpoint_connections_operations.py @@ -47,7 +47,7 @@ async def get( resource_group_name: str, vault_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.PrivateEndpointConnection"]: """Gets the specified private endpoint connection associated with the key vault. @@ -113,7 +113,7 @@ async def put( vault_name: str, private_endpoint_connection_name: str, properties: "_models.PrivateEndpointConnection", - **kwargs + **kwargs: Any ) -> "_models.PrivateEndpointConnection": """Updates the specified private endpoint connection associated with the key vault. @@ -186,7 +186,7 @@ async def _delete_initial( resource_group_name: str, vault_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.PrivateEndpointConnection"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] error_map = { @@ -242,7 +242,7 @@ async def begin_delete( resource_group_name: str, vault_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.PrivateEndpointConnection"]: """Deletes the specified private endpoint connection associated with the key vault. @@ -255,8 +255,8 @@ async def begin_delete( :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. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the result of cls(response) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_private_link_resources_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_private_link_resources_operations.py index d7221186d543..f8781cca2d45 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_private_link_resources_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_private_link_resources_operations.py @@ -44,7 +44,7 @@ async def list_by_vault( self, resource_group_name: str, vault_name: str, - **kwargs + **kwargs: Any ) -> "_models.PrivateLinkResourceListResult": """Gets the private link resources supported for the key vault. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_secrets_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_secrets_operations.py index 352bad3eb32a..dd747132d9e6 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_secrets_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_secrets_operations.py @@ -47,7 +47,7 @@ async def create_or_update( vault_name: str, secret_name: str, parameters: "_models.SecretCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Secret": """Create or update a secret in a key vault in the specified subscription. NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for @@ -123,7 +123,7 @@ async def update( vault_name: str, secret_name: str, parameters: "_models.SecretPatchParameters", - **kwargs + **kwargs: Any ) -> "_models.Secret": """Update a secret in the specified subscription. NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault @@ -198,7 +198,7 @@ async def get( resource_group_name: str, vault_name: str, secret_name: str, - **kwargs + **kwargs: Any ) -> "_models.Secret": """Gets the specified secret. NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets. @@ -261,7 +261,7 @@ def list( resource_group_name: str, vault_name: str, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SecretListResult"]: """The List operation gets information about the secrets in a vault. NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_vaults_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_vaults_operations.py index 022c98d71e15..c57201e23b07 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_vaults_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_vaults_operations.py @@ -48,7 +48,7 @@ async def _create_or_update_initial( resource_group_name: str, vault_name: str, parameters: "_models.VaultCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Vault": cls = kwargs.pop('cls', None) # type: ClsType["_models.Vault"] error_map = { @@ -105,7 +105,7 @@ async def begin_create_or_update( resource_group_name: str, vault_name: str, parameters: "_models.VaultCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Vault"]: """Create or update a key vault in the specified subscription. @@ -117,8 +117,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.keyvault.v2020_04_01_preview.models.VaultCreateOrUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Vault or the result of cls(response) @@ -176,7 +176,7 @@ async def update( resource_group_name: str, vault_name: str, parameters: "_models.VaultPatchParameters", - **kwargs + **kwargs: Any ) -> "_models.Vault": """Update a key vault in the specified subscription. @@ -245,7 +245,7 @@ async def delete( self, resource_group_name: str, vault_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified Azure key vault. @@ -300,7 +300,7 @@ async def get( self, resource_group_name: str, vault_name: str, - **kwargs + **kwargs: Any ) -> "_models.Vault": """Gets the specified Azure key vault. @@ -360,7 +360,7 @@ async def update_access_policy( vault_name: str, operation_kind: Union[str, "_models.AccessPolicyUpdateKind"], parameters: "_models.VaultAccessPolicyParameters", - **kwargs + **kwargs: Any ) -> "_models.VaultAccessPolicyParameters": """Update access policies in a key vault in the specified subscription. @@ -432,7 +432,7 @@ def list_by_resource_group( self, resource_group_name: str, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.VaultListResult"]: """The List operation gets information about the vaults associated with the subscription and within the specified resource group. @@ -507,7 +507,7 @@ async def get_next(next_link=None): def list_by_subscription( self, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.VaultListResult"]: """The List operation gets information about the vaults associated with the subscription. @@ -577,7 +577,7 @@ async def get_next(next_link=None): def list_deleted( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DeletedVaultListResult"]: """Gets information about the deleted vaults in a subscription. @@ -645,7 +645,7 @@ async def get_deleted( self, vault_name: str, location: str, - **kwargs + **kwargs: Any ) -> "_models.DeletedVault": """Gets the deleted Azure key vault. @@ -703,7 +703,7 @@ async def _purge_deleted_initial( self, vault_name: str, location: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -747,7 +747,7 @@ async def begin_purge_deleted( self, vault_name: str, location: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Permanently deletes the specified vault. aka Purges the deleted Azure key vault. @@ -757,8 +757,8 @@ async def begin_purge_deleted( :type location: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -810,7 +810,7 @@ def get_long_running_output(pipeline_response): def list( self, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ResourceListResult"]: """The List operation gets information about the vaults associated with the subscription. @@ -827,7 +827,7 @@ def list( } error_map.update(kwargs.pop('error_map', {})) filter = "resourceType eq 'Microsoft.KeyVault/vaults'" - api_version = "2020-04-01-preview" + api_version = "2015-11-01" accept = "application/json" def prepare_request(next_link=None): @@ -883,7 +883,7 @@ async def get_next(next_link=None): async def check_name_availability( self, vault_name: "_models.VaultCheckNameAvailabilityParameters", - **kwargs + **kwargs: Any ) -> "_models.CheckNameAvailabilityResult": """Checks that the vault name is valid and is not already in use. 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 d3380d4c4432..366550eeea67 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 @@ -17,6 +17,11 @@ from ._models_py3 import DimensionProperties from ._models_py3 import Error from ._models_py3 import IPRule + from ._models_py3 import Key + from ._models_py3 import KeyAttributes + from ._models_py3 import KeyCreateParameters + from ._models_py3 import KeyListResult + from ._models_py3 import KeyProperties from ._models_py3 import LogSpecification from ._models_py3 import ManagedHsm from ._models_py3 import ManagedHsmError @@ -69,6 +74,11 @@ from ._models import DimensionProperties # type: ignore from ._models import Error # type: ignore from ._models import IPRule # type: ignore + from ._models import Key # type: ignore + from ._models import KeyAttributes # type: ignore + from ._models import KeyCreateParameters # type: ignore + from ._models import KeyListResult # type: ignore + from ._models import KeyProperties # type: ignore from ._models import LogSpecification # type: ignore from ._models import ManagedHsm # type: ignore from ._models import ManagedHsmError # type: ignore @@ -116,7 +126,11 @@ ActionsRequired, CertificatePermissions, CreateMode, + DeletionRecoveryLevel, IdentityType, + JsonWebKeyCurveName, + JsonWebKeyOperation, + JsonWebKeyType, KeyPermissions, ManagedHsmSkuFamily, ManagedHsmSkuName, @@ -144,6 +158,11 @@ 'DimensionProperties', 'Error', 'IPRule', + 'Key', + 'KeyAttributes', + 'KeyCreateParameters', + 'KeyListResult', + 'KeyProperties', 'LogSpecification', 'ManagedHsm', 'ManagedHsmError', @@ -189,7 +208,11 @@ 'ActionsRequired', 'CertificatePermissions', 'CreateMode', + 'DeletionRecoveryLevel', 'IdentityType', + 'JsonWebKeyCurveName', + 'JsonWebKeyOperation', + 'JsonWebKeyType', 'KeyPermissions', 'ManagedHsmSkuFamily', 'ManagedHsmSkuName', 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 48a918d0dd4c..03c4ca86b669 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 @@ -64,6 +64,17 @@ class CreateMode(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): RECOVER = "recover" DEFAULT = "default" +class DeletionRecoveryLevel(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The deletion recovery level currently in effect for the object. If it contains 'Purgeable', + then the object can be permanently deleted by a privileged user; otherwise, only the system can + purge the object at the end of the retention interval. + """ + + PURGEABLE = "Purgeable" + RECOVERABLE_PURGEABLE = "Recoverable+Purgeable" + RECOVERABLE = "Recoverable" + RECOVERABLE_PROTECTED_SUBSCRIPTION = "Recoverable+ProtectedSubscription" + class IdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """The type of identity. """ @@ -73,6 +84,37 @@ class IdentityType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): MANAGED_IDENTITY = "ManagedIdentity" KEY = "Key" +class JsonWebKeyCurveName(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The elliptic curve name. For valid values, see JsonWebKeyCurveName. + """ + + P256 = "P-256" + P384 = "P-384" + P521 = "P-521" + P256_K = "P-256K" + +class JsonWebKeyOperation(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The permitted JSON web key operations of the key. For more information, see + JsonWebKeyOperation. + """ + + ENCRYPT = "encrypt" + DECRYPT = "decrypt" + SIGN = "sign" + VERIFY = "verify" + WRAP_KEY = "wrapKey" + UNWRAP_KEY = "unwrapKey" + IMPORT_ENUM = "import" + +class JsonWebKeyType(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): + """The type of the key. For valid values, see JsonWebKeyType. + """ + + EC = "EC" + EC_HSM = "EC-HSM" + RSA = "RSA" + RSA_HSM = "RSA-HSM" + class KeyPermissions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): ENCRYPT = "encrypt" 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 f749b1ae09d0..f8a414b8fdc1 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 @@ -358,6 +358,279 @@ def __init__( self.value = kwargs['value'] +class Resource(msrest.serialization.Model): + """Key Vault resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified identifier of the key vault resource. + :vartype id: str + :ivar name: Name of the key vault resource. + :vartype name: str + :ivar type: Resource type of the key vault resource. + :vartype type: str + :ivar location: Azure location of the key vault resource. + :vartype location: str + :ivar tags: A set of tags. Tags assigned to the key vault resource. + :vartype tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.tags = None + + +class Key(Resource): + """The key resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified identifier of the key vault resource. + :vartype id: str + :ivar name: Name of the key vault resource. + :vartype name: str + :ivar type: Resource type of the key vault resource. + :vartype type: str + :ivar location: Azure location of the key vault resource. + :vartype location: str + :ivar tags: A set of tags. Tags assigned to the key vault resource. + :vartype tags: dict[str, str] + :param attributes: The attributes of the key. + :type attributes: ~azure.mgmt.keyvault.v2020_04_01_preview.models.KeyAttributes + :param kty: The type of the key. For valid values, see JsonWebKeyType. Possible values include: + "EC", "EC-HSM", "RSA", "RSA-HSM". + :type kty: str or ~azure.mgmt.keyvault.v2020_04_01_preview.models.JsonWebKeyType + :param key_ops: + :type key_ops: list[str or ~azure.mgmt.keyvault.v2020_04_01_preview.models.JsonWebKeyOperation] + :param key_size: The key size in bits. For example: 2048, 3072, or 4096 for RSA. + :type key_size: int + :param curve_name: The elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible + values include: "P-256", "P-384", "P-521", "P-256K". + :type curve_name: str or ~azure.mgmt.keyvault.v2020_04_01_preview.models.JsonWebKeyCurveName + :ivar key_uri: The URI to retrieve the current version of the key. + :vartype key_uri: str + :ivar key_uri_with_version: The URI to retrieve the specific version of the key. + :vartype key_uri_with_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + 'key_uri': {'readonly': True}, + 'key_uri_with_version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'attributes': {'key': 'properties.attributes', 'type': 'KeyAttributes'}, + 'kty': {'key': 'properties.kty', 'type': 'str'}, + 'key_ops': {'key': 'properties.keyOps', 'type': '[str]'}, + 'key_size': {'key': 'properties.keySize', 'type': 'int'}, + 'curve_name': {'key': 'properties.curveName', 'type': 'str'}, + 'key_uri': {'key': 'properties.keyUri', 'type': 'str'}, + 'key_uri_with_version': {'key': 'properties.keyUriWithVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(Key, self).__init__(**kwargs) + self.attributes = kwargs.get('attributes', None) + self.kty = kwargs.get('kty', None) + self.key_ops = kwargs.get('key_ops', None) + self.key_size = kwargs.get('key_size', None) + self.curve_name = kwargs.get('curve_name', None) + self.key_uri = None + self.key_uri_with_version = None + + +class KeyAttributes(msrest.serialization.Model): + """The attributes of the key. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param enabled: Determines whether or not the object is enabled. + :type enabled: bool + :param not_before: Not before date in seconds since 1970-01-01T00:00:00Z. + :type not_before: long + :param expires: Expiry date in seconds since 1970-01-01T00:00:00Z. + :type expires: long + :ivar created: Creation time in seconds since 1970-01-01T00:00:00Z. + :vartype created: long + :ivar updated: Last updated time in seconds since 1970-01-01T00:00:00Z. + :vartype updated: long + :ivar recovery_level: The deletion recovery level currently in effect for the object. If it + contains 'Purgeable', then the object can be permanently deleted by a privileged user; + otherwise, only the system can purge the object at the end of the retention interval. Possible + values include: "Purgeable", "Recoverable+Purgeable", "Recoverable", + "Recoverable+ProtectedSubscription". + :vartype recovery_level: str or + ~azure.mgmt.keyvault.v2020_04_01_preview.models.DeletionRecoveryLevel + """ + + _validation = { + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + 'recovery_level': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'not_before': {'key': 'nbf', 'type': 'long'}, + 'expires': {'key': 'exp', 'type': 'long'}, + 'created': {'key': 'created', 'type': 'long'}, + 'updated': {'key': 'updated', 'type': 'long'}, + 'recovery_level': {'key': 'recoveryLevel', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyAttributes, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.not_before = kwargs.get('not_before', None) + self.expires = kwargs.get('expires', None) + self.created = None + self.updated = None + self.recovery_level = None + + +class KeyCreateParameters(msrest.serialization.Model): + """The parameters used to create a key. + + All required parameters must be populated in order to send to Azure. + + :param tags: A set of tags. The tags that will be assigned to the key. + :type tags: dict[str, str] + :param properties: Required. The properties of the key to be created. + :type properties: ~azure.mgmt.keyvault.v2020_04_01_preview.models.KeyProperties + """ + + _validation = { + 'properties': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'KeyProperties'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyCreateParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) + self.properties = kwargs['properties'] + + +class KeyListResult(msrest.serialization.Model): + """The page of keys. + + :param value: The key resources. + :type value: list[~azure.mgmt.keyvault.v2020_04_01_preview.models.Key] + :param next_link: The URL to get the next page of keys. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Key]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = kwargs.get('next_link', None) + + +class KeyProperties(msrest.serialization.Model): + """The properties of the key. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param attributes: The attributes of the key. + :type attributes: ~azure.mgmt.keyvault.v2020_04_01_preview.models.KeyAttributes + :param kty: The type of the key. For valid values, see JsonWebKeyType. Possible values include: + "EC", "EC-HSM", "RSA", "RSA-HSM". + :type kty: str or ~azure.mgmt.keyvault.v2020_04_01_preview.models.JsonWebKeyType + :param key_ops: + :type key_ops: list[str or ~azure.mgmt.keyvault.v2020_04_01_preview.models.JsonWebKeyOperation] + :param key_size: The key size in bits. For example: 2048, 3072, or 4096 for RSA. + :type key_size: int + :param curve_name: The elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible + values include: "P-256", "P-384", "P-521", "P-256K". + :type curve_name: str or ~azure.mgmt.keyvault.v2020_04_01_preview.models.JsonWebKeyCurveName + :ivar key_uri: The URI to retrieve the current version of the key. + :vartype key_uri: str + :ivar key_uri_with_version: The URI to retrieve the specific version of the key. + :vartype key_uri_with_version: str + """ + + _validation = { + 'key_uri': {'readonly': True}, + 'key_uri_with_version': {'readonly': True}, + } + + _attribute_map = { + 'attributes': {'key': 'attributes', 'type': 'KeyAttributes'}, + 'kty': {'key': 'kty', 'type': 'str'}, + 'key_ops': {'key': 'keyOps', 'type': '[str]'}, + 'key_size': {'key': 'keySize', 'type': 'int'}, + 'curve_name': {'key': 'curveName', 'type': 'str'}, + 'key_uri': {'key': 'keyUri', 'type': 'str'}, + 'key_uri_with_version': {'key': 'keyUriWithVersion', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(KeyProperties, self).__init__(**kwargs) + self.attributes = kwargs.get('attributes', None) + self.kty = kwargs.get('kty', None) + self.key_ops = kwargs.get('key_ops', None) + self.key_size = kwargs.get('key_size', None) + self.curve_name = kwargs.get('curve_name', None) + self.key_uri = None + self.key_uri_with_version = None + + class LogSpecification(msrest.serialization.Model): """Log specification of operation. @@ -871,51 +1144,6 @@ def __init__( self.id = None -class Resource(msrest.serialization.Model): - """Key Vault resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified identifier of the key vault resource. - :vartype id: str - :ivar name: Name of the key vault resource. - :vartype name: str - :ivar type: Resource type of the key vault resource. - :vartype type: str - :ivar location: Azure location of the key vault resource. - :vartype location: str - :ivar tags: A set of tags. Tags assigned to the key vault resource. - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - **kwargs - ): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.tags = None - - class PrivateEndpointConnection(Resource): """Private endpoint connection resource. @@ -983,6 +1211,8 @@ class PrivateEndpointConnectionItem(msrest.serialization.Model): :param id: Id of private endpoint connection. :type id: str + :param etag: Modified whenever there is a change in the state of private endpoint connection. + :type etag: str :param private_endpoint: Properties of the private endpoint object. :type private_endpoint: ~azure.mgmt.keyvault.v2020_04_01_preview.models.PrivateEndpoint :param private_link_service_connection_state: Approval state of the private link connection. @@ -1000,6 +1230,7 @@ class PrivateEndpointConnectionItem(msrest.serialization.Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, @@ -1011,6 +1242,7 @@ def __init__( ): super(PrivateEndpointConnectionItem, self).__init__(**kwargs) self.id = kwargs.get('id', None) + self.etag = kwargs.get('etag', None) self.private_endpoint = kwargs.get('private_endpoint', None) self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) self.provisioning_state = None @@ -1908,8 +2140,7 @@ class VirtualNetworkRule(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param id: Required. Full resource id of a vnet subnet, such as - '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test- - vnet/subnets/subnet1'. + '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. :type id: str :param ignore_missing_vnet_service_endpoint: Property to specify whether NRP will ignore the check if parent subnet has serviceEndpoints configured. 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 ccc1e18776c3..05f6130e7522 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 @@ -386,6 +386,301 @@ def __init__( self.value = value +class Resource(msrest.serialization.Model): + """Key Vault resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified identifier of the key vault resource. + :vartype id: str + :ivar name: Name of the key vault resource. + :vartype name: str + :ivar type: Resource type of the key vault resource. + :vartype type: str + :ivar location: Azure location of the key vault resource. + :vartype location: str + :ivar tags: A set of tags. Tags assigned to the key vault resource. + :vartype tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__( + self, + **kwargs + ): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None + self.location = None + self.tags = None + + +class Key(Resource): + """The key resource. + + Variables are only populated by the server, and will be ignored when sending a request. + + :ivar id: Fully qualified identifier of the key vault resource. + :vartype id: str + :ivar name: Name of the key vault resource. + :vartype name: str + :ivar type: Resource type of the key vault resource. + :vartype type: str + :ivar location: Azure location of the key vault resource. + :vartype location: str + :ivar tags: A set of tags. Tags assigned to the key vault resource. + :vartype tags: dict[str, str] + :param attributes: The attributes of the key. + :type attributes: ~azure.mgmt.keyvault.v2020_04_01_preview.models.KeyAttributes + :param kty: The type of the key. For valid values, see JsonWebKeyType. Possible values include: + "EC", "EC-HSM", "RSA", "RSA-HSM". + :type kty: str or ~azure.mgmt.keyvault.v2020_04_01_preview.models.JsonWebKeyType + :param key_ops: + :type key_ops: list[str or ~azure.mgmt.keyvault.v2020_04_01_preview.models.JsonWebKeyOperation] + :param key_size: The key size in bits. For example: 2048, 3072, or 4096 for RSA. + :type key_size: int + :param curve_name: The elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible + values include: "P-256", "P-384", "P-521", "P-256K". + :type curve_name: str or ~azure.mgmt.keyvault.v2020_04_01_preview.models.JsonWebKeyCurveName + :ivar key_uri: The URI to retrieve the current version of the key. + :vartype key_uri: str + :ivar key_uri_with_version: The URI to retrieve the specific version of the key. + :vartype key_uri_with_version: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'location': {'readonly': True}, + 'tags': {'readonly': True}, + 'key_uri': {'readonly': True}, + 'key_uri_with_version': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'attributes': {'key': 'properties.attributes', 'type': 'KeyAttributes'}, + 'kty': {'key': 'properties.kty', 'type': 'str'}, + 'key_ops': {'key': 'properties.keyOps', 'type': '[str]'}, + 'key_size': {'key': 'properties.keySize', 'type': 'int'}, + 'curve_name': {'key': 'properties.curveName', 'type': 'str'}, + 'key_uri': {'key': 'properties.keyUri', 'type': 'str'}, + 'key_uri_with_version': {'key': 'properties.keyUriWithVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + attributes: Optional["KeyAttributes"] = None, + kty: Optional[Union[str, "JsonWebKeyType"]] = None, + key_ops: Optional[List[Union[str, "JsonWebKeyOperation"]]] = None, + key_size: Optional[int] = None, + curve_name: Optional[Union[str, "JsonWebKeyCurveName"]] = None, + **kwargs + ): + super(Key, self).__init__(**kwargs) + self.attributes = attributes + self.kty = kty + self.key_ops = key_ops + self.key_size = key_size + self.curve_name = curve_name + self.key_uri = None + self.key_uri_with_version = None + + +class KeyAttributes(msrest.serialization.Model): + """The attributes of the key. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param enabled: Determines whether or not the object is enabled. + :type enabled: bool + :param not_before: Not before date in seconds since 1970-01-01T00:00:00Z. + :type not_before: long + :param expires: Expiry date in seconds since 1970-01-01T00:00:00Z. + :type expires: long + :ivar created: Creation time in seconds since 1970-01-01T00:00:00Z. + :vartype created: long + :ivar updated: Last updated time in seconds since 1970-01-01T00:00:00Z. + :vartype updated: long + :ivar recovery_level: The deletion recovery level currently in effect for the object. If it + contains 'Purgeable', then the object can be permanently deleted by a privileged user; + otherwise, only the system can purge the object at the end of the retention interval. Possible + values include: "Purgeable", "Recoverable+Purgeable", "Recoverable", + "Recoverable+ProtectedSubscription". + :vartype recovery_level: str or + ~azure.mgmt.keyvault.v2020_04_01_preview.models.DeletionRecoveryLevel + """ + + _validation = { + 'created': {'readonly': True}, + 'updated': {'readonly': True}, + 'recovery_level': {'readonly': True}, + } + + _attribute_map = { + 'enabled': {'key': 'enabled', 'type': 'bool'}, + 'not_before': {'key': 'nbf', 'type': 'long'}, + 'expires': {'key': 'exp', 'type': 'long'}, + 'created': {'key': 'created', 'type': 'long'}, + 'updated': {'key': 'updated', 'type': 'long'}, + 'recovery_level': {'key': 'recoveryLevel', 'type': 'str'}, + } + + def __init__( + self, + *, + enabled: Optional[bool] = None, + not_before: Optional[int] = None, + expires: Optional[int] = None, + **kwargs + ): + super(KeyAttributes, self).__init__(**kwargs) + self.enabled = enabled + self.not_before = not_before + self.expires = expires + self.created = None + self.updated = None + self.recovery_level = None + + +class KeyCreateParameters(msrest.serialization.Model): + """The parameters used to create a key. + + All required parameters must be populated in order to send to Azure. + + :param tags: A set of tags. The tags that will be assigned to the key. + :type tags: dict[str, str] + :param properties: Required. The properties of the key to be created. + :type properties: ~azure.mgmt.keyvault.v2020_04_01_preview.models.KeyProperties + """ + + _validation = { + 'properties': {'required': True}, + } + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'KeyProperties'}, + } + + def __init__( + self, + *, + properties: "KeyProperties", + tags: Optional[Dict[str, str]] = None, + **kwargs + ): + super(KeyCreateParameters, self).__init__(**kwargs) + self.tags = tags + self.properties = properties + + +class KeyListResult(msrest.serialization.Model): + """The page of keys. + + :param value: The key resources. + :type value: list[~azure.mgmt.keyvault.v2020_04_01_preview.models.Key] + :param next_link: The URL to get the next page of keys. + :type next_link: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Key]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__( + self, + *, + value: Optional[List["Key"]] = None, + next_link: Optional[str] = None, + **kwargs + ): + super(KeyListResult, self).__init__(**kwargs) + self.value = value + self.next_link = next_link + + +class KeyProperties(msrest.serialization.Model): + """The properties of the key. + + Variables are only populated by the server, and will be ignored when sending a request. + + :param attributes: The attributes of the key. + :type attributes: ~azure.mgmt.keyvault.v2020_04_01_preview.models.KeyAttributes + :param kty: The type of the key. For valid values, see JsonWebKeyType. Possible values include: + "EC", "EC-HSM", "RSA", "RSA-HSM". + :type kty: str or ~azure.mgmt.keyvault.v2020_04_01_preview.models.JsonWebKeyType + :param key_ops: + :type key_ops: list[str or ~azure.mgmt.keyvault.v2020_04_01_preview.models.JsonWebKeyOperation] + :param key_size: The key size in bits. For example: 2048, 3072, or 4096 for RSA. + :type key_size: int + :param curve_name: The elliptic curve name. For valid values, see JsonWebKeyCurveName. Possible + values include: "P-256", "P-384", "P-521", "P-256K". + :type curve_name: str or ~azure.mgmt.keyvault.v2020_04_01_preview.models.JsonWebKeyCurveName + :ivar key_uri: The URI to retrieve the current version of the key. + :vartype key_uri: str + :ivar key_uri_with_version: The URI to retrieve the specific version of the key. + :vartype key_uri_with_version: str + """ + + _validation = { + 'key_uri': {'readonly': True}, + 'key_uri_with_version': {'readonly': True}, + } + + _attribute_map = { + 'attributes': {'key': 'attributes', 'type': 'KeyAttributes'}, + 'kty': {'key': 'kty', 'type': 'str'}, + 'key_ops': {'key': 'keyOps', 'type': '[str]'}, + 'key_size': {'key': 'keySize', 'type': 'int'}, + 'curve_name': {'key': 'curveName', 'type': 'str'}, + 'key_uri': {'key': 'keyUri', 'type': 'str'}, + 'key_uri_with_version': {'key': 'keyUriWithVersion', 'type': 'str'}, + } + + def __init__( + self, + *, + attributes: Optional["KeyAttributes"] = None, + kty: Optional[Union[str, "JsonWebKeyType"]] = None, + key_ops: Optional[List[Union[str, "JsonWebKeyOperation"]]] = None, + key_size: Optional[int] = None, + curve_name: Optional[Union[str, "JsonWebKeyCurveName"]] = None, + **kwargs + ): + super(KeyProperties, self).__init__(**kwargs) + self.attributes = attributes + self.kty = kty + self.key_ops = key_ops + self.key_size = key_size + self.curve_name = curve_name + self.key_uri = None + self.key_uri_with_version = None + + class LogSpecification(msrest.serialization.Model): """Log specification of operation. @@ -961,51 +1256,6 @@ def __init__( self.id = None -class Resource(msrest.serialization.Model): - """Key Vault resource. - - Variables are only populated by the server, and will be ignored when sending a request. - - :ivar id: Fully qualified identifier of the key vault resource. - :vartype id: str - :ivar name: Name of the key vault resource. - :vartype name: str - :ivar type: Resource type of the key vault resource. - :vartype type: str - :ivar location: Azure location of the key vault resource. - :vartype location: str - :ivar tags: A set of tags. Tags assigned to the key vault resource. - :vartype tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__( - self, - **kwargs - ): - super(Resource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.location = None - self.tags = None - - class PrivateEndpointConnection(Resource): """Private endpoint connection resource. @@ -1077,6 +1327,8 @@ class PrivateEndpointConnectionItem(msrest.serialization.Model): :param id: Id of private endpoint connection. :type id: str + :param etag: Modified whenever there is a change in the state of private endpoint connection. + :type etag: str :param private_endpoint: Properties of the private endpoint object. :type private_endpoint: ~azure.mgmt.keyvault.v2020_04_01_preview.models.PrivateEndpoint :param private_link_service_connection_state: Approval state of the private link connection. @@ -1094,6 +1346,7 @@ class PrivateEndpointConnectionItem(msrest.serialization.Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, @@ -1103,12 +1356,14 @@ def __init__( self, *, id: Optional[str] = None, + etag: Optional[str] = None, private_endpoint: Optional["PrivateEndpoint"] = None, private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, **kwargs ): super(PrivateEndpointConnectionItem, self).__init__(**kwargs) self.id = id + self.etag = etag self.private_endpoint = private_endpoint self.private_link_service_connection_state = private_link_service_connection_state self.provisioning_state = None @@ -2101,8 +2356,7 @@ class VirtualNetworkRule(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param id: Required. Full resource id of a vnet subnet, such as - '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test- - vnet/subnets/subnet1'. + '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. :type id: str :param ignore_missing_vnet_service_endpoint: Property to specify whether NRP will ignore the check if parent subnet has serviceEndpoints configured. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/__init__.py index 70bb5851b26c..296660e7d1a6 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/__init__.py @@ -6,6 +6,7 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- +from ._keys_operations import KeysOperations from ._vaults_operations import VaultsOperations from ._private_endpoint_connections_operations import PrivateEndpointConnectionsOperations from ._private_link_resources_operations import PrivateLinkResourcesOperations @@ -14,6 +15,7 @@ from ._managed_hsms_operations import ManagedHsmsOperations __all__ = [ + 'KeysOperations', 'VaultsOperations', 'PrivateEndpointConnectionsOperations', 'PrivateLinkResourcesOperations', diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_keys_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_keys_operations.py new file mode 100644 index 000000000000..0e2d13a935f6 --- /dev/null +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_keys_operations.py @@ -0,0 +1,408 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for license information. +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is regenerated. +# -------------------------------------------------------------------------- +from typing import TYPE_CHECKING +import warnings + +from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error +from azure.core.paging import ItemPaged +from azure.core.pipeline import PipelineResponse +from azure.core.pipeline.transport import HttpRequest, HttpResponse +from azure.mgmt.core.exceptions import ARMErrorFormat + +from .. import models as _models + +if TYPE_CHECKING: + # pylint: disable=unused-import,ungrouped-imports + from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar + + T = TypeVar('T') + ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] + +class KeysOperations(object): + """KeysOperations operations. + + You should not instantiate this class directly. Instead, you should create a Client instance that + instantiates it for you and attaches it as an attribute. + + :ivar models: Alias to model classes used in this operation group. + :type models: ~azure.mgmt.keyvault.v2020_04_01_preview.models + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + """ + + models = _models + + def __init__(self, client, config, serializer, deserializer): + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self._config = config + + def create_if_not_exist( + self, + resource_group_name, # type: str + vault_name, # type: str + key_name, # type: str + parameters, # type: "_models.KeyCreateParameters" + **kwargs # type: Any + ): + # type: (...) -> "_models.Key" + """Creates the first version of a new key if it does not exist. If it already exists, then the + existing key is returned without any write operations being performed. This API does not create + subsequent versions, and does not update existing keys. + + :param resource_group_name: The name of the resource group which contains the specified key + vault. + :type resource_group_name: str + :param vault_name: The name of the key vault which contains the key to be created. + :type vault_name: str + :param key_name: The name of the key to be created. + :type key_name: str + :param parameters: The parameters used to create the specified key. + :type parameters: ~azure.mgmt.keyvault.v2020_04_01_preview.models.KeyCreateParameters + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Key, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2020_04_01_preview.models.Key + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Key"] + 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_if_not_exist.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'keyName': self._serialize.url("key_name", key_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + body_content_kwargs = {} # type: Dict[str, Any] + body_content = self._serialize.body(parameters, 'KeyCreateParameters') + 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 + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Key', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + create_if_not_exist.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}'} # type: ignore + + def get( + self, + resource_group_name, # type: str + vault_name, # type: str + key_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Key" + """Gets the current version of the specified key from the specified key vault. + + :param resource_group_name: The name of the resource group which contains the specified key + vault. + :type resource_group_name: str + :param vault_name: The name of the vault which contains the key to be retrieved. + :type vault_name: str + :param key_name: The name of the key to be retrieved. + :type key_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Key, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2020_04_01_preview.models.Key + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Key"] + 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 + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'keyName': self._serialize.url("key_name", key_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Key', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}'} # type: ignore + + def list( + self, + resource_group_name, # type: str + vault_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.KeyListResult"] + """Lists the keys in the specified key vault. + + :param resource_group_name: The name of the resource group which contains the specified key + vault. + :type resource_group_name: str + :param vault_name: The name of the vault which contains the keys to be retrieved. + :type vault_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either KeyListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.keyvault.v2020_04_01_preview.models.KeyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyListResult"] + 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'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('KeyListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys'} # type: ignore + + def get_version( + self, + resource_group_name, # type: str + vault_name, # type: str + key_name, # type: str + key_version, # type: str + **kwargs # type: Any + ): + # type: (...) -> "_models.Key" + """Gets the specified version of the specified key in the specified key vault. + + :param resource_group_name: The name of the resource group which contains the specified key + vault. + :type resource_group_name: str + :param vault_name: The name of the vault which contains the key version to be retrieved. + :type vault_name: str + :param key_name: The name of the key version to be retrieved. + :type key_name: str + :param key_version: The version of the key to be retrieved. + :type key_version: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: Key, or the result of cls(response) + :rtype: ~azure.mgmt.keyvault.v2020_04_01_preview.models.Key + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.Key"] + 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_version.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'keyName': self._serialize.url("key_name", key_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), + 'keyVersion': self._serialize.url("key_version", key_version, 'str', pattern=r'^[a-fA-F0-9]{32}$'), + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} # type: Dict[str, Any] + header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + deserialized = self._deserialize('Key', pipeline_response) + + if cls: + return cls(pipeline_response, deserialized, {}) + + return deserialized + get_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}/versions/{keyVersion}'} # type: ignore + + def list_versions( + self, + resource_group_name, # type: str + vault_name, # type: str + key_name, # type: str + **kwargs # type: Any + ): + # type: (...) -> Iterable["_models.KeyListResult"] + """Lists the versions of the specified key in the specified key vault. + + :param resource_group_name: The name of the resource group which contains the specified key + vault. + :type resource_group_name: str + :param vault_name: The name of the vault which contains the key versions to be retrieved. + :type vault_name: str + :param key_name: The name of the key versions to be retrieved. + :type key_name: str + :keyword callable cls: A custom type or function that will be passed the direct response + :return: An iterator like instance of either KeyListResult or the result of cls(response) + :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.keyvault.v2020_04_01_preview.models.KeyListResult] + :raises: ~azure.core.exceptions.HttpResponseError + """ + cls = kwargs.pop('cls', None) # type: ClsType["_models.KeyListResult"] + 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'] = self._serialize.header("accept", accept, 'str') + + if not next_link: + # Construct URL + url = self.list_versions.metadata['url'] # type: ignore + path_format_arguments = { + 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), + 'vaultName': self._serialize.url("vault_name", vault_name, 'str', pattern=r'^[a-zA-Z0-9-]{3,24}$'), + 'keyName': self._serialize.url("key_name", key_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), + } + url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} # type: Dict[str, Any] + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + request = self._client.get(url, query_parameters, header_parameters) + else: + url = next_link + query_parameters = {} # type: Dict[str, Any] + request = self._client.get(url, query_parameters, header_parameters) + return request + + def extract_data(pipeline_response): + deserialized = self._deserialize('KeyListResult', pipeline_response) + list_of_elem = deserialized.value + if cls: + list_of_elem = cls(list_of_elem) + return deserialized.next_link or None, iter(list_of_elem) + + def get_next(next_link=None): + request = prepare_request(next_link) + + pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) + response = pipeline_response.http_response + + if response.status_code not in [200]: + map_error(status_code=response.status_code, response=response, error_map=error_map) + raise HttpResponseError(response=response, error_format=ARMErrorFormat) + + return pipeline_response + + return ItemPaged( + get_next, extract_data + ) + list_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}/versions'} # type: ignore 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 062af974b272..606ac7e1077c 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 @@ -124,8 +124,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.keyvault.v2020_04_01_preview.models.ManagedHsm :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ManagedHsm or the result of cls(response) @@ -255,8 +255,8 @@ def begin_update( :type parameters: ~azure.mgmt.keyvault.v2020_04_01_preview.models.ManagedHsm :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ManagedHsm or the result of cls(response) @@ -370,8 +370,8 @@ def begin_delete( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) diff --git a/sdk/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 80eb802fe9cb..24fc5832cac5 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 @@ -263,8 +263,8 @@ def begin_delete( :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. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) 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 f421472dff25..f212d3172205 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 @@ -123,8 +123,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.keyvault.v2020_04_01_preview.models.VaultCreateOrUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Vault or the result of cls(response) @@ -773,8 +773,8 @@ def begin_purge_deleted( :type location: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -844,7 +844,7 @@ def list( } error_map.update(kwargs.pop('error_map', {})) filter = "resourceType eq 'Microsoft.KeyVault/vaults'" - api_version = "2020-04-01-preview" + api_version = "2015-11-01" accept = "application/json" def prepare_request(next_link=None): diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/_version.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/_version.py index b77ac9246082..e5754a47ce68 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/_version.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/_version.py @@ -6,4 +6,4 @@ # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- -VERSION = "9.0.0" +VERSION = "1.0.0b1" diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_managed_hsms_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_managed_hsms_operations.py index 331a5c253681..a61e2fba8456 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_managed_hsms_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_managed_hsms_operations.py @@ -48,7 +48,7 @@ async def _create_or_update_initial( resource_group_name: str, name: str, parameters: "_models.ManagedHsm", - **kwargs + **kwargs: Any ) -> "_models.ManagedHsm": cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedHsm"] error_map = { @@ -106,7 +106,7 @@ async def begin_create_or_update( resource_group_name: str, name: str, parameters: "_models.ManagedHsm", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ManagedHsm"]: """Create or update a managed HSM Pool in the specified subscription. @@ -118,8 +118,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.keyvault.v2021_04_01_preview.models.ManagedHsm :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ManagedHsm or the result of cls(response) @@ -177,7 +177,7 @@ async def _update_initial( resource_group_name: str, name: str, parameters: "_models.ManagedHsm", - **kwargs + **kwargs: Any ) -> "_models.ManagedHsm": cls = kwargs.pop('cls', None) # type: ClsType["_models.ManagedHsm"] error_map = { @@ -235,7 +235,7 @@ async def begin_update( resource_group_name: str, name: str, parameters: "_models.ManagedHsm", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.ManagedHsm"]: """Update a managed HSM Pool in the specified subscription. @@ -247,8 +247,8 @@ async def begin_update( :type parameters: ~azure.mgmt.keyvault.v2021_04_01_preview.models.ManagedHsm :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either ManagedHsm or the result of cls(response) @@ -305,7 +305,7 @@ async def _delete_initial( self, resource_group_name: str, name: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -350,7 +350,7 @@ async def begin_delete( self, resource_group_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Deletes the specified managed HSM Pool. @@ -360,8 +360,8 @@ async def begin_delete( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -414,7 +414,7 @@ async def get( self, resource_group_name: str, name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.ManagedHsm"]: """Gets the specified managed HSM Pool. @@ -475,7 +475,7 @@ def list_by_resource_group( self, resource_group_name: str, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ManagedHsmListResult"]: """The List operation gets information about the managed HSM Pools associated with the subscription and within the specified resource group. @@ -551,7 +551,7 @@ async def get_next(next_link=None): def list_by_subscription( self, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ManagedHsmListResult"]: """The List operation gets information about the managed HSM Pools associated with the subscription. @@ -623,7 +623,7 @@ async def get_next(next_link=None): def list_deleted( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DeletedManagedHsmListResult"]: """The List operation gets information about the deleted managed HSMs associated with the subscription. @@ -693,7 +693,7 @@ async def get_deleted( self, name: str, location: str, - **kwargs + **kwargs: Any ) -> "_models.DeletedManagedHsm": """Gets the specified deleted managed HSM. @@ -752,7 +752,7 @@ async def _purge_deleted_initial( self, name: str, location: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -797,7 +797,7 @@ async def begin_purge_deleted( self, name: str, location: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Permanently deletes the specified managed HSM. @@ -807,8 +807,8 @@ async def begin_purge_deleted( :type location: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_mhsm_private_endpoint_connections_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_mhsm_private_endpoint_connections_operations.py index a303e5879ac5..a84c039820b8 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_mhsm_private_endpoint_connections_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_mhsm_private_endpoint_connections_operations.py @@ -47,7 +47,7 @@ def list_by_resource( self, resource_group_name: str, name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.MHSMPrivateEndpointConnectionsListResult"]: """The List operation gets information about the private endpoint connections associated with the managed HSM Pool. @@ -124,7 +124,7 @@ async def get( resource_group_name: str, name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> "_models.MHSMPrivateEndpointConnection": """Gets the specified private endpoint connection associated with the managed HSM Pool. @@ -189,7 +189,7 @@ async def put( name: str, private_endpoint_connection_name: str, properties: "_models.MHSMPrivateEndpointConnection", - **kwargs + **kwargs: Any ) -> "_models.MHSMPrivateEndpointConnection": """Updates the specified private endpoint connection associated with the managed hsm pool. @@ -262,7 +262,7 @@ async def _delete_initial( resource_group_name: str, name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.MHSMPrivateEndpointConnection"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.MHSMPrivateEndpointConnection"]] error_map = { @@ -318,7 +318,7 @@ async def begin_delete( resource_group_name: str, name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.MHSMPrivateEndpointConnection"]: """Deletes the specified private endpoint connection associated with the managed hsm pool. @@ -331,8 +331,8 @@ async def begin_delete( :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. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either MHSMPrivateEndpointConnection or the result of cls(response) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_mhsm_private_link_resources_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_mhsm_private_link_resources_operations.py index 09382c7e6df8..2677eddf6853 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_mhsm_private_link_resources_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_mhsm_private_link_resources_operations.py @@ -44,7 +44,7 @@ async def list_by_mhsm_resource( self, resource_group_name: str, name: str, - **kwargs + **kwargs: Any ) -> "_models.MHSMPrivateLinkResourceListResult": """Gets the private link resources supported for the managed hsm pool. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_operations.py index 0f8150c26439..35ec90d9c814 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_operations.py @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None: def list( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.OperationListResult"]: """Lists all of the available Key Vault Rest API operations. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_private_endpoint_connections_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_private_endpoint_connections_operations.py index 601a4ed10a74..051490670aae 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_private_endpoint_connections_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_private_endpoint_connections_operations.py @@ -48,7 +48,7 @@ async def get( resource_group_name: str, vault_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.PrivateEndpointConnection"]: """Gets the specified private endpoint connection associated with the key vault. @@ -114,7 +114,7 @@ async def put( vault_name: str, private_endpoint_connection_name: str, properties: "_models.PrivateEndpointConnection", - **kwargs + **kwargs: Any ) -> "_models.PrivateEndpointConnection": """Updates the specified private endpoint connection associated with the key vault. @@ -187,7 +187,7 @@ async def _delete_initial( resource_group_name: str, vault_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> Optional["_models.PrivateEndpointConnection"]: cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.PrivateEndpointConnection"]] error_map = { @@ -243,7 +243,7 @@ async def begin_delete( resource_group_name: str, vault_name: str, private_endpoint_connection_name: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.PrivateEndpointConnection"]: """Deletes the specified private endpoint connection associated with the key vault. @@ -256,8 +256,8 @@ async def begin_delete( :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. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either PrivateEndpointConnection or the result of cls(response) @@ -315,7 +315,7 @@ def list_by_resource( self, resource_group_name: str, vault_name: str, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.PrivateEndpointConnectionListResult"]: """The List operation gets information about the private endpoint connections associated with the vault. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_private_link_resources_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_private_link_resources_operations.py index 6dd88a01b436..5d70c3b7dc7c 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_private_link_resources_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_private_link_resources_operations.py @@ -44,7 +44,7 @@ async def list_by_vault( self, resource_group_name: str, vault_name: str, - **kwargs + **kwargs: Any ) -> "_models.PrivateLinkResourceListResult": """Gets the private link resources supported for the key vault. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_secrets_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_secrets_operations.py index 720a3001a206..cb5405b64c65 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_secrets_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_secrets_operations.py @@ -47,7 +47,7 @@ async def create_or_update( vault_name: str, secret_name: str, parameters: "_models.SecretCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Secret": """Create or update a secret in a key vault in the specified subscription. NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for @@ -123,7 +123,7 @@ async def update( vault_name: str, secret_name: str, parameters: "_models.SecretPatchParameters", - **kwargs + **kwargs: Any ) -> "_models.Secret": """Update a secret in the specified subscription. NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault @@ -198,7 +198,7 @@ async def get( resource_group_name: str, vault_name: str, secret_name: str, - **kwargs + **kwargs: Any ) -> "_models.Secret": """Gets the specified secret. NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for interaction with vault secrets. @@ -261,7 +261,7 @@ def list( resource_group_name: str, vault_name: str, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.SecretListResult"]: """The List operation gets information about the secrets in a vault. NOTE: This API is intended for internal use in ARM deployments. Users should use the data-plane REST service for diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_vaults_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_vaults_operations.py index 8e07cea2c430..74d526eb383b 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_vaults_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_vaults_operations.py @@ -48,7 +48,7 @@ async def _create_or_update_initial( resource_group_name: str, vault_name: str, parameters: "_models.VaultCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> "_models.Vault": cls = kwargs.pop('cls', None) # type: ClsType["_models.Vault"] error_map = { @@ -105,7 +105,7 @@ async def begin_create_or_update( resource_group_name: str, vault_name: str, parameters: "_models.VaultCreateOrUpdateParameters", - **kwargs + **kwargs: Any ) -> AsyncLROPoller["_models.Vault"]: """Create or update a key vault in the specified subscription. @@ -117,8 +117,8 @@ async def begin_create_or_update( :type parameters: ~azure.mgmt.keyvault.v2021_04_01_preview.models.VaultCreateOrUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either Vault or the result of cls(response) @@ -176,7 +176,7 @@ async def update( resource_group_name: str, vault_name: str, parameters: "_models.VaultPatchParameters", - **kwargs + **kwargs: Any ) -> "_models.Vault": """Update a key vault in the specified subscription. @@ -245,7 +245,7 @@ async def delete( self, resource_group_name: str, vault_name: str, - **kwargs + **kwargs: Any ) -> None: """Deletes the specified Azure key vault. @@ -300,7 +300,7 @@ async def get( self, resource_group_name: str, vault_name: str, - **kwargs + **kwargs: Any ) -> "_models.Vault": """Gets the specified Azure key vault. @@ -360,7 +360,7 @@ async def update_access_policy( vault_name: str, operation_kind: Union[str, "_models.AccessPolicyUpdateKind"], parameters: "_models.VaultAccessPolicyParameters", - **kwargs + **kwargs: Any ) -> "_models.VaultAccessPolicyParameters": """Update access policies in a key vault in the specified subscription. @@ -432,7 +432,7 @@ def list_by_resource_group( self, resource_group_name: str, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.VaultListResult"]: """The List operation gets information about the vaults associated with the subscription and within the specified resource group. @@ -507,7 +507,7 @@ async def get_next(next_link=None): def list_by_subscription( self, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.VaultListResult"]: """The List operation gets information about the vaults associated with the subscription. @@ -577,7 +577,7 @@ async def get_next(next_link=None): def list_deleted( self, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.DeletedVaultListResult"]: """Gets information about the deleted vaults in a subscription. @@ -645,7 +645,7 @@ async def get_deleted( self, vault_name: str, location: str, - **kwargs + **kwargs: Any ) -> "_models.DeletedVault": """Gets the deleted Azure key vault. @@ -703,7 +703,7 @@ async def _purge_deleted_initial( self, vault_name: str, location: str, - **kwargs + **kwargs: Any ) -> None: cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { @@ -747,7 +747,7 @@ async def begin_purge_deleted( self, vault_name: str, location: str, - **kwargs + **kwargs: Any ) -> AsyncLROPoller[None]: """Permanently deletes the specified vault. aka Purges the deleted Azure key vault. @@ -757,8 +757,8 @@ async def begin_purge_deleted( :type location: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the AsyncARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be AsyncARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of AsyncLROPoller that returns either None or the result of cls(response) @@ -810,7 +810,7 @@ def get_long_running_output(pipeline_response): def list( self, top: Optional[int] = None, - **kwargs + **kwargs: Any ) -> AsyncIterable["_models.ResourceListResult"]: """The List operation gets information about the vaults associated with the subscription. @@ -883,7 +883,7 @@ async def get_next(next_link=None): async def check_name_availability( self, vault_name: "_models.VaultCheckNameAvailabilityParameters", - **kwargs + **kwargs: Any ) -> "_models.CheckNameAvailabilityResult": """Checks that the vault name is valid and is not already in use. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/models/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/models/__init__.py index 1dd5be1732bf..74f6fc52e461 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/models/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/models/__init__.py @@ -17,6 +17,7 @@ from ._models_py3 import DeletedVault from ._models_py3 import DeletedVaultListResult from ._models_py3 import DeletedVaultProperties + from ._models_py3 import DimensionProperties from ._models_py3 import Error from ._models_py3 import IPRule from ._models_py3 import LogSpecification @@ -36,6 +37,7 @@ from ._models_py3 import ManagedHsmProperties from ._models_py3 import ManagedHsmResource from ._models_py3 import ManagedHsmSku + from ._models_py3 import MetricSpecification from ._models_py3 import NetworkRuleSet from ._models_py3 import Operation from ._models_py3 import OperationDisplay @@ -81,6 +83,7 @@ from ._models import DeletedVault # type: ignore from ._models import DeletedVaultListResult # type: ignore from ._models import DeletedVaultProperties # type: ignore + from ._models import DimensionProperties # type: ignore from ._models import Error # type: ignore from ._models import IPRule # type: ignore from ._models import LogSpecification # type: ignore @@ -100,6 +103,7 @@ from ._models import ManagedHsmProperties # type: ignore from ._models import ManagedHsmResource # type: ignore from ._models import ManagedHsmSku # type: ignore + from ._models import MetricSpecification # type: ignore from ._models import NetworkRuleSet # type: ignore from ._models import Operation # type: ignore from ._models import OperationDisplay # type: ignore @@ -169,6 +173,7 @@ 'DeletedVault', 'DeletedVaultListResult', 'DeletedVaultProperties', + 'DimensionProperties', 'Error', 'IPRule', 'LogSpecification', @@ -188,6 +193,7 @@ 'ManagedHsmProperties', 'ManagedHsmResource', 'ManagedHsmSku', + 'MetricSpecification', 'NetworkRuleSet', 'Operation', 'OperationDisplay', diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/models/_models.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/models/_models.py index 30fe169da585..751711ef30bc 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/models/_models.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/models/_models.py @@ -381,6 +381,34 @@ def __init__( self.purge_protection_enabled = None +class DimensionProperties(msrest.serialization.Model): + """Type of operation: get, read, delete, etc. + + :param name: Name of dimension. + :type name: str + :param display_name: Display name of dimension. + :type display_name: str + :param to_be_exported_for_shoebox: Property to specify whether the dimension should be exported + for Shoebox. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__( + self, + **kwargs + ): + super(DimensionProperties, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.to_be_exported_for_shoebox = kwargs.get('to_be_exported_for_shoebox', None) + + class Error(msrest.serialization.Model): """The server error. @@ -746,6 +774,66 @@ def __init__( self.name = kwargs['name'] +class MetricSpecification(msrest.serialization.Model): + """Metric specification of operation. + + :param name: Name of metric specification. + :type name: str + :param display_name: Display name of metric specification. + :type display_name: str + :param display_description: Display description of metric specification. + :type display_description: str + :param unit: The metric unit. Possible values include: 'Bytes', 'Count', 'Milliseconds'. + :type unit: str + :param aggregation_type: The metric aggregation type. Possible values include: 'Average', + 'Count', 'Total'. + :type aggregation_type: str + :param supported_aggregation_types: The supported aggregation types for the metrics. + :type supported_aggregation_types: list[str] + :param supported_time_grain_types: The supported time grain types for the metrics. + :type supported_time_grain_types: list[str] + :param lock_aggregation_type: The metric lock aggregation type. + :type lock_aggregation_type: str + :param dimensions: The dimensions of metric. + :type dimensions: list[~azure.mgmt.keyvault.v2021_04_01_preview.models.DimensionProperties] + :param fill_gap_with_zero: Property to specify whether to fill gap with zero. + :type fill_gap_with_zero: bool + :param internal_metric_name: The internal metric name. + :type internal_metric_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'lock_aggregation_type': {'key': 'lockAggregationType', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[DimensionProperties]'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'internal_metric_name': {'key': 'internalMetricName', 'type': 'str'}, + } + + def __init__( + self, + **kwargs + ): + super(MetricSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.display_description = kwargs.get('display_description', None) + self.unit = kwargs.get('unit', None) + self.aggregation_type = kwargs.get('aggregation_type', None) + self.supported_aggregation_types = kwargs.get('supported_aggregation_types', None) + self.supported_time_grain_types = kwargs.get('supported_time_grain_types', None) + self.lock_aggregation_type = kwargs.get('lock_aggregation_type', None) + self.dimensions = kwargs.get('dimensions', None) + self.fill_gap_with_zero = kwargs.get('fill_gap_with_zero', None) + self.internal_metric_name = kwargs.get('internal_metric_name', None) + + class MHSMIPRule(msrest.serialization.Model): """A rule governing the accessibility of a managed hsm pool from a specific ip address or ip range. @@ -1067,8 +1155,7 @@ class MHSMVirtualNetworkRule(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param id: Required. Full resource id of a vnet subnet, such as - '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test- - vnet/subnets/subnet1'. + '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. :type id: str """ @@ -1378,6 +1465,10 @@ def __init__( class PrivateEndpointConnectionItem(msrest.serialization.Model): """Private endpoint connection item. + :param id: Id of private endpoint connection. + :type id: str + :param etag: Modified whenever there is a change in the state of private endpoint connection. + :type etag: str :param private_endpoint: Properties of the private endpoint object. :type private_endpoint: ~azure.mgmt.keyvault.v2021_04_01_preview.models.PrivateEndpoint :param private_link_service_connection_state: Approval state of the private link connection. @@ -1390,6 +1481,8 @@ class PrivateEndpointConnectionItem(msrest.serialization.Model): """ _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, @@ -1400,6 +1493,8 @@ def __init__( **kwargs ): super(PrivateEndpointConnectionItem, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.etag = kwargs.get('etag', None) self.private_endpoint = kwargs.get('private_endpoint', None) self.private_link_service_connection_state = kwargs.get('private_link_service_connection_state', None) self.provisioning_state = kwargs.get('provisioning_state', None) @@ -1790,10 +1885,14 @@ class ServiceSpecification(msrest.serialization.Model): :param log_specifications: Log specifications of operation. :type log_specifications: list[~azure.mgmt.keyvault.v2021_04_01_preview.models.LogSpecification] + :param metric_specifications: Metric specifications of operation. + :type metric_specifications: + list[~azure.mgmt.keyvault.v2021_04_01_preview.models.MetricSpecification] """ _attribute_map = { 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, } def __init__( @@ -1802,6 +1901,7 @@ def __init__( ): super(ServiceSpecification, self).__init__(**kwargs) self.log_specifications = kwargs.get('log_specifications', None) + self.metric_specifications = kwargs.get('metric_specifications', None) class Sku(msrest.serialization.Model): @@ -2218,6 +2318,8 @@ class VaultProperties(msrest.serialization.Model): :type access_policies: list[~azure.mgmt.keyvault.v2021_04_01_preview.models.AccessPolicyEntry] :param vault_uri: The URI of the vault for performing operations on keys and secrets. :type vault_uri: str + :ivar hsm_pool_resource_id: The resource id of HSM Pool. + :vartype hsm_pool_resource_id: str :param enabled_for_deployment: Property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault. :type enabled_for_deployment: bool @@ -2266,6 +2368,7 @@ class VaultProperties(msrest.serialization.Model): _validation = { 'tenant_id': {'required': True}, 'sku': {'required': True}, + 'hsm_pool_resource_id': {'readonly': True}, 'private_endpoint_connections': {'readonly': True}, } @@ -2274,6 +2377,7 @@ class VaultProperties(msrest.serialization.Model): 'sku': {'key': 'sku', 'type': 'Sku'}, 'access_policies': {'key': 'accessPolicies', 'type': '[AccessPolicyEntry]'}, 'vault_uri': {'key': 'vaultUri', 'type': 'str'}, + 'hsm_pool_resource_id': {'key': 'hsmPoolResourceId', 'type': 'str'}, 'enabled_for_deployment': {'key': 'enabledForDeployment', 'type': 'bool'}, 'enabled_for_disk_encryption': {'key': 'enabledForDiskEncryption', 'type': 'bool'}, 'enabled_for_template_deployment': {'key': 'enabledForTemplateDeployment', 'type': 'bool'}, @@ -2296,6 +2400,7 @@ def __init__( self.sku = kwargs['sku'] self.access_policies = kwargs.get('access_policies', None) self.vault_uri = kwargs.get('vault_uri', None) + self.hsm_pool_resource_id = None self.enabled_for_deployment = kwargs.get('enabled_for_deployment', None) self.enabled_for_disk_encryption = kwargs.get('enabled_for_disk_encryption', None) self.enabled_for_template_deployment = kwargs.get('enabled_for_template_deployment', None) @@ -2315,9 +2420,11 @@ class VirtualNetworkRule(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param id: Required. Full resource id of a vnet subnet, such as - '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test- - vnet/subnets/subnet1'. + '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. :type id: str + :param ignore_missing_vnet_service_endpoint: Property to specify whether NRP will ignore the + check if parent subnet has serviceEndpoints configured. + :type ignore_missing_vnet_service_endpoint: bool """ _validation = { @@ -2326,6 +2433,7 @@ class VirtualNetworkRule(msrest.serialization.Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, } def __init__( @@ -2334,3 +2442,4 @@ def __init__( ): super(VirtualNetworkRule, self).__init__(**kwargs) self.id = kwargs['id'] + self.ignore_missing_vnet_service_endpoint = kwargs.get('ignore_missing_vnet_service_endpoint', None) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/models/_models_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/models/_models_py3.py index e66f8231e3ec..b85d85a0d2e6 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/models/_models_py3.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/models/_models_py3.py @@ -408,6 +408,38 @@ def __init__( self.purge_protection_enabled = None +class DimensionProperties(msrest.serialization.Model): + """Type of operation: get, read, delete, etc. + + :param name: Name of dimension. + :type name: str + :param display_name: Display name of dimension. + :type display_name: str + :param to_be_exported_for_shoebox: Property to specify whether the dimension should be exported + for Shoebox. + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + to_be_exported_for_shoebox: Optional[bool] = None, + **kwargs + ): + super(DimensionProperties, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.to_be_exported_for_shoebox = to_be_exported_for_shoebox + + class Error(msrest.serialization.Model): """The server error. @@ -803,6 +835,78 @@ def __init__( self.name = name +class MetricSpecification(msrest.serialization.Model): + """Metric specification of operation. + + :param name: Name of metric specification. + :type name: str + :param display_name: Display name of metric specification. + :type display_name: str + :param display_description: Display description of metric specification. + :type display_description: str + :param unit: The metric unit. Possible values include: 'Bytes', 'Count', 'Milliseconds'. + :type unit: str + :param aggregation_type: The metric aggregation type. Possible values include: 'Average', + 'Count', 'Total'. + :type aggregation_type: str + :param supported_aggregation_types: The supported aggregation types for the metrics. + :type supported_aggregation_types: list[str] + :param supported_time_grain_types: The supported time grain types for the metrics. + :type supported_time_grain_types: list[str] + :param lock_aggregation_type: The metric lock aggregation type. + :type lock_aggregation_type: str + :param dimensions: The dimensions of metric. + :type dimensions: list[~azure.mgmt.keyvault.v2021_04_01_preview.models.DimensionProperties] + :param fill_gap_with_zero: Property to specify whether to fill gap with zero. + :type fill_gap_with_zero: bool + :param internal_metric_name: The internal metric name. + :type internal_metric_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'supported_aggregation_types': {'key': 'supportedAggregationTypes', 'type': '[str]'}, + 'supported_time_grain_types': {'key': 'supportedTimeGrainTypes', 'type': '[str]'}, + 'lock_aggregation_type': {'key': 'lockAggregationType', 'type': 'str'}, + 'dimensions': {'key': 'dimensions', 'type': '[DimensionProperties]'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'internal_metric_name': {'key': 'internalMetricName', 'type': 'str'}, + } + + def __init__( + self, + *, + name: Optional[str] = None, + display_name: Optional[str] = None, + display_description: Optional[str] = None, + unit: Optional[str] = None, + aggregation_type: Optional[str] = None, + supported_aggregation_types: Optional[List[str]] = None, + supported_time_grain_types: Optional[List[str]] = None, + lock_aggregation_type: Optional[str] = None, + dimensions: Optional[List["DimensionProperties"]] = None, + fill_gap_with_zero: Optional[bool] = None, + internal_metric_name: Optional[str] = None, + **kwargs + ): + super(MetricSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.display_description = display_description + self.unit = unit + self.aggregation_type = aggregation_type + self.supported_aggregation_types = supported_aggregation_types + self.supported_time_grain_types = supported_time_grain_types + self.lock_aggregation_type = lock_aggregation_type + self.dimensions = dimensions + self.fill_gap_with_zero = fill_gap_with_zero + self.internal_metric_name = internal_metric_name + + class MHSMIPRule(msrest.serialization.Model): """A rule governing the accessibility of a managed hsm pool from a specific ip address or ip range. @@ -1157,8 +1261,7 @@ class MHSMVirtualNetworkRule(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param id: Required. Full resource id of a vnet subnet, such as - '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test- - vnet/subnets/subnet1'. + '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. :type id: str """ @@ -1499,6 +1602,10 @@ def __init__( class PrivateEndpointConnectionItem(msrest.serialization.Model): """Private endpoint connection item. + :param id: Id of private endpoint connection. + :type id: str + :param etag: Modified whenever there is a change in the state of private endpoint connection. + :type etag: str :param private_endpoint: Properties of the private endpoint object. :type private_endpoint: ~azure.mgmt.keyvault.v2021_04_01_preview.models.PrivateEndpoint :param private_link_service_connection_state: Approval state of the private link connection. @@ -1511,6 +1618,8 @@ class PrivateEndpointConnectionItem(msrest.serialization.Model): """ _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, 'private_endpoint': {'key': 'properties.privateEndpoint', 'type': 'PrivateEndpoint'}, 'private_link_service_connection_state': {'key': 'properties.privateLinkServiceConnectionState', 'type': 'PrivateLinkServiceConnectionState'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, @@ -1519,12 +1628,16 @@ class PrivateEndpointConnectionItem(msrest.serialization.Model): def __init__( self, *, + id: Optional[str] = None, + etag: Optional[str] = None, private_endpoint: Optional["PrivateEndpoint"] = None, private_link_service_connection_state: Optional["PrivateLinkServiceConnectionState"] = None, provisioning_state: Optional[Union[str, "PrivateEndpointConnectionProvisioningState"]] = None, **kwargs ): super(PrivateEndpointConnectionItem, self).__init__(**kwargs) + self.id = id + self.etag = etag self.private_endpoint = private_endpoint self.private_link_service_connection_state = private_link_service_connection_state self.provisioning_state = provisioning_state @@ -1952,20 +2065,26 @@ class ServiceSpecification(msrest.serialization.Model): :param log_specifications: Log specifications of operation. :type log_specifications: list[~azure.mgmt.keyvault.v2021_04_01_preview.models.LogSpecification] + :param metric_specifications: Metric specifications of operation. + :type metric_specifications: + list[~azure.mgmt.keyvault.v2021_04_01_preview.models.MetricSpecification] """ _attribute_map = { 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, } def __init__( self, *, log_specifications: Optional[List["LogSpecification"]] = None, + metric_specifications: Optional[List["MetricSpecification"]] = None, **kwargs ): super(ServiceSpecification, self).__init__(**kwargs) self.log_specifications = log_specifications + self.metric_specifications = metric_specifications class Sku(msrest.serialization.Model): @@ -2425,6 +2544,8 @@ class VaultProperties(msrest.serialization.Model): :type access_policies: list[~azure.mgmt.keyvault.v2021_04_01_preview.models.AccessPolicyEntry] :param vault_uri: The URI of the vault for performing operations on keys and secrets. :type vault_uri: str + :ivar hsm_pool_resource_id: The resource id of HSM Pool. + :vartype hsm_pool_resource_id: str :param enabled_for_deployment: Property to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault. :type enabled_for_deployment: bool @@ -2473,6 +2594,7 @@ class VaultProperties(msrest.serialization.Model): _validation = { 'tenant_id': {'required': True}, 'sku': {'required': True}, + 'hsm_pool_resource_id': {'readonly': True}, 'private_endpoint_connections': {'readonly': True}, } @@ -2481,6 +2603,7 @@ class VaultProperties(msrest.serialization.Model): 'sku': {'key': 'sku', 'type': 'Sku'}, 'access_policies': {'key': 'accessPolicies', 'type': '[AccessPolicyEntry]'}, 'vault_uri': {'key': 'vaultUri', 'type': 'str'}, + 'hsm_pool_resource_id': {'key': 'hsmPoolResourceId', 'type': 'str'}, 'enabled_for_deployment': {'key': 'enabledForDeployment', 'type': 'bool'}, 'enabled_for_disk_encryption': {'key': 'enabledForDiskEncryption', 'type': 'bool'}, 'enabled_for_template_deployment': {'key': 'enabledForTemplateDeployment', 'type': 'bool'}, @@ -2518,6 +2641,7 @@ def __init__( self.sku = sku self.access_policies = access_policies self.vault_uri = vault_uri + self.hsm_pool_resource_id = None self.enabled_for_deployment = enabled_for_deployment self.enabled_for_disk_encryption = enabled_for_disk_encryption self.enabled_for_template_deployment = enabled_for_template_deployment @@ -2537,9 +2661,11 @@ class VirtualNetworkRule(msrest.serialization.Model): All required parameters must be populated in order to send to Azure. :param id: Required. Full resource id of a vnet subnet, such as - '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test- - vnet/subnets/subnet1'. + '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. :type id: str + :param ignore_missing_vnet_service_endpoint: Property to specify whether NRP will ignore the + check if parent subnet has serviceEndpoints configured. + :type ignore_missing_vnet_service_endpoint: bool """ _validation = { @@ -2548,13 +2674,16 @@ class VirtualNetworkRule(msrest.serialization.Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, + 'ignore_missing_vnet_service_endpoint': {'key': 'ignoreMissingVnetServiceEndpoint', 'type': 'bool'}, } def __init__( self, *, id: str, + ignore_missing_vnet_service_endpoint: Optional[bool] = None, **kwargs ): super(VirtualNetworkRule, self).__init__(**kwargs) self.id = id + self.ignore_missing_vnet_service_endpoint = ignore_missing_vnet_service_endpoint diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/operations/_managed_hsms_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/operations/_managed_hsms_operations.py index d3f2959ca17e..35ae533ecb32 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/operations/_managed_hsms_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/operations/_managed_hsms_operations.py @@ -124,8 +124,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.keyvault.v2021_04_01_preview.models.ManagedHsm :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ManagedHsm or the result of cls(response) @@ -255,8 +255,8 @@ def begin_update( :type parameters: ~azure.mgmt.keyvault.v2021_04_01_preview.models.ManagedHsm :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either ManagedHsm or the result of cls(response) @@ -370,8 +370,8 @@ def begin_delete( :type name: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) @@ -824,8 +824,8 @@ def begin_purge_deleted( :type location: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/operations/_mhsm_private_endpoint_connections_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/operations/_mhsm_private_endpoint_connections_operations.py index f9fda8e6cdf5..91e7b70165df 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/operations/_mhsm_private_endpoint_connections_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/operations/_mhsm_private_endpoint_connections_operations.py @@ -340,8 +340,8 @@ def begin_delete( :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. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either MHSMPrivateEndpointConnection or the result of cls(response) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/operations/_private_endpoint_connections_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/operations/_private_endpoint_connections_operations.py index fab3f627d9f0..d2a6e50bd6a4 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/operations/_private_endpoint_connections_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/operations/_private_endpoint_connections_operations.py @@ -264,8 +264,8 @@ def begin_delete( :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. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either PrivateEndpointConnection or the result of cls(response) diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/operations/_vaults_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/operations/_vaults_operations.py index 44138fa5c677..d77e87be3933 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/operations/_vaults_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/operations/_vaults_operations.py @@ -123,8 +123,8 @@ def begin_create_or_update( :type parameters: ~azure.mgmt.keyvault.v2021_04_01_preview.models.VaultCreateOrUpdateParameters :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either Vault or the result of cls(response) @@ -773,8 +773,8 @@ def begin_purge_deleted( :type location: str :keyword callable cls: A custom type or function that will be passed the direct response :keyword str continuation_token: A continuation token to restart a poller from a saved state. - :keyword polling: Pass in True if you'd like the ARMPolling polling method, - False for no polling, or your own initialized polling object for a personal polling strategy. + :keyword polling: By default, your polling method will be ARMPolling. + Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy. :paramtype polling: bool or ~azure.core.polling.PollingMethod :keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present. :return: An instance of LROPoller that returns either None or the result of cls(response)