Turning a key off
Disable
POST /v1/keys/{key_id}/disable refuses every crypto operation with
409 KMS_KEY_DISABLED while leaving the material intact. This is the
reversible move: stop a suspected-compromised key now, keep the ability to
read historical ciphertext after re-enabling.Schedule deletion
POST /v1/keys/{key_id}/schedule-deletion starts a countdown.
pending_window_in_days is 7 to 30, defaulting to 7. The key refuses
crypto operations for the whole window, then the material and the record
are destroyed.- Console
- API
Open the key from KMS. Disable and Enable are in
the header. Schedule key deletion sits in the Danger zone on the
Settings tab: it takes a Pending window (days) and makes you type
the key’s name back before Schedule Deletion is accepted.
Cancelling
- Console
- API
A key inside the window shows Cancel Deletion in its header, where
Disable or Enable would otherwise be.
deletion_scheduled_at.
A cancelled key comes back
disabled, not enabled. Nothing starts
working again until you explicitly call enable. The window was entered
because someone wanted the key gone; recovering it should not silently
restore traffic to it.- Scheduling a deletion releases the key’s quota immediately, so you can create a replacement inside the same limit without waiting out the window.
- Cancelling therefore has to take that quota back, and fails with
403 QUOTA_EXCEEDEDif your account is now at its limit. If you created a replacement key, free a slot before you cancel.