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

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

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

Sets the state of a KMS key to disabled. This change temporarily prevents use of the KMS key for [cryptographic operations](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#cryptographic-operations).

For more information about how key state affects the use of a KMS key, see [Key states of KMS keys](https://docs.aws.amazon.com/kms/latest/developerguide/key-state.html) in the __Key Management Service Developer Guide__ .

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:DisableKey](https://docs.aws.amazon.com/kms/latest/developerguide/kms-api-permissions-reference.html) (key policy)

**Related operations**: EnableKey

## Headers

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

## Request body

- DisableKeyRequest
  - `KeyId` string, required — <p>Identifies the KMS key to disable.</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` — NotFoundException
- `481` — InvalidArnException
- `482` — DependencyTimeoutException
- `483` — KMSInternalException
- `484` — 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)
