Key Management Service API, REST: SymmetricKey.listVersions
Returns the list of versions of the specified symmetric KMS key.
HTTP request
GET https://kms.api.cloud.yandex.net/kms/v1/keys/{keyId}/versions
Path parameters
Parameter | Description |
---|---|
keyId | Required. ID of the symmetric KMS key to list versions for. The maximum string length in characters is 50. |
Query parameters
Parameter | Description |
---|---|
pageSize | The maximum number of results per page to return. If the number of available results is larger than pageSize, the service returns a nextPageToken that can be used to get the next page of results in subsequent list requests. Default value: 100. The maximum value is 1000. |
pageToken | Page token. To get the next page of results, set pageToken to the nextPageToken returned by a previous list request. The maximum string length in characters is 100. |
Response
HTTP Code: 200 - OK
{
"keyVersions": [
{
"id": "string",
"keyId": "string",
"status": "string",
"algorithm": "string",
"createdAt": "string",
"primary": true,
"destroyAt": "string",
"hostedByHsm": true
}
],
"nextPageToken": "string"
}
Field | Description |
---|---|
keyVersions[] | object List of versions for the specified symmetric KMS key. |
keyVersions[]. id |
string ID of the key version. |
keyVersions[]. keyId |
string ID of the symmetric KMS key that the version belongs to. |
keyVersions[]. status |
string Status of the key version. Possible version status.
|
keyVersions[]. algorithm |
string Encryption algorithm that should be used when using the key version to encrypt plaintext. Supported symmetric encryption algorithms.
|
keyVersions[]. createdAt |
string (date-time) Time when the key version was created. String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
keyVersions[]. primary |
boolean (boolean) Indication of a primary version, that is to be used by default for all cryptographic operations that don't have a key version explicitly specified. |
keyVersions[]. destroyAt |
string (date-time) Time when the key version is going to be destroyed. Empty unless the status is String in RFC3339 text format. The range of possible values is from To work with values in this field, use the APIs described in the Protocol Buffers reference. In some languages, built-in datetime utilities do not support nanosecond precision (9 digits). |
keyVersions[]. hostedByHsm |
boolean (boolean) Indication of the version that is hosted by HSM. |
nextPageToken | string This token allows you to get the next page of results for list requests. If the number of results is greater than the specified pageSize, use the nextPageToken as the value for the pageToken query parameter in the next list request. Each subsequent list request will have its own nextPageToken to continue paging through the results. |