deleted_keys
Creates, updates, deletes, gets or lists a deleted_keys resource.
Overview
| Name | deleted_keys |
| Type | Resource |
| Id | azure.key_vault_keys.deleted_keys |
Fields
The following fields are returned by SELECT queries:
- get_deleted_key
- get_deleted_keys
| Name | Datatype | Description |
|---|---|---|
attributes | object | The key management attributes. |
deletedDate | string (date-time) | The time when the key was deleted, in UTC. |
key | object | The Json web key. |
managed | boolean | True if the key's lifetime is managed by key vault. If this is a key backing a certificate, then managed will be true. |
recoveryId | string | The url of the recovery object, used to identify and recover the deleted key. |
release_policy | object | The policy rules under which the key can be exported. |
scheduledPurgeDate | string (date-time) | The time when the key is scheduled to be purged, in UTC. |
tags | object | Application specific metadata in the form of key-value pairs. |
| Name | Datatype | Description |
|---|---|---|
attributes | object | The key management attributes. |
deletedDate | string (date-time) | The time when the key was deleted, in UTC. |
kid | string | Key identifier. |
managed | boolean | True if the key's lifetime is managed by key vault. If this is a key backing a certificate, then managed will be true. |
recoveryId | string | The url of the recovery object, used to identify and recover the deleted key. |
scheduledPurgeDate | string (date-time) | The time when the key is scheduled to be purged, in UTC. |
tags | object | Application specific metadata in the form of key-value pairs. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_deleted_key | select | key_name, vault_name | 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. | |
get_deleted_keys | select | vault_name | maxresults | Lists 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_key | delete | key_name, vault_name | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
key_name | string | The name of the key. Required. |
vault_name | string | Key vault name. (default: ) |
maxresults | integer | Maximum 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
- get_deleted_key
- get_deleted_keys
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
;
Lists 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.
SELECT
attributes,
deletedDate,
kid,
managed,
recoveryId,
scheduledPurgeDate,
tags
FROM azure.key_vault_keys.deleted_keys
WHERE vault_name = '{{ vault_name }}' -- required
AND maxresults = '{{ maxresults }}'
;
DELETE examples
- purge_deleted_key
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
;