Key Management Service API, gRPC: SymmetricKeyService.ListVersions
Returns the list of versions of the specified symmetric KMS key.
gRPC request
rpc ListVersions (ListSymmetricKeyVersionsRequest) returns (ListSymmetricKeyVersionsResponse)
ListSymmetricKeyVersionsRequest
{
"keyId": "string",
"pageSize": "int64",
"pageToken": "string"
}
Field |
Description |
keyId |
string Required field. ID of the symmetric KMS key to list versions for. |
pageSize |
int64 The maximum number of results per page to return. If the number of available |
pageToken |
string Page token. To get the next page of results, set |
ListSymmetricKeyVersionsResponse
{
"keyVersions": [
{
"id": "string",
"keyId": "string",
"status": "Status",
"algorithm": "SymmetricAlgorithm",
"createdAt": "google.protobuf.Timestamp",
"primary": "bool",
"destroyAt": "google.protobuf.Timestamp",
"hostedByHsm": "bool"
}
],
"nextPageToken": "string"
}
Field |
Description |
keyVersions[] |
List of versions for the specified symmetric KMS key. |
nextPageToken |
string This token allows you to get the next page of results for list requests. If the number |
SymmetricKeyVersion
Symmetric KMS key version: metadata about actual cryptographic data.
Field |
Description |
id |
string ID of the key version. |
keyId |
string ID of the symmetric KMS key that the version belongs to. |
status |
enum Status Status of the key version.
|
algorithm |
enum SymmetricAlgorithm Encryption algorithm that should be used when using the key version to encrypt plaintext.
|
createdAt |
Time when the key version was created. |
primary |
bool Indication of a primary version, that is to be used by default for all cryptographic |
destroyAt |
Time when the key version is going to be destroyed. Empty unless the status |
hostedByHsm |
bool Indication of the version that is hosted by HSM. |