key_rotation_policies
Creates, updates, deletes, gets or lists a key_rotation_policies resource.
Overview
| Name | key_rotation_policies |
| Type | Resource |
| Id | azure.key_vault_keys.key_rotation_policies |
Fields
The following fields are returned by SELECT queries:
- get_key_rotation_policy
| Name | Datatype | Description |
|---|---|---|
id | string | The key policy id. |
attributes | object | The key rotation policy attributes. |
lifetimeActions | array | Actions that will be performed by Key Vault over the lifetime of a key. For preview, lifetimeActions can only have two items at maximum: one for rotate, one for notify. Notification time would be default to 30 days before expiry and it is not configurable. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_key_rotation_policy | select | key_name, vault_name | Lists the policy for a key. The GetKeyRotationPolicy operation returns the specified key policy resources in the specified key vault. This operation requires the keys/get permission. | |
update_key_rotation_policy | update | key_name, vault_name | Updates the rotation policy for a key. Set specified members in the key policy. Leave others as undefined. This operation requires the keys/update 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 in the given vault. Required. |
vault_name | string | Key vault name. (default: ) |
SELECT examples
- get_key_rotation_policy
Lists the policy for a key. The GetKeyRotationPolicy operation returns the specified key policy resources in the specified key vault. This operation requires the keys/get permission.
SELECT
id,
attributes,
lifetimeActions
FROM azure.key_vault_keys.key_rotation_policies
WHERE key_name = '{{ key_name }}' -- required
AND vault_name = '{{ vault_name }}' -- required
;
UPDATE examples
- update_key_rotation_policy
Updates the rotation policy for a key. Set specified members in the key policy. Leave others as undefined. This operation requires the keys/update permission.
UPDATE azure.key_vault_keys.key_rotation_policies
SET
lifetimeActions = '{{ lifetimeActions }}',
attributes = '{{ attributes }}'
WHERE
key_name = '{{ key_name }}' --required
AND vault_name = '{{ vault_name }}' --required
RETURNING
id,
attributes,
lifetimeActions;