Projects.hmacKeys

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 nameValueDescriptionNotes
kindstringThe kind of item this is. For HMAC keys, this is always"storage#hmacKey".
metadataobjectHMAC key metadata.
metadata.accessIdstringThe access ID of the HMAC Key.
metadata.etagstringHTTP 1.1Entity tag for the HMAC key.
metadata.idstringThe ID of the HMAC key, including the Project ID and the Access ID.
metadata.kindstringThe kind of item this is. For HMAC key metadata, this is always"storage#hmacKeyMetadata".
metadata.projectIdstringThe Project ID of the project that owns the service account to which the key authenticates.
metadata.selfLinkstringThe link to this resource.
metadata.serviceAccountEmailstringThe email address of the key's associated service account.
metadata.statestringThe state of the key. Can be one of ACTIVE, INACTIVE, or DELETED.writable
metadata.timeCreateddatetime1The creation time of the HMAC key inRFC 3339 format.
metadata.updateddatetime1The last modification time of the HMAC key metadata inRFC 3339 format.
secretstringHMAC secret key material.
1 This property is a string formatted as the specified value type.

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.