diff --git a/sdk/keyvault/azure-mgmt-keyvault/_meta.json b/sdk/keyvault/azure-mgmt-keyvault/_meta.json index d37df2680dc4..9bb0896a5b16 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.1", + "@autorest/modelerfour@4.19.2" + ], + "commit": "954bf4ebc679ba55a6cacb39dbdacdbb956359f2", "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.1 --use=@autorest/modelerfour@4.19.2 --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..da7b7fa9efbe 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))) @@ -243,13 +246,10 @@ def secrets(self): """Instance depends on the API version: * 2020-04-01-preview: :class:`SecretsOperations` - * 2021-04-01-preview: :class:`SecretsOperations` """ api_version = self._get_api_version('secrets') if api_version == '2020-04-01-preview': from .v2020_04_01_preview.operations import SecretsOperations as OperationClass - elif api_version == '2021-04-01-preview': - from .v2021_04_01_preview.operations import SecretsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'secrets'".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..fa7afc6810ae 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))) @@ -241,13 +244,10 @@ def secrets(self): """Instance depends on the API version: * 2020-04-01-preview: :class:`SecretsOperations` - * 2021-04-01-preview: :class:`SecretsOperations` """ api_version = self._get_api_version('secrets') if api_version == '2020-04-01-preview': from ..v2020_04_01_preview.aio.operations import SecretsOperations as OperationClass - elif api_version == '2021-04-01-preview': - from ..v2021_04_01_preview.aio.operations import SecretsOperations as OperationClass else: raise ValueError("API version {} does not have operation group 'secrets'".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/models/_models.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_models.py index a79b444664cc..cc5ba5da4cf9 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_models.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_models.py @@ -587,7 +587,7 @@ class VaultCheckNameAvailabilityParameters(msrest.serialization.Model): :param name: Required. The vault name. :type name: str - :ivar type: Required. The type of resource, Microsoft.KeyVault/vaults. Default value: + :ivar type: The type of resource, Microsoft.KeyVault/vaults. Has constant value: "Microsoft.KeyVault/vaults". :vartype type: str """ diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_models_py3.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_models_py3.py index 2c117ce90fba..516ae955752e 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_models_py3.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2016_10_01/models/_models_py3.py @@ -642,7 +642,7 @@ class VaultCheckNameAvailabilityParameters(msrest.serialization.Model): :param name: Required. The vault name. :type name: str - :ivar type: Required. The type of resource, Microsoft.KeyVault/vaults. Default value: + :ivar type: The type of resource, Microsoft.KeyVault/vaults. Has constant value: "Microsoft.KeyVault/vaults". :vartype type: str """ 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..2ee0b2c6683d 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 @@ -895,7 +895,7 @@ class VaultCheckNameAvailabilityParameters(msrest.serialization.Model): :param name: Required. The vault name. :type name: str - :ivar type: Required. The type of resource, Microsoft.KeyVault/vaults. Default value: + :ivar type: The type of resource, Microsoft.KeyVault/vaults. Has constant value: "Microsoft.KeyVault/vaults". :vartype type: str """ @@ -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..45924f7b3114 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 @@ -971,7 +971,7 @@ class VaultCheckNameAvailabilityParameters(msrest.serialization.Model): :param name: Required. The vault name. :type name: str - :ivar type: Required. The type of resource, Microsoft.KeyVault/vaults. Default value: + :ivar type: The type of resource, Microsoft.KeyVault/vaults. Has constant value: "Microsoft.KeyVault/vaults". :vartype type: str """ @@ -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..8175866ee370 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 @@ -1280,7 +1280,7 @@ class VaultCheckNameAvailabilityParameters(msrest.serialization.Model): :param name: Required. The vault name. :type name: str - :ivar type: Required. The type of resource, Microsoft.KeyVault/vaults. Default value: + :ivar type: The type of resource, Microsoft.KeyVault/vaults. Has constant value: "Microsoft.KeyVault/vaults". :vartype type: str """ @@ -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..d8123cd22761 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 @@ -1403,7 +1403,7 @@ class VaultCheckNameAvailabilityParameters(msrest.serialization.Model): :param name: Required. The vault name. :type name: str - :ivar type: Required. The type of resource, Microsoft.KeyVault/vaults. Default value: + :ivar type: The type of resource, Microsoft.KeyVault/vaults. Has constant value: "Microsoft.KeyVault/vaults". :vartype type: str """ @@ -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/v2021_04_01_preview/aio/operations/_secrets_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_keys_operations.py similarity index 55% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/_secrets_operations.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/aio/operations/_keys_operations.py index 720a3001a206..e4bdfff25116 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/v2020_04_01_preview/aio/operations/_keys_operations.py @@ -5,7 +5,7 @@ # 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, Union +from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList @@ -19,14 +19,14 @@ T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]] -class SecretsOperations: - """SecretsOperations async operations. +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.v2021_04_01_preview.models + :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. @@ -41,47 +41,48 @@ def __init__(self, client, config, serializer, deserializer) -> None: self._deserialize = deserializer self._config = config - async def create_or_update( + async def create_if_not_exist( self, resource_group_name: str, vault_name: str, - secret_name: str, - parameters: "_models.SecretCreateOrUpdateParameters", - **kwargs - ) -> "_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 - interaction with vault secrets. - - :param resource_group_name: The name of the Resource Group to which the vault belongs. + 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: Name of the vault. + :param vault_name: The name of the key vault which contains the key to be created. :type vault_name: str - :param secret_name: Name of the secret. - :type secret_name: str - :param parameters: Parameters to create or update the secret. - :type parameters: ~azure.mgmt.keyvault.v2021_04_01_preview.models.SecretCreateOrUpdateParameters + :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: Secret, or the result of cls(response) - :rtype: ~azure.mgmt.keyvault.v2021_04_01_preview.models.Secret + :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.Secret"] + 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 = "2021-04-01-preview" + api_version = "2020-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + 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}$'), - 'secretName': self._serialize.url("secret_name", secret_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + '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) @@ -95,69 +96,60 @@ async def create_or_update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'SecretCreateOrUpdateParameters') + 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, 201]: + 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) - if response.status_code == 200: - deserialized = self._deserialize('Secret', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('Secret', pipeline_response) + deserialized = self._deserialize('Key', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}'} # type: ignore + create_if_not_exist.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}'} # type: ignore - async def update( + async def get( self, resource_group_name: str, vault_name: str, - secret_name: str, - parameters: "_models.SecretPatchParameters", - **kwargs - ) -> "_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 - secrets. - - :param resource_group_name: The name of the Resource Group to which the vault belongs. + 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: Name of the vault. + :param vault_name: The name of the vault which contains the key to be retrieved. :type vault_name: str - :param secret_name: Name of the secret. - :type secret_name: str - :param parameters: Parameters to patch the secret. - :type parameters: ~azure.mgmt.keyvault.v2021_04_01_preview.models.SecretPatchParameters + :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: Secret, or the result of cls(response) - :rtype: ~azure.mgmt.keyvault.v2021_04_01_preview.models.Secret + :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.Secret"] + 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 = "2021-04-01-preview" - content_type = kwargs.pop("content_type", "application/json") + api_version = "2020-04-01-preview" accept = "application/json" # Construct URL - url = self.update.metadata['url'] # type: ignore + 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}$'), - 'secretName': self._serialize.url("secret_name", secret_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + '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) @@ -167,68 +159,139 @@ async def update( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'SecretPatchParameters') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + 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, 201]: + 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) - if response.status_code == 200: - deserialized = self._deserialize('Secret', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('Secret', pipeline_response) + deserialized = self._deserialize('Key', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}'} # type: ignore - async def get( + def list( self, resource_group_name: str, vault_name: str, - secret_name: str, - **kwargs - ) -> "_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. + **kwargs: Any + ) -> AsyncIterable["_models.KeyListResult"]: + """Lists the keys in the specified key vault. - :param resource_group_name: The name of the Resource Group to which the vault belongs. + :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. + :param vault_name: The name of the vault which contains the keys to be retrieved. :type vault_name: str - :param secret_name: The name of the secret. - :type secret_name: str :keyword callable cls: A custom type or function that will be passed the direct response - :return: Secret, or the result of cls(response) - :rtype: ~azure.mgmt.keyvault.v2021_04_01_preview.models.Secret + :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.Secret"] + 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 = "2021-04-01-preview" + 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.metadata['url'] # type: ignore + url = self.get_version.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), - 'secretName': self._serialize.url("secret_name", secret_name, 'str'), '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) @@ -248,42 +311,41 @@ async def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('Secret', pipeline_response) + 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}/secrets/{secretName}'} # type: ignore + get_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}/versions/{keyVersion}'} # type: ignore - def list( + def list_versions( self, resource_group_name: str, vault_name: str, - top: Optional[int] = None, - **kwargs - ) -> 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 - interaction with vault secrets. - - :param resource_group_name: The name of the Resource Group to which the vault belongs. + 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. + :param vault_name: The name of the vault which contains the key versions to be retrieved. :type vault_name: str - :param top: Maximum number of results to return. - :type top: int + :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 SecretListResult or the result of cls(response) - :rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.keyvault.v2021_04_01_preview.models.SecretListResult] + :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.SecretListResult"] + 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 = "2021-04-01-preview" + api_version = "2020-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -293,17 +355,16 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_versions.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), '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] - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') request = self._client.get(url, query_parameters, header_parameters) @@ -314,7 +375,7 @@ def prepare_request(next_link=None): return request async def extract_data(pipeline_response): - deserialized = self._deserialize('SecretListResult', pipeline_response) + deserialized = self._deserialize('KeyListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -335,4 +396,4 @@ async def get_next(next_link=None): return AsyncItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets'} # type: ignore + 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..3706f257ee03 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 @@ -1607,7 +1839,7 @@ class VaultCheckNameAvailabilityParameters(msrest.serialization.Model): :param name: Required. The vault name. :type name: str - :ivar type: Required. The type of resource, Microsoft.KeyVault/vaults. Default value: + :ivar type: The type of resource, Microsoft.KeyVault/vaults. Has constant value: "Microsoft.KeyVault/vaults". :vartype type: str """ @@ -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..0b47991bde9b 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 @@ -1760,7 +2015,7 @@ class VaultCheckNameAvailabilityParameters(msrest.serialization.Model): :param name: Required. The vault name. :type name: str - :ivar type: Required. The type of resource, Microsoft.KeyVault/vaults. Default value: + :ivar type: The type of resource, Microsoft.KeyVault/vaults. Has constant value: "Microsoft.KeyVault/vaults". :vartype type: str """ @@ -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/v2021_04_01_preview/operations/_secrets_operations.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_keys_operations.py similarity index 55% rename from sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/operations/_secrets_operations.py rename to sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_keys_operations.py index 5e581d0b48a1..0e2d13a935f6 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/operations/_secrets_operations.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2020_04_01_preview/operations/_keys_operations.py @@ -18,19 +18,19 @@ if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports - from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union + 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 SecretsOperations(object): - """SecretsOperations operations. +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.v2021_04_01_preview.models + :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. @@ -45,48 +45,49 @@ def __init__(self, client, config, serializer, deserializer): self._deserialize = deserializer self._config = config - def create_or_update( + def create_if_not_exist( self, resource_group_name, # type: str vault_name, # type: str - secret_name, # type: str - parameters, # type: "_models.SecretCreateOrUpdateParameters" + key_name, # type: str + parameters, # type: "_models.KeyCreateParameters" **kwargs # type: Any ): - # type: (...) -> "_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 - interaction with vault secrets. + # 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 to which the vault belongs. + :param resource_group_name: The name of the resource group which contains the specified key + vault. :type resource_group_name: str - :param vault_name: Name of the vault. + :param vault_name: The name of the key vault which contains the key to be created. :type vault_name: str - :param secret_name: Name of the secret. - :type secret_name: str - :param parameters: Parameters to create or update the secret. - :type parameters: ~azure.mgmt.keyvault.v2021_04_01_preview.models.SecretCreateOrUpdateParameters + :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: Secret, or the result of cls(response) - :rtype: ~azure.mgmt.keyvault.v2021_04_01_preview.models.Secret + :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.Secret"] + 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 = "2021-04-01-preview" + api_version = "2020-04-01-preview" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL - url = self.create_or_update.metadata['url'] # type: ignore + 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}$'), - 'secretName': self._serialize.url("secret_name", secret_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + '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) @@ -100,70 +101,61 @@ def create_or_update( header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'SecretCreateOrUpdateParameters') + 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, 201]: + 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) - if response.status_code == 200: - deserialized = self._deserialize('Secret', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('Secret', pipeline_response) + deserialized = self._deserialize('Key', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}'} # type: ignore + create_if_not_exist.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}'} # type: ignore - def update( + def get( self, resource_group_name, # type: str vault_name, # type: str - secret_name, # type: str - parameters, # type: "_models.SecretPatchParameters" + key_name, # type: str **kwargs # type: Any ): - # type: (...) -> "_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 - secrets. + # 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 to which the vault belongs. + :param resource_group_name: The name of the resource group which contains the specified key + vault. :type resource_group_name: str - :param vault_name: Name of the vault. + :param vault_name: The name of the vault which contains the key to be retrieved. :type vault_name: str - :param secret_name: Name of the secret. - :type secret_name: str - :param parameters: Parameters to patch the secret. - :type parameters: ~azure.mgmt.keyvault.v2021_04_01_preview.models.SecretPatchParameters + :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: Secret, or the result of cls(response) - :rtype: ~azure.mgmt.keyvault.v2021_04_01_preview.models.Secret + :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.Secret"] + 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 = "2021-04-01-preview" - content_type = kwargs.pop("content_type", "application/json") + api_version = "2020-04-01-preview" accept = "application/json" # Construct URL - url = self.update.metadata['url'] # type: ignore + 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}$'), - 'secretName': self._serialize.url("secret_name", secret_name, 'str', pattern=r'^[a-zA-Z0-9-]{1,127}$'), - 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'), + '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) @@ -173,69 +165,141 @@ def update( # Construct headers header_parameters = {} # type: Dict[str, Any] - header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') - body_content_kwargs = {} # type: Dict[str, Any] - body_content = self._serialize.body(parameters, 'SecretPatchParameters') - body_content_kwargs['content'] = body_content - request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) + 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, 201]: + 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) - if response.status_code == 200: - deserialized = self._deserialize('Secret', pipeline_response) - - if response.status_code == 201: - deserialized = self._deserialize('Secret', pipeline_response) + deserialized = self._deserialize('Key', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets/{secretName}'} # type: ignore + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}'} # type: ignore - def get( + 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 - secret_name, # type: str + key_name, # type: str + key_version, # type: str **kwargs # type: Any ): - # type: (...) -> "_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. + # 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 to which the vault belongs. + :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. + :param vault_name: The name of the vault which contains the key version to be retrieved. :type vault_name: str - :param secret_name: The name of the secret. - :type secret_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: Secret, or the result of cls(response) - :rtype: ~azure.mgmt.keyvault.v2021_04_01_preview.models.Secret + :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.Secret"] + 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 = "2021-04-01-preview" + api_version = "2020-04-01-preview" accept = "application/json" # Construct URL - url = self.get.metadata['url'] # type: ignore + url = self.get_version.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), - 'secretName': self._serialize.url("secret_name", secret_name, 'str'), '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) @@ -255,43 +319,42 @@ def get( map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, error_format=ARMErrorFormat) - deserialized = self._deserialize('Secret', pipeline_response) + 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}/secrets/{secretName}'} # type: ignore + get_version.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/keys/{keyName}/versions/{keyVersion}'} # type: ignore - def list( + def list_versions( self, resource_group_name, # type: str vault_name, # type: str - top=None, # type: Optional[int] + key_name, # type: str **kwargs # type: Any ): - # type: (...) -> Iterable["_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 - interaction with vault secrets. + # 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 to which the vault belongs. + :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. + :param vault_name: The name of the vault which contains the key versions to be retrieved. :type vault_name: str - :param top: Maximum number of results to return. - :type top: int + :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 SecretListResult or the result of cls(response) - :rtype: ~azure.core.paging.ItemPaged[~azure.mgmt.keyvault.v2021_04_01_preview.models.SecretListResult] + :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.SecretListResult"] + 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 = "2021-04-01-preview" + api_version = "2020-04-01-preview" accept = "application/json" def prepare_request(next_link=None): @@ -301,17 +364,16 @@ def prepare_request(next_link=None): if not next_link: # Construct URL - url = self.list.metadata['url'] # type: ignore + url = self.list_versions.metadata['url'] # type: ignore path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'vaultName': self._serialize.url("vault_name", vault_name, 'str'), '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] - if top is not None: - query_parameters['$top'] = self._serialize.query("top", top, 'int') query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') request = self._client.get(url, query_parameters, header_parameters) @@ -322,7 +384,7 @@ def prepare_request(next_link=None): return request def extract_data(pipeline_response): - deserialized = self._deserialize('SecretListResult', pipeline_response) + deserialized = self._deserialize('KeyListResult', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) @@ -343,4 +405,4 @@ def get_next(next_link=None): return ItemPaged( get_next, extract_data ) - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/vaults/{vaultName}/secrets'} # type: ignore + 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/_key_vault_management_client.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/_key_vault_management_client.py index bdabdfd3143a..790414eed7a4 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/_key_vault_management_client.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/_key_vault_management_client.py @@ -26,7 +26,6 @@ from .operations import MHSMPrivateEndpointConnectionsOperations from .operations import MHSMPrivateLinkResourcesOperations from .operations import Operations -from .operations import SecretsOperations from . import models @@ -47,8 +46,6 @@ class KeyVaultManagementClient(object): :vartype mhsm_private_link_resources: azure.mgmt.keyvault.v2021_04_01_preview.operations.MHSMPrivateLinkResourcesOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.keyvault.v2021_04_01_preview.operations.Operations - :ivar secrets: SecretsOperations operations - :vartype secrets: azure.mgmt.keyvault.v2021_04_01_preview.operations.SecretsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials.TokenCredential :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -89,8 +86,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) - self.secrets = SecretsOperations( - self._client, self._config, self._serialize, self._deserialize) def _send_request(self, http_request, **kwargs): # type: (HttpRequest, Any) -> HttpResponse diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/_metadata.json b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/_metadata.json index f59573dedff2..e50329726cd5 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/_metadata.json +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/_metadata.json @@ -104,7 +104,6 @@ "managed_hsms": "ManagedHsmsOperations", "mhsm_private_endpoint_connections": "MHSMPrivateEndpointConnectionsOperations", "mhsm_private_link_resources": "MHSMPrivateLinkResourcesOperations", - "operations": "Operations", - "secrets": "SecretsOperations" + "operations": "Operations" } } \ No newline at end of file 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/_key_vault_management_client.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/_key_vault_management_client.py index f637b3c6c6c6..c4c1758ebf72 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/_key_vault_management_client.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/_key_vault_management_client.py @@ -24,7 +24,6 @@ from .operations import MHSMPrivateEndpointConnectionsOperations from .operations import MHSMPrivateLinkResourcesOperations from .operations import Operations -from .operations import SecretsOperations from .. import models @@ -45,8 +44,6 @@ class KeyVaultManagementClient(object): :vartype mhsm_private_link_resources: azure.mgmt.keyvault.v2021_04_01_preview.aio.operations.MHSMPrivateLinkResourcesOperations :ivar operations: Operations operations :vartype operations: azure.mgmt.keyvault.v2021_04_01_preview.aio.operations.Operations - :ivar secrets: SecretsOperations operations - :vartype secrets: azure.mgmt.keyvault.v2021_04_01_preview.aio.operations.SecretsOperations :param credential: Credential needed for the client to connect to Azure. :type credential: ~azure.core.credentials_async.AsyncTokenCredential :param subscription_id: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. @@ -86,8 +83,6 @@ def __init__( self._client, self._config, self._serialize, self._deserialize) self.operations = Operations( self._client, self._config, self._serialize, self._deserialize) - self.secrets = SecretsOperations( - self._client, self._config, self._serialize, self._deserialize) async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse: """Runs the network request through the client's chained policies. diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/__init__.py index 405215be5f3a..fadc1d60816b 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/aio/operations/__init__.py @@ -13,7 +13,6 @@ from ._mhsm_private_endpoint_connections_operations import MHSMPrivateEndpointConnectionsOperations from ._mhsm_private_link_resources_operations import MHSMPrivateLinkResourcesOperations from ._operations import Operations -from ._secrets_operations import SecretsOperations __all__ = [ 'VaultsOperations', @@ -23,5 +22,4 @@ 'MHSMPrivateEndpointConnectionsOperations', 'MHSMPrivateLinkResourcesOperations', 'Operations', - 'SecretsOperations', ] 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/_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..545de69a3202 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 @@ -8,7 +8,6 @@ try: from ._models_py3 import AccessPolicyEntry - from ._models_py3 import Attributes from ._models_py3 import CheckNameAvailabilityResult from ._models_py3 import CloudErrorBody from ._models_py3 import DeletedManagedHsm @@ -17,6 +16,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 +36,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 @@ -50,13 +51,6 @@ from ._models_py3 import PrivateLinkServiceConnectionState from ._models_py3 import Resource from ._models_py3 import ResourceListResult - from ._models_py3 import Secret - from ._models_py3 import SecretAttributes - from ._models_py3 import SecretCreateOrUpdateParameters - from ._models_py3 import SecretListResult - from ._models_py3 import SecretPatchParameters - from ._models_py3 import SecretPatchProperties - from ._models_py3 import SecretProperties from ._models_py3 import ServiceSpecification from ._models_py3 import Sku from ._models_py3 import SystemData @@ -72,7 +66,6 @@ from ._models_py3 import VirtualNetworkRule except (SyntaxError, ImportError): from ._models import AccessPolicyEntry # type: ignore - from ._models import Attributes # type: ignore from ._models import CheckNameAvailabilityResult # type: ignore from ._models import CloudErrorBody # type: ignore from ._models import DeletedManagedHsm # type: ignore @@ -81,6 +74,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 +94,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 @@ -114,13 +109,6 @@ from ._models import PrivateLinkServiceConnectionState # type: ignore from ._models import Resource # type: ignore from ._models import ResourceListResult # type: ignore - from ._models import Secret # type: ignore - from ._models import SecretAttributes # type: ignore - from ._models import SecretCreateOrUpdateParameters # type: ignore - from ._models import SecretListResult # type: ignore - from ._models import SecretPatchParameters # type: ignore - from ._models import SecretPatchProperties # type: ignore - from ._models import SecretProperties # type: ignore from ._models import ServiceSpecification # type: ignore from ._models import Sku # type: ignore from ._models import SystemData # type: ignore @@ -160,7 +148,6 @@ __all__ = [ 'AccessPolicyEntry', - 'Attributes', 'CheckNameAvailabilityResult', 'CloudErrorBody', 'DeletedManagedHsm', @@ -169,6 +156,7 @@ 'DeletedVault', 'DeletedVaultListResult', 'DeletedVaultProperties', + 'DimensionProperties', 'Error', 'IPRule', 'LogSpecification', @@ -188,6 +176,7 @@ 'ManagedHsmProperties', 'ManagedHsmResource', 'ManagedHsmSku', + 'MetricSpecification', 'NetworkRuleSet', 'Operation', 'OperationDisplay', @@ -202,13 +191,6 @@ 'PrivateLinkServiceConnectionState', 'Resource', 'ResourceListResult', - 'Secret', - 'SecretAttributes', - 'SecretCreateOrUpdateParameters', - 'SecretListResult', - 'SecretPatchParameters', - 'SecretPatchProperties', - 'SecretProperties', 'ServiceSpecification', 'Sku', 'SystemData', diff --git a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/models/_key_vault_management_client_enums.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/models/_key_vault_management_client_enums.py index 94718f1009c0..0464592a9d43 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/models/_key_vault_management_client_enums.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/models/_key_vault_management_client_enums.py @@ -91,6 +91,7 @@ class KeyPermissions(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): RESTORE = "restore" RECOVER = "recover" PURGE = "purge" + RELEASE = "release" class ManagedHsmSkuFamily(with_metaclass(_CaseInsensitiveEnumMeta, str, Enum)): """SKU Family of the managed HSM Pool 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..e9cf075623b1 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 @@ -52,48 +52,6 @@ def __init__( self.permissions = kwargs['permissions'] -class Attributes(msrest.serialization.Model): - """The object attributes managed by the KeyVault service. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param enabled: Determines whether 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 - """ - - _validation = { - 'created': {'readonly': True}, - 'updated': {'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'}, - } - - def __init__( - self, - **kwargs - ): - super(Attributes, 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 - - class CheckNameAvailabilityResult(msrest.serialization.Model): """The CheckNameAvailability operation response. @@ -381,6 +339,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 +732,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 +1113,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 +1423,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 +1439,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 +1451,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) @@ -1554,246 +1607,20 @@ def __init__( self.next_link = kwargs.get('next_link', None) -class Secret(Resource): - """Resource information with extended details. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar 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 properties: Required. Properties of the secret. - :type properties: ~azure.mgmt.keyvault.v2021_04_01_preview.models.SecretProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'readonly': True}, - 'properties': {'required': 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}'}, - 'properties': {'key': 'properties', 'type': 'SecretProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(Secret, self).__init__(**kwargs) - self.properties = kwargs['properties'] - - -class SecretAttributes(Attributes): - """The secret management attributes. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param enabled: Determines whether 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 - """ - - _validation = { - 'created': {'readonly': True}, - 'updated': {'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'}, - } - - def __init__( - self, - **kwargs - ): - super(SecretAttributes, self).__init__(**kwargs) - - -class SecretCreateOrUpdateParameters(msrest.serialization.Model): - """Parameters for creating or updating a secret. - - 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 secret. - :type tags: dict[str, str] - :param properties: Required. Properties of the secret. - :type properties: ~azure.mgmt.keyvault.v2021_04_01_preview.models.SecretProperties - """ - - _validation = { - 'properties': {'required': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'SecretProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(SecretCreateOrUpdateParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.properties = kwargs['properties'] - - -class SecretListResult(msrest.serialization.Model): - """List of secrets. - - :param value: The list of secrets. - :type value: list[~azure.mgmt.keyvault.v2021_04_01_preview.models.Secret] - :param next_link: The URL to get the next set of secrets. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Secret]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SecretListResult, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.next_link = kwargs.get('next_link', None) - - -class SecretPatchParameters(msrest.serialization.Model): - """Parameters for patching a secret. - - :param tags: A set of tags. The tags that will be assigned to the secret. - :type tags: dict[str, str] - :param properties: Properties of the secret. - :type properties: ~azure.mgmt.keyvault.v2021_04_01_preview.models.SecretPatchProperties - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'SecretPatchProperties'}, - } - - def __init__( - self, - **kwargs - ): - super(SecretPatchParameters, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) - self.properties = kwargs.get('properties', None) - - -class SecretPatchProperties(msrest.serialization.Model): - """Properties of the secret. - - :param value: The value of the secret. - :type value: str - :param content_type: The content type of the secret. - :type content_type: str - :param attributes: The attributes of the secret. - :type attributes: ~azure.mgmt.keyvault.v2021_04_01_preview.models.SecretAttributes - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'attributes': {'key': 'attributes', 'type': 'SecretAttributes'}, - } - - def __init__( - self, - **kwargs - ): - super(SecretPatchProperties, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.content_type = kwargs.get('content_type', None) - self.attributes = kwargs.get('attributes', None) - - -class SecretProperties(msrest.serialization.Model): - """Properties of the secret. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: The value of the secret. NOTE: 'value' will never be returned from the service, - as APIs using this model are is intended for internal use in ARM deployments. Users should use - the data-plane REST service for interaction with vault secrets. - :type value: str - :param content_type: The content type of the secret. - :type content_type: str - :param attributes: The attributes of the secret. - :type attributes: ~azure.mgmt.keyvault.v2021_04_01_preview.models.SecretAttributes - :ivar secret_uri: The URI to retrieve the current version of the secret. - :vartype secret_uri: str - :ivar secret_uri_with_version: The URI to retrieve the specific version of the secret. - :vartype secret_uri_with_version: str - """ - - _validation = { - 'secret_uri': {'readonly': True}, - 'secret_uri_with_version': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'attributes': {'key': 'attributes', 'type': 'SecretAttributes'}, - 'secret_uri': {'key': 'secretUri', 'type': 'str'}, - 'secret_uri_with_version': {'key': 'secretUriWithVersion', 'type': 'str'}, - } - - def __init__( - self, - **kwargs - ): - super(SecretProperties, self).__init__(**kwargs) - self.value = kwargs.get('value', None) - self.content_type = kwargs.get('content_type', None) - self.attributes = kwargs.get('attributes', None) - self.secret_uri = None - self.secret_uri_with_version = None - - class ServiceSpecification(msrest.serialization.Model): """One property of operation, include log specifications. :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 +1629,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): @@ -2014,7 +1842,7 @@ class VaultCheckNameAvailabilityParameters(msrest.serialization.Model): :param name: Required. The vault name. :type name: str - :ivar type: Required. The type of resource, Microsoft.KeyVault/vaults. Default value: + :ivar type: The type of resource, Microsoft.KeyVault/vaults. Has constant value: "Microsoft.KeyVault/vaults". :vartype type: str """ @@ -2218,6 +2046,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 +2096,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 +2105,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 +2128,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 +2148,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 +2161,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 +2170,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..7268484e3988 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 @@ -62,52 +62,6 @@ def __init__( self.permissions = permissions -class Attributes(msrest.serialization.Model): - """The object attributes managed by the KeyVault service. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param enabled: Determines whether 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 - """ - - _validation = { - 'created': {'readonly': True}, - 'updated': {'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'}, - } - - def __init__( - self, - *, - enabled: Optional[bool] = None, - not_before: Optional[int] = None, - expires: Optional[int] = None, - **kwargs - ): - super(Attributes, self).__init__(**kwargs) - self.enabled = enabled - self.not_before = not_before - self.expires = expires - self.created = None - self.updated = None - - class CheckNameAvailabilityResult(msrest.serialization.Model): """The CheckNameAvailability operation response. @@ -408,6 +362,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 +789,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 +1215,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 +1556,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 +1572,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 +1582,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 @@ -1693,279 +1760,32 @@ def __init__( self.next_link = next_link -class Secret(Resource): - """Resource information with extended details. - - Variables are only populated by the server, and will be ignored when sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar 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 properties: Required. Properties of the secret. - :type properties: ~azure.mgmt.keyvault.v2021_04_01_preview.models.SecretProperties - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'readonly': True}, - 'tags': {'readonly': True}, - 'properties': {'required': 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}'}, - 'properties': {'key': 'properties', 'type': 'SecretProperties'}, - } - - def __init__( - self, - *, - properties: "SecretProperties", - **kwargs - ): - super(Secret, self).__init__(**kwargs) - self.properties = properties - - -class SecretAttributes(Attributes): - """The secret management attributes. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param enabled: Determines whether 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 - """ - - _validation = { - 'created': {'readonly': True}, - 'updated': {'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'}, - } - - def __init__( - self, - *, - enabled: Optional[bool] = None, - not_before: Optional[int] = None, - expires: Optional[int] = None, - **kwargs - ): - super(SecretAttributes, self).__init__(enabled=enabled, not_before=not_before, expires=expires, **kwargs) - - -class SecretCreateOrUpdateParameters(msrest.serialization.Model): - """Parameters for creating or updating a secret. - - 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 secret. - :type tags: dict[str, str] - :param properties: Required. Properties of the secret. - :type properties: ~azure.mgmt.keyvault.v2021_04_01_preview.models.SecretProperties - """ - - _validation = { - 'properties': {'required': True}, - } - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'SecretProperties'}, - } - - def __init__( - self, - *, - properties: "SecretProperties", - tags: Optional[Dict[str, str]] = None, - **kwargs - ): - super(SecretCreateOrUpdateParameters, self).__init__(**kwargs) - self.tags = tags - self.properties = properties - - -class SecretListResult(msrest.serialization.Model): - """List of secrets. - - :param value: The list of secrets. - :type value: list[~azure.mgmt.keyvault.v2021_04_01_preview.models.Secret] - :param next_link: The URL to get the next set of secrets. - :type next_link: str - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': '[Secret]'}, - 'next_link': {'key': 'nextLink', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[List["Secret"]] = None, - next_link: Optional[str] = None, - **kwargs - ): - super(SecretListResult, self).__init__(**kwargs) - self.value = value - self.next_link = next_link - - -class SecretPatchParameters(msrest.serialization.Model): - """Parameters for patching a secret. - - :param tags: A set of tags. The tags that will be assigned to the secret. - :type tags: dict[str, str] - :param properties: Properties of the secret. - :type properties: ~azure.mgmt.keyvault.v2021_04_01_preview.models.SecretPatchProperties - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - 'properties': {'key': 'properties', 'type': 'SecretPatchProperties'}, - } - - def __init__( - self, - *, - tags: Optional[Dict[str, str]] = None, - properties: Optional["SecretPatchProperties"] = None, - **kwargs - ): - super(SecretPatchParameters, self).__init__(**kwargs) - self.tags = tags - self.properties = properties - - -class SecretPatchProperties(msrest.serialization.Model): - """Properties of the secret. - - :param value: The value of the secret. - :type value: str - :param content_type: The content type of the secret. - :type content_type: str - :param attributes: The attributes of the secret. - :type attributes: ~azure.mgmt.keyvault.v2021_04_01_preview.models.SecretAttributes - """ - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'attributes': {'key': 'attributes', 'type': 'SecretAttributes'}, - } - - def __init__( - self, - *, - value: Optional[str] = None, - content_type: Optional[str] = None, - attributes: Optional["SecretAttributes"] = None, - **kwargs - ): - super(SecretPatchProperties, self).__init__(**kwargs) - self.value = value - self.content_type = content_type - self.attributes = attributes - - -class SecretProperties(msrest.serialization.Model): - """Properties of the secret. - - Variables are only populated by the server, and will be ignored when sending a request. - - :param value: The value of the secret. NOTE: 'value' will never be returned from the service, - as APIs using this model are is intended for internal use in ARM deployments. Users should use - the data-plane REST service for interaction with vault secrets. - :type value: str - :param content_type: The content type of the secret. - :type content_type: str - :param attributes: The attributes of the secret. - :type attributes: ~azure.mgmt.keyvault.v2021_04_01_preview.models.SecretAttributes - :ivar secret_uri: The URI to retrieve the current version of the secret. - :vartype secret_uri: str - :ivar secret_uri_with_version: The URI to retrieve the specific version of the secret. - :vartype secret_uri_with_version: str - """ - - _validation = { - 'secret_uri': {'readonly': True}, - 'secret_uri_with_version': {'readonly': True}, - } - - _attribute_map = { - 'value': {'key': 'value', 'type': 'str'}, - 'content_type': {'key': 'contentType', 'type': 'str'}, - 'attributes': {'key': 'attributes', 'type': 'SecretAttributes'}, - 'secret_uri': {'key': 'secretUri', 'type': 'str'}, - 'secret_uri_with_version': {'key': 'secretUriWithVersion', 'type': 'str'}, - } - - def __init__( - self, - *, - value: Optional[str] = None, - content_type: Optional[str] = None, - attributes: Optional["SecretAttributes"] = None, - **kwargs - ): - super(SecretProperties, self).__init__(**kwargs) - self.value = value - self.content_type = content_type - self.attributes = attributes - self.secret_uri = None - self.secret_uri_with_version = None - - class ServiceSpecification(msrest.serialization.Model): """One property of operation, include log specifications. :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): @@ -2196,7 +2016,7 @@ class VaultCheckNameAvailabilityParameters(msrest.serialization.Model): :param name: Required. The vault name. :type name: str - :ivar type: Required. The type of resource, Microsoft.KeyVault/vaults. Default value: + :ivar type: The type of resource, Microsoft.KeyVault/vaults. Has constant value: "Microsoft.KeyVault/vaults". :vartype type: str """ @@ -2425,6 +2245,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 +2295,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 +2304,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 +2342,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 +2362,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 +2375,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/__init__.py b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/operations/__init__.py index 405215be5f3a..fadc1d60816b 100644 --- a/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/operations/__init__.py +++ b/sdk/keyvault/azure-mgmt-keyvault/azure/mgmt/keyvault/v2021_04_01_preview/operations/__init__.py @@ -13,7 +13,6 @@ from ._mhsm_private_endpoint_connections_operations import MHSMPrivateEndpointConnectionsOperations from ._mhsm_private_link_resources_operations import MHSMPrivateLinkResourcesOperations from ._operations import Operations -from ._secrets_operations import SecretsOperations __all__ = [ 'VaultsOperations', @@ -23,5 +22,4 @@ 'MHSMPrivateEndpointConnectionsOperations', 'MHSMPrivateLinkResourcesOperations', 'Operations', - 'SecretsOperations', ] 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)