Skip to main content

deleted_keys

Creates, updates, deletes, gets or lists a deleted_keys resource.

Overview

Namedeleted_keys
TypeResource
Idazure.key_vault_keys.deleted_keys

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
attributesobjectThe key management attributes.
deletedDatestring (date-time)The time when the key was deleted, in UTC.
keyobjectThe Json web key.
managedbooleanTrue if the key's lifetime is managed by key vault. If this is a key backing a certificate, then managed will be true.
recoveryIdstringThe url of the recovery object, used to identify and recover the deleted key.
release_policyobjectThe policy rules under which the key can be exported.
scheduledPurgeDatestring (date-time)The time when the key is scheduled to be purged, in UTC.
tagsobjectApplication specific metadata in the form of key-value pairs.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_deleted_keyselectkey_name, vault_nameGets the public part of a deleted key. The Get Deleted Key operation is applicable for soft-delete enabled vaults. While the operation can be invoked on any vault, it will return an error if invoked on a non soft-delete enabled vault. This operation requires the keys/get permission.
get_deleted_keysselectvault_namemaxresultsLists the deleted keys in the specified vault. Retrieves a list of the keys in the Key Vault as JSON Web Key structures that contain the public part of a deleted key. This operation includes deletion-specific information. The Get Deleted Keys operation is applicable for vaults enabled for soft-delete. While the operation can be invoked on any vault, it will return an error if invoked on a non soft-delete enabled vault. This operation requires the keys/list permission.
purge_deleted_keydeletekey_name, vault_namePermanently deletes the specified key. The Purge Deleted Key operation is applicable for soft-delete enabled vaults. While the operation can be invoked on any vault, it will return an error if invoked on a non soft-delete enabled vault. This operation requires the keys/purge permission.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
key_namestringThe name of the key. Required.
vault_namestringKey vault name. (default: )
maxresultsintegerMaximum number of results to return in a page. If not specified the service will return up to 25 results. Default value is None.

SELECT examples

Gets the public part of a deleted key. The Get Deleted Key operation is applicable for soft-delete enabled vaults. While the operation can be invoked on any vault, it will return an error if invoked on a non soft-delete enabled vault. This operation requires the keys/get permission.

SELECT
attributes,
deletedDate,
key,
managed,
recoveryId,
release_policy,
scheduledPurgeDate,
tags
FROM azure.key_vault_keys.deleted_keys
WHERE key_name = '{{ key_name }}' -- required
AND vault_name = '{{ vault_name }}' -- required
;

DELETE examples

Permanently deletes the specified key. The Purge Deleted Key operation is applicable for soft-delete enabled vaults. While the operation can be invoked on any vault, it will return an error if invoked on a non soft-delete enabled vault. This operation requires the keys/purge permission.

DELETE FROM azure.key_vault_keys.deleted_keys
WHERE key_name = '{{ key_name }}' --required
AND vault_name = '{{ vault_name }}' --required
;