Versions store the sensitive data contained in your secrets (API keys, passwords, or certificates)
Access a secret's version using the secret's name and path
Access sensitive data in a secret's version specified by the region, secret_name, secret_path and revision parameters.
path Parameters
regionThe region you want to target
revisionVersion number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
- an integer (the revision number)
- "latest" (the latest revision)
- "latest_enabled" (the latest enabled revision).
query Parameters
secret_pathSecret's path.
secret_nameSecret's name.
project_idID of the Project to target. (UUID format)
Access a secret's version using the secret's name and path › Responses
secret_idID of the secret. (UUID format)
revisionVersion number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1.
dataThe base64-encoded secret payload of the version.
data_crc32The CRC32 checksum of the data as a base-10 integer. This field is only available if a CRC32 was supplied during the creation of the version.
typeType of the secret.
See the Secret.Type enum for a description of values.
List versions of a secret using the secret's ID
Retrieve the list of a given secret's versions specified by the secret_id and region parameters.
path Parameters
regionThe region you want to target
secret_idID of the secret. (UUID format)
query Parameters
pagepage_sizeFilter results by status.
List versions of a secret using the secret's ID › Responses
Single page of versions.
total_countNumber of versions.
Create a version
Create a version of a given secret specified by the region and secret_id parameters.
path Parameters
regionThe region you want to target
secret_idID of the secret. (UUID format)
Create a version › Request Body
dataThe base64-encoded secret payload of the version.
descriptionDescription of the version.
disable_previousDisable the previous secret version. (Optional.) If there is no previous version or if the previous version was already disabled, does nothing.
data_crc32(Optional.) The CRC32 checksum of the data as a base-10 integer. If specified, Secret Manager will verify the integrity of the data received against the given CRC32 checksum. An error is returned if the CRC32 does not match. If, however, the CRC32 matches, it will be stored and returned along with the SecretVersion on future access requests.
Create a version › Responses
revisionVersion number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1.
secret_idID of the secret. (UUID format)
statusCurrent status of the version.
unknown_status: the version is in an invalid state.enabled: the version is accessible.disabled: the version is not accessible but can be enabled.scheduled_for_deletion: the version is scheduled for deletion. It will be deleted in 7 days.deleted: the version is permanently deleted. It is not possible to recover it.
created_atDate and time of the version's creation. (RFC 3339 format)
updated_atLast update of the version. (RFC 3339 format)
deleted_atDate and time of the version's deletion. (RFC 3339 format)
descriptionDescription of the version.
latestReturns true if the version is the latest.
Properties of the ephemeral version. Returns the version's expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.
deletion_requested_atReturns the time at which deletion was requested. (RFC 3339 format)
regionRegion of the version.
Get metadata of a secret's version using the secret's ID
Retrieve the metadata of a secret's given version specified by the region, secret_id and revision parameters.
path Parameters
regionThe region you want to target
secret_idID of the secret. (UUID format)
revisionVersion number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
- a number (the revision number)
- "latest" (the latest revision)
- "latest_enabled" (the latest enabled revision).
Get metadata of a secret's version using the secret's ID › Responses
revisionVersion number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1.
secret_idID of the secret. (UUID format)
statusCurrent status of the version.
unknown_status: the version is in an invalid state.enabled: the version is accessible.disabled: the version is not accessible but can be enabled.scheduled_for_deletion: the version is scheduled for deletion. It will be deleted in 7 days.deleted: the version is permanently deleted. It is not possible to recover it.
created_atDate and time of the version's creation. (RFC 3339 format)
updated_atLast update of the version. (RFC 3339 format)
deleted_atDate and time of the version's deletion. (RFC 3339 format)
descriptionDescription of the version.
latestReturns true if the version is the latest.
Properties of the ephemeral version. Returns the version's expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.
deletion_requested_atReturns the time at which deletion was requested. (RFC 3339 format)
regionRegion of the version.
Delete a version
Delete a secret's version and the sensitive data contained in it. Deleting a version is permanent and cannot be undone.
path Parameters
regionThe region you want to target
secret_idID of the secret. (UUID format)
revisionVersion number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
- a number (the revision number)
- "latest" (the latest revision)
- "latest_enabled" (the latest enabled revision).
Delete a version › Responses
Update metadata of a version
Edit the metadata of a secret's given version, specified by the region, secret_id and revision parameters.
path Parameters
regionThe region you want to target
secret_idID of the secret. (UUID format)
revisionVersion number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
- a number (the revision number)
- "latest" (the latest revision)
- "latest_enabled" (the latest enabled revision).
Update metadata of a version › Request Body
descriptionDescription of the version.
Ephemeral properties of the version. (Optional.) Properties that defines the version's expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.
Update metadata of a version › Responses
revisionVersion number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1.
secret_idID of the secret. (UUID format)
statusCurrent status of the version.
unknown_status: the version is in an invalid state.enabled: the version is accessible.disabled: the version is not accessible but can be enabled.scheduled_for_deletion: the version is scheduled for deletion. It will be deleted in 7 days.deleted: the version is permanently deleted. It is not possible to recover it.
created_atDate and time of the version's creation. (RFC 3339 format)
updated_atLast update of the version. (RFC 3339 format)
deleted_atDate and time of the version's deletion. (RFC 3339 format)
descriptionDescription of the version.
latestReturns true if the version is the latest.
Properties of the ephemeral version. Returns the version's expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.
deletion_requested_atReturns the time at which deletion was requested. (RFC 3339 format)
regionRegion of the version.
Access a secret's version using the secret's ID
Access sensitive data in a secret's version specified by the region, secret_id and revision parameters.
path Parameters
regionThe region you want to target
secret_idID of the secret. (UUID format)
revisionVersion number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
- a number (the revision number)
- "latest" (the latest revision)
- "latest_enabled" (the latest enabled revision).
Access a secret's version using the secret's ID › Responses
secret_idID of the secret. (UUID format)
revisionVersion number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1.
dataThe base64-encoded secret payload of the version.
data_crc32The CRC32 checksum of the data as a base-10 integer. This field is only available if a CRC32 was supplied during the creation of the version.
typeType of the secret.
See the Secret.Type enum for a description of values.
Disable a version
Make a specific version inaccessible. You must specify the region, secret_id and revision parameters.
path Parameters
regionThe region you want to target
secret_idID of the secret. (UUID format)
revisionVersion number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
- a number (the revision number)
- "latest" (the latest revision)
- "latest_enabled" (the latest enabled revision).
Disable a version › Responses
revisionVersion number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1.
secret_idID of the secret. (UUID format)
statusCurrent status of the version.
unknown_status: the version is in an invalid state.enabled: the version is accessible.disabled: the version is not accessible but can be enabled.scheduled_for_deletion: the version is scheduled for deletion. It will be deleted in 7 days.deleted: the version is permanently deleted. It is not possible to recover it.
created_atDate and time of the version's creation. (RFC 3339 format)
updated_atLast update of the version. (RFC 3339 format)
deleted_atDate and time of the version's deletion. (RFC 3339 format)
descriptionDescription of the version.
latestReturns true if the version is the latest.
Properties of the ephemeral version. Returns the version's expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.
deletion_requested_atReturns the time at which deletion was requested. (RFC 3339 format)
regionRegion of the version.
Enable a version
Make a specific version accessible. You must specify the region, secret_id and revision parameters.
path Parameters
regionThe region you want to target
secret_idID of the secret. (UUID format)
revisionVersion number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1. Value can be either:
- a number (the revision number)
- "latest" (the latest revision)
- "latest_enabled" (the latest enabled revision).
Enable a version › Responses
revisionVersion number. The first version of the secret is numbered 1, and all subsequent revisions augment by 1.
secret_idID of the secret. (UUID format)
statusCurrent status of the version.
unknown_status: the version is in an invalid state.enabled: the version is accessible.disabled: the version is not accessible but can be enabled.scheduled_for_deletion: the version is scheduled for deletion. It will be deleted in 7 days.deleted: the version is permanently deleted. It is not possible to recover it.
created_atDate and time of the version's creation. (RFC 3339 format)
updated_atLast update of the version. (RFC 3339 format)
deleted_atDate and time of the version's deletion. (RFC 3339 format)
descriptionDescription of the version.
latestReturns true if the version is the latest.
Properties of the ephemeral version. Returns the version's expiration date, whether it expires after being accessed once, and the action to perform (disable or delete) once the version expires.
deletion_requested_atReturns the time at which deletion was requested. (RFC 3339 format)
regionRegion of the version.