versions
Creates, updates, deletes, gets or lists a versions
resource.
Overview
Name | versions |
Type | Resource |
Id | google.secretmanager.versions |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Output only. The resource name of the SecretVersion in the format projects/*/secrets/*/versions/* . SecretVersion IDs in a Secret start at 1 and are incremented for each subsequent version of the secret. |
clientSpecifiedPayloadChecksum | boolean | Output only. True if payload checksum specified in SecretPayload object has been received by SecretManagerService on SecretManagerService.AddSecretVersion. |
createTime | string | Output only. The time at which the SecretVersion was created. |
customerManagedEncryption | object | Describes the status of customer-managed encryption. |
destroyTime | string | Output only. The time this SecretVersion was destroyed. Only present if state is DESTROYED. |
etag | string | Output only. Etag of the currently stored SecretVersion. |
replicationStatus | object | The replication status of a SecretVersion. |
scheduledDestroyTime | string | Optional. Output only. Scheduled destroy time for secret version. This is a part of the Delayed secret version destroy feature. For a Secret with a valid version destroy TTL, when a secert version is destroyed, version is moved to disabled state and it is scheduled for destruction Version is destroyed only after the scheduled_destroy_time. |
state | string | Output only. The current state of the SecretVersion. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | projectsId, secretsId, versionsId | Gets metadata for a SecretVersion. projects/*/secrets/*/versions/latest is an alias to the most recently created SecretVersion. |
list | SELECT | projectsId, secretsId | Lists SecretVersions. This call does not return secret data. |
destroy | DELETE | projectsId, secretsId, versionsId | Destroys a SecretVersion. Sets the state of the SecretVersion to DESTROYED and irrevocably destroys the secret data. |
access | EXEC | projectsId, secretsId, versionsId | Accesses a SecretVersion. This call returns the secret data. projects/*/secrets/*/versions/latest is an alias to the most recently created SecretVersion. |
disable | EXEC | projectsId, secretsId, versionsId | Disables a SecretVersion. Sets the state of the SecretVersion to DISABLED. |
enable | EXEC | projectsId, secretsId, versionsId | Enables a SecretVersion. Sets the state of the SecretVersion to ENABLED. |
SELECT
examples
Lists SecretVersions. This call does not return secret data.
SELECT
name,
clientSpecifiedPayloadChecksum,
createTime,
customerManagedEncryption,
destroyTime,
etag,
replicationStatus,
scheduledDestroyTime,
state
FROM google.secretmanager.versions
WHERE projectsId = '{{ projectsId }}'
AND secretsId = '{{ secretsId }}';
DELETE
example
Deletes the specified versions
resource.
/*+ delete */
DELETE FROM google.secretmanager.versions
WHERE projectsId = '{{ projectsId }}'
AND secretsId = '{{ secretsId }}'
AND versionsId = '{{ versionsId }}';