Prerequisites
Make sure you are in a group that has at least theeditor role within your tenant or project; for example, the default editors group. Alternatively, you can have an access permit with the editor role assigned to the required key. To check your access rights, go to the Administration → IAM section in the web console.
How to delete a key
To delete a key, run thedelete command for your key type:
-
Symmetric key:
-
Asymmetric key:
status: {}.
How to get the key ID
How to get the key ID
-
Symmetric key:
-
Asymmetric key:
How to restore a key
You can restore keys up to 30 days after their deletion. To restore a key, run theundelete command for your key type:
-
Symmetric key:
-
Asymmetric key:
How to get the key ID
How to get the key ID
Use the
--show-scheduled-for-deletion parameter in the list command to see keys scheduled for deletion:-
Symmetric key:
-
Asymmetric key:
undelete command, use the --name parameter to restore the key with a new name. This is needed when you have another key that reserves the original name. The parameter allows you to have different keys with unique names.
The command output shows that the key is active again: status.state: ACTIVE.