Deleting a Key
Before deleting the key, confirm that it is not in use and will not be used. You can check the key usage in either of the following ways:
- Check the CMK permission to determine its possible usage scope. For details, see Querying a Grant.
- Check audit logs to determine the actual usage. For details, see Viewing CTS Traces in the Trace List.
Prerequisites
- The key to be deleted is in Enabled, Disabled, or Pending import status.
Constraints
- A key will not be deleted until its scheduled deletion period expires. You can set the period to a value within the range 7 to 1096 days.
Before the specified deletion date, you can cancel the deletion if you want to use the CMK. Once the scheduled deletion has taken effect, the CMK will be deleted permanently and you will not be able to decrypt data encrypted by the CMK. Exercise caution when performing this operation.
- For details about the billing information about a CMK scheduled to be deleted, see Will a CMK Be Charged After It Is Scheduled to Delete?
- Default keys created by KMS cannot be scheduled for deletion.
- Before deleting a multi-region CMK, delete all replica keys.
Procedure
- Log in to the management console.
- Click in the upper left corner of the management console and select a region or project.
- Click on the left. Choose .
- In the row containing the target CMK, click Delete in the Operation column.
- On the key deletion dialog box, enter the deletion delay time.
Figure 1 Entering the period after which you want the deletion to take effect
- A key will not be deleted until its scheduled deletion period expires. You can set the period to a value within the range 7 to 1096 days. Before the specified deletion date, you can cancel the deletion if you want to use the CMK.
- For details about the billing information about a CMK scheduled to be deleted, see Will a CMK Be Charged After It Is Scheduled to Delete?
- Enter DELETE in the confirmation dialog box if deletion verification is disabled and click OK.
If you have enabled deletion verification, select a verification mode, click Get Code, enter the code, and click OK.
To disable operation protection, go to the Security Settings page, click Disable next to Operation Protection in the Critical Operations tab, or click Disable Operation Protection on the deletion page.
- If a key is used to encrypt DDS, RDS, or NoSQL, after you click OK, a message "Key XXX is being used by XXX. Are you sure you want to delete it?" is displayed, as shown in Figure 2. Click Yes.
To schedule the deletion of multiple CMKs at a time, select them and click Delete in the upper left corner of the list.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot