---
title: "POST /projects/{project}/global/snapshots/{snapshot}/updateKmsKey"
method: POST
path: "/projects/{project}/global/snapshots/{snapshot}/updateKmsKey"
tags: ["snapshots"]
---

# POST /projects/{project}/global/snapshots/{snapshot}/updateKmsKey

`POST /projects/{project}/global/snapshots/{snapshot}/updateKmsKey`

Rotates the customer-managed
encryption key to the latest version for the specified snapshot.

## Path parameters

- `project` string, required
- `snapshot` string, required

## Query parameters

- `requestId` string

## Request body

- SnapshotUpdateKmsKeyRequest
  - `kmsKeyName` string — Optional. The new KMS key to replace the current one on the snapshot. If empty, the snapshot will be re-encrypted using the primary version of the snapshot's current KMS key. The KMS key can be provided in the following formats: - projects/project_id/locations/region/keyRings/key_ring/cryptoKeys/key

## Response `200`

Successful response

---

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