- Resource: Secret
- Replication
- Automatic
- CustomerManagedEncryption
- UserManaged
- Replica
- Topic
- Rotation
- Methods
Resource: Secret
A Secret
is a logical secret whose value and versions can be accessed.
A Secret
is made up of zero or more SecretVersions
that represent the secret data.
JSON representation |
---|
{ "name": string, "replication": { object ( |
Fields | |
---|---|
name |
Output only. The resource name of the |
replication |
Required. Immutable. The replication policy of the secret data attached to the The replication policy cannot be changed after the Secret has been created. |
createTime |
Output only. The time at which the A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
labels |
The labels assigned to this Secret. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: No more than 64 labels can be assigned to a given resource. An object containing a list of |
topics[] |
Optional. A list of up to 10 Pub/Sub topics to which messages are published when control plane operations are called on the secret or its versions. |
etag |
Optional. Etag of the currently stored |
rotation |
Optional. Rotation policy attached to the |
versionAliases |
Optional. Mapping from version alias to version name. A version alias is a string with a maximum length of 63 characters and can contain uppercase and lowercase letters, numerals, and the hyphen ( Version-Alias pairs will be viewable via secrets.get and modifiable via secrets.patch. At launch Access by Allias will only be supported on GetSecretVersion and AccessSecretVersion. An object containing a list of |
annotations |
Optional. Custom metadata about the secret. Annotations are distinct from various forms of labels. Annotations exist to allow client tools to store their own state information without requiring a database. Annotation keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, begin and end with an alphanumeric character ([a-z0-9A-Z]), and may have dashes (-), underscores (_), dots (.), and alphanumerics in between these symbols. The total size of annotation keys and values must be less than 16KiB. An object containing a list of |
Union field Expiration is not the recommended way to set time-based permissions. IAM Conditions is recommended for granting time-based permissions because the operation can be reversed. |
|
expireTime |
Optional. Timestamp in UTC when the A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
ttl |
Input only. The TTL for the A duration in seconds with up to nine fractional digits, ending with ' |
Replication
A policy that defines the replication and encryption configuration of data.
JSON representation |
---|
{ // Union field |
Fields | |
---|---|
Union field replication . The replication policy for this secret. replication can be only one of the following: |
|
automatic |
The |
userManaged |
The |
Automatic
A replication policy that replicates the Secret
payload without any restrictions.
JSON representation |
---|
{
"customerManagedEncryption": {
object ( |
Fields | |
---|---|
customerManagedEncryption |
Optional. The customer-managed encryption configuration of the Updates to the |
CustomerManagedEncryption
Configuration for encrypting secret payloads using customer-managed encryption keys (CMEK).
JSON representation |
---|
{ "kmsKeyName": string } |
Fields | |
---|---|
kmsKeyName |
Required. The resource name of the Cloud KMS CryptoKey used to encrypt secret payloads. For secrets using the For secrets using the The expected format is |
UserManaged
A replication policy that replicates the Secret
payload into the locations specified in [Secret.replication.user_managed.replicas][]
JSON representation |
---|
{
"replicas": [
{
object ( |
Fields | |
---|---|
replicas[] |
Required. The list of Replicas for this Cannot be empty. |
Replica
Represents a Replica for this Secret
.
JSON representation |
---|
{
"location": string,
"customerManagedEncryption": {
object ( |
Fields | |
---|---|
location |
The canonical IDs of the location to replicate data. For example: |
customerManagedEncryption |
Optional. The customer-managed encryption configuration of the [User-Managed Replica][Replication.UserManaged.Replica]. If no configuration is provided, Google-managed default encryption is used. Updates to the |
Topic
A Pub/Sub topic which Secret Manager will publish to when control plane events occur on this secret.
JSON representation |
---|
{ "name": string } |
Fields | |
---|---|
name |
Required. The resource name of the Pub/Sub topic that will be published to, in the following format: |
Rotation
The rotation time and period for a Secret
. At nextRotationTime, Secret Manager will send a Pub/Sub notification to the topics configured on the Secret. Secret.topics
must be set to configure rotation.
JSON representation |
---|
{ "nextRotationTime": string, "rotationPeriod": string } |
Fields | |
---|---|
nextRotationTime |
Optional. Timestamp in UTC at which the
A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: |
rotationPeriod |
Input only. The Duration between rotation notifications. Must be in seconds and at least 3600s (1h) and at most 3153600000s (100 years). If A duration in seconds with up to nine fractional digits, ending with ' |
Methods |
|
---|---|
|
Creates a new SecretVersion containing secret data and attaches it to an existing Secret . |
|
Creates a new Secret containing no SecretVersions . |
|
Deletes a Secret . |
|
Gets metadata for a given Secret . |
|
Gets the access control policy for a secret. |
|
Lists Secrets . |
|
Updates metadata of an existing Secret . |
|
Sets the access control policy on the specified secret. |
|
Returns permissions that a caller has for the specified secret. |