You can update the name and description of symmetric and asymmetric keys in Key Management Service (KMS). For symmetric keys, you can also update the key rotation period. You can’t update the algorithm of an existing key. Create a new key if you need to use a different algorithm.
Prerequisites
Make sure you are in a group that has at least the editor 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.
Terraform does not support updating keys. If you use Terraform to update a key, Terraform replaces the key with a new one.
How to update a symmetric key
-
In the web console, go to
Cryptography → KMS.
-
Make sure that Symmetric keys and Active are selected in the filters.
-
In the line of the required key, click
→ Settings.
-
Update the key settings:
- Name: New key name.
- Rotation period: New period after which KMS automatically rotates the key material. When a key is rotated, KMS generates a new key version and immediately sets it as the default version.
- Description: New key description.
-
Click Save changes.
-
List symmetric keys:
In the output, copy the ID of the required symmetric key.
-
Update the key:
The command contains the following parameters:
-
--id: ID of the symmetric key that you update.
-
--name (optional): New name of the key.
-
--description (optional): New description of the key.
-
--rotation-period (optional): New period after which KMS automatically rotates the key material.
When a key is rotated, KMS generates a new key version and immediately sets it as the default version.
Specify the value in the NhNmNs format, for example, 24h or 48h30m10s. The minimum value is 86400s (one day) and the maximum value is 315360000s (3650 days). The default value is 7776000s (90 days).
How to update an asymmetric key
-
In the web console, go to
Cryptography → KMS.
-
Make sure that Asymmetric keys and Active are selected in the filters.
-
In the line of the required key, click
→ Settings.
-
Update the key settings:
- Name: New key name.
- Description: New key description.
-
Click Save changes.
-
List asymmetric keys:
In the output, copy the ID of the required asymmetric key.
-
Update the key:
The command contains the following parameters:
--id: ID of the asymmetric key that you update.
--name (optional): New name of the key.
--description (optional): New description of the key.
See also