---
title: "POST /#X-Amz-Target=TrentService.DeleteImportedKeyMaterial"
method: POST
path: "/#X-Amz-Target=TrentService.DeleteImportedKeyMaterial"
---

# POST /#X-Amz-Target=TrentService.DeleteImportedKeyMaterial

`POST /#X-Amz-Target=TrentService.DeleteImportedKeyMaterial`

Deletes key material that you previously imported. This operation makes the specified KMS key unusable. For more information about importing key material into KMS, see [Importing Key Material](https://docs.aws.amazon.com/kms/latest/developerguide/importing-keys.html) in the _Key Management Service Developer Guide_.

When the specified KMS key is in the `PendingDeletion` state, this operation does not change the KMS key's state. Otherwise, it changes the KMS key's state 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 be in a compatible key state. For details, see [Key states of KMS keys](https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) in the _Key Management Service Developer Guide_.

**Cross-account use**: No. You cannot perform this operation on a KMS key in a different Amazon Web Services account.

**Required permissions**: [kms:DeleteImportedKeyMaterial](https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) (key policy)

**Related operations:**

*   GetParametersForImport
    
*   ImportKeyMaterial

## Headers

- `X-Amz-Target` 'TrentService.DeleteImportedKeyMaterial', required

## Request body

- DeleteImportedKeyMaterialRequest
  - `KeyId` string, required — <p>Identifies the KMS key from which you are deleting imported key material. The <code>Origin</code> of the KMS key must be <code>EXTERNAL</code>.</p> <p>Specify the key ID or key ARN of the KMS key.</p> <p>For example:</p> <ul> <li> <p>Key ID: <code>1234abcd-12ab-34cd-56ef-1234567890ab</code> </p> </li> <li> <p>Key ARN: <code>arn:aws:kms:us-east-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code> </p> </li> </ul> <p>To get the key ID and key ARN for a KMS key, use <a>ListKeys</a> or <a>DescribeKey</a>.</p>

## Response `200`

Success

## Other responses

- `480` — InvalidArnException
- `481` — UnsupportedOperationException
- `482` — DependencyTimeoutException
- `483` — NotFoundException
- `484` — KMSInternalException
- `485` — KMSInvalidStateException

---

[API](https://skmtc.net/aws/apis/kms.md) · [All operations](https://skmtc.net/aws/apis/kms/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/kms/versions/f92d678d2025/schema)
