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
Name | Description | Required | Type |
---|---|---|---|
Content-Type | Must be "application/x-amz-json-1.1" | Yes | string |
X-Amz-Target | Must be "TrentService.DeleteImportedKeyMaterial" | Yes | string |
Request Body
Name | Description | Required | Type |
---|---|---|---|
KeyId | Identifies the KMS key from which you are deleting imported key material. The value can be the ID or ARN of a KMS key. | Yes | string |
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 Code | Description |
---|---|
DependencyTimeoutException | The system timed out while trying to fulfill the request. |
InvalidArnException | The request was rejected because a specified ARN was not valid. |
KMSInternalException | The request was rejected because an internal error occurred. |
KMSInvalidStateException | The request was rejected because the key state is not valid for this operation. |
NotFoundException | The request was rejected because the specified entity or resource could not be found. |
UnsupportedOperationException | The 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.