Projects.hmacKeys Stay organized with collections Save and categorize content based on your preferences.
The Projects.hmacKeys resource represents an HMAC key within Cloud Storage. The resource consists of a secret and HMAC key metadata. HMAC keys can be used as credentials for service accounts. For more information, seeHMAC Keys.
Note that the Projects.hmacKeys resource isonly returned when you usehmacKey.create. Other methods, such ashmacKey.get, return the metadata portion of the HMAC key resource.
For a list ofmethods for this resource, see the end of this page.
Resource representations
{"kind":"storage#hmacKey","metadata":{"kind":"storage#hmacKeyMetadata","id":string,"selfLink":string,"accessId":string,"projectId":string,"serviceAccountEmail":string,"state":string,"timeCreated":"datetime","updated":"datetime","etag":string},"secret":string}
| Property name | Value | Description | Notes |
|---|---|---|---|
kind | string | The kind of item this is. For HMAC keys, this is always"storage#hmacKey". | |
metadata | object | HMAC key metadata. | |
metadata.accessId | string | The access ID of the HMAC Key. | |
metadata.etag | string | HTTP 1.1Entity tag for the HMAC key. | |
metadata.id | string | The ID of the HMAC key, including the Project ID and the Access ID. | |
metadata.kind | string | The kind of item this is. For HMAC key metadata, this is always"storage#hmacKeyMetadata". | |
metadata.projectId | string | The Project ID of the project that owns the service account to which the key authenticates. | |
metadata.selfLink | string | The link to this resource. | |
metadata.serviceAccountEmail | string | The email address of the key's associated service account. | |
metadata.state | string | The state of the key. Can be one of ACTIVE, INACTIVE, or DELETED. | writable |
metadata.timeCreated | datetime1 | The creation time of the HMAC key inRFC 3339 format. | |
metadata.updated | datetime1 | The last modification time of the HMAC key metadata inRFC 3339 format. | |
secret | string | HMAC secret key material. |
Methods
Available methods for Projects.hmacKeys resources are as follows:
- create
- Creates a new HMAC key for the specified service account.
- delete
- Deletes an HMAC key.
- get
- Retrieves an HMAC key's metadata.
- list
- Retrieves a list of HMAC keys matching the criteria.
- update
- Updates the state of an HMAC key.
For information about status and error codes returned by these APIs, see thereference page.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-12-17 UTC.