After you import key material, you can directly delete the key material. In this case, the key can no longer be used and the ciphertext encrypted by using the key cannot be decrypted. This topic describes how to delete key material.
After you import key material into an external key, you can use the external key just like a normal key. The only difference lies in that the key material of an external key may expire and can be independently deleted. After the key material of an external key expires or is deleted, the external key can no longer be used, and the ciphertext encrypted by using this external key cannot be decrypted. After you delete the imported key material, you can re-import the same key material to make the relevant CMK available again. Therefore, we recommend that you save a copy of the key material.
Delete key material in the KMS console
- Log on to the KMS console.
- In the top navigation bar, select the region where your key resides.
- In the left-side navigation pane, click Keys.
- Find your key and click its alias to go to the key management page.
- In the Key Material section of the page that appears, click Delete Key Material. In the message that appears, click OK.After the key material is deleted, the key state changes from Enabled to Pending Import.
Delete key material by using Alibaba Cloud CLI
Run the aliyun kms DeleteKeyMaterial command to call the DeleteKeyMaterial operation to delete key material.
aliyun kms DeleteKeyMaterial --KeyId 1339cb7d-54d3-47e0-b595-c7d3dba8****