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, see HMAC Keys.

Note that the Projects.hmacKeys resource is only returned when you use hmacKey.create. Other methods, such as hmacKey.get, return the metadata portion of the HMAC key resource.

For a list of methods 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.1 Entity tag for the HMAC key. 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.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 in RFC 3339 format.
metadata.updated datetime1 The last modification time of the HMAC key metadata in RFC 3339 format.
secret string HMAC secret key material.
1 This property is a string formatted as the specified value type.


Available methods for Projects.hmacKeys resources are as follows:

Creates a new HMAC key for the specified service account.
Deletes an HMAC key.
Retrieves an HMAC key's metadata.
Retrieves a list of HMAC keys matching the criteria.
Updates the state of an HMAC key.

For information about status and error codes returned by these APIs, see the reference page.