Skip to main content

DeleteImportedKeyMaterial

Deletes the imported key material from a KMS key that was created with imported key material.

Description

The `DeleteImportedKeyMaterial` operation deletes the imported key material from the specified KMS key. This operation makes the KMS key unusable. For more information about importing key material into KMS keys, see Importing Key Material.

note
  • When this operation is complete, the KMS key's key state changes to `PendingImport`.
  • After you delete key material, you can use ImportKeyMaterial to reimport the same key material into the KMS key.
  • The KMS key that you use for this operation must have been created with the `Origin` parameter set to `EXTERNAL`.

Request Syntax

POST / HTTP/1.1
Content-Type: application/x-amz-json-1.1
X-Amz-Target: TrentService.DeleteImportedKeyMaterial
{ "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab" }
Values in italics indicate user input and should be replaced with actual values.

Request Parameters

Headers

NameDescriptionRequiredType
Content-TypeMust be "application/x-amz-json-1.1"Yesstring
X-Amz-TargetMust be "TrentService.DeleteImportedKeyMaterial"Yesstring

Request Body

NameDescriptionRequiredType
KeyIdIdentifies the KMS key from which you are deleting imported key material. The value can be the ID or ARN of a KMS key.Yesstring

Examples

Example 1: Delete imported key material from a KMS key

POST / HTTP/1.1
Content-Type: application/x-amz-json-1.1
X-Amz-Target: TrentService.DeleteImportedKeyMaterial
{ "KeyId": "1234abcd-12ab-34cd-56ef-1234567890ab" }
Values in italics indicate user input and should be replaced with actual values.
HTTP/1.1 200 OK
Content-Type: application/x-amz-json-1.1
{}
Values in italics indicate variable response values.

Response Syntax

HTTP/1.1 200 OK
Content-Type: application/x-amz-json-1.1
{}
Values in italics indicate variable response values.

Response Elements

This operation returns no response elements.

Special Errors

Error CodeDescription
DependencyTimeoutExceptionThe system timed out while trying to fulfill the request.
InvalidArnExceptionThe request was rejected because a specified ARN was not valid.
KMSInternalExceptionThe request was rejected because an internal error occurred.
KMSInvalidStateExceptionThe request was rejected because the key state is not valid for this operation.
NotFoundExceptionThe request was rejected because the specified entity or resource could not be found.
UnsupportedOperationExceptionThe request was rejected because a specified parameter is not supported or a specified resource is not valid for this operation.

Permissions

To use the `DeleteImportedKeyMaterial` operation, you must have the following permissions:

  • `kms:DeleteImportedKeyMaterial` on the KMS key (specified in the policy)

Try It Out

Test DeleteImportedKeyMaterial

Delete imported key material from a KMS key.

Coming Soon

This feature is currently under development and will be available soon.