Method: projects.cryptoKeys.list

Returns cryptographic keys managed by Cloud KMS in a given Cloud project. Note that this data is sourced from snapshots, meaning it may not completely reflect the actual state of key metadata at call time.

HTTP request

GET https://kmsinventory.googleapis.com/v1/{parent=projects/*}/cryptoKeys

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. The Google Cloud project for which to retrieve key metadata, in the format projects/*

Authorization requires the following IAM permission on the specified resource parent:

  • cloudkms.cryptoKeys.list

Query parameters

Parameters
pageSize

integer

Optional. The maximum number of keys to return. The service may return fewer than this value. If unspecified, at most 1000 keys will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.

pageToken

string

Optional. Pass this into a subsequent request in order to receive the next page of results.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

Response message for KeyDashboardService.ListCryptoKeys.

JSON representation
{
  "cryptoKeys": [
    {
      object (CryptoKey)
    }
  ],
  "nextPageToken": string
}
Fields
cryptoKeys[]

object (CryptoKey)

The list of CryptoKeys.

nextPageToken

string

The page token returned from the previous response if the next page is desired.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.