---
title: "PUT /projects/{projectId}/hmacKeys/{accessId}"
method: PUT
path: "/projects/{projectId}/hmacKeys/{accessId}"
tags: ["projects"]
---

# PUT /projects/{projectId}/hmacKeys/{accessId}

`PUT /projects/{projectId}/hmacKeys/{accessId}`

Updates the state of an HMAC key. See the [HMAC Key resource descriptor](https://cloud.google.com/storage/docs/json_api/v1/projects/hmacKeys/update#request-body) for valid states.

## Path parameters

- `projectId` string, required
- `accessId` string, required

## Query parameters

- `userProject` string

## Request body

- HmacKeyMetadata — JSON template to produce a JSON-style HMAC Key metadata resource.
  - `accessId` string — The ID of the HMAC Key.
  - `etag` string — HTTP 1.1 Entity tag for the HMAC key.
  - `id` string — The ID of the HMAC key, including the Project ID and the Access ID.
  - `kind` string — The kind of item this is. For HMAC Key metadata, this is always storage#hmacKeyMetadata.
  - `projectId` string — Project ID owning the service account to which the key authenticates.
  - `selfLink` string — The link to this resource.
  - `serviceAccountEmail` string — The email address of the key's associated service account.
  - `state` string — The state of the key. Can be one of ACTIVE, INACTIVE, or DELETED.
  - `timeCreated` string, date-time — The creation time of the HMAC key in RFC 3339 format.
  - `updated` string, date-time — The last modification time of the HMAC key metadata in RFC 3339 format.

## Response `200`

Successful response

---

[API](https://skmtc.dev/google/apis/storage.md) · [All operations](https://skmtc.dev/google/apis/storage/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/google/storage/revisions/4623cd2c71cf/schema)
