> ## Documentation Index
> Fetch the complete documentation index at: https://infisical.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a key

> Rename or turn off a KMS key with the Python SDK.

`client.kms.update_key()` renames a key, changes its description, or turns it off or on. The settings that you don't pass stay as they are.

## Parameters

**key\_id** `str` *required*

The ID of the key.

**name** `str`

The new name of the key, in lowercase letters, numbers, and hyphens.

**description** `str`

The new description of the key.

**is\_disabled** `bool`

`True` to stop the key from encrypting and decrypting data, or `False` to allow it again.

## Returns

**key** `KmsKey`

The updated key.

```python Turn off theme={"dark"}
key = client.kms.update_key(key_id="<key-id>", is_disabled=True)
```

```python Rename theme={"dark"}
key = client.kms.update_key(
    key_id="<key-id>",
    name="payments-data-v2",
    description="Encrypts card tokens",
)
```

```json Response theme={"dark"}
{
  "id": "8c9d0e1f-2a3b-4c4d-9e5f-6a7b8c9d0e1f",
  "name": "payments-data",
  "description": "",
  "projectId": "5e8d7c6b-4a3f-4e2d-9c1b-0a9f8e7d6c5b",
  "orgId": "2c1b0a9f-8e7d-4c6b-5a4f-3e2d1c0b9a8f",
  "encryptionAlgorithm": "aes-256-gcm",
  "version": 1,
  "isDisabled": true,
  "createdAt": "2026-12-02T11:20:08.774Z",
  "updatedAt": "2026-12-02T11:58:31.026Z"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.