- Resource: Secret
- 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 |
Optional. 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 Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. 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. Access by alias is only be supported on versions.get and versions.access. 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 |
versionDestroyTtl |
Optional. Secret Version TTL after destruction request This is a part of the Delayed secret version destroy feature. For secret with TTL>0, version destruction doesn't happen immediately on calling destroy instead the version goes to a disabled state and destruction happens after the TTL expires. A duration in seconds with up to nine fractional digits, ending with ' |
customerManagedEncryption |
Optional. The customer-managed encryption configuration of the regionalized secrets. If no configuration is provided, Google Cloud-powered encryption key is used. Updates to the |
tags |
Optional. Input only. Immutable. Mapping of Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" Tags are used to organize and group resources. Tags can be used to control policy evaluation for the resource. An object containing a list of |
secretType |
Optional. Immutable. This defines the type of the secret. Enforces certain structural requirements on the |
policyMember |
Output only. Defines the policy member for the secret. This will be used to check if the caller has the permission to perform certain operations on the typed secret. |
Expiration policy attached to the 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. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: |
|
expireTime |
Optional. Timestamp in UTC when the Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
ttl |
Input only. The TTL for the A duration in seconds with up to nine fractional digits, ending with ' |
| End of mutually exclusive fields. | |
Replication
A policy that defines the replication and encryption configuration of data.
| JSON representation |
|---|
{ // The following is a list of mutually exclusive fields. At most one of the // fields will be set in a response: "automatic": { object ( |
| Fields | |
|---|---|
| The replication policy for this secret. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response: | |
automatic |
The |
userManaged |
The |
| End of mutually exclusive fields. | |
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 Replication.UserManaged.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 Cloud-powered encryption key 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 |
Identifier. 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,
"managedRotationStatus": {
object ( |
| Fields | |
|---|---|
nextRotationTime |
Optional. Timestamp in UTC at which the
Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. 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 ' |
managedRotationStatus |
Output only. The current status of the managed rotation. This field is only applicable to Typed Secrets. This field is set by the service and cannot be set by the user. |
ManagedRotationStatus
Represents the status of a managed rotation.
This is applicable only to Typed Secrets. It indicates whether the rotation is active and any errors that may have occurred during the asynchronous managed rotation.
| JSON representation |
|---|
{ "state": enum ( |
| Fields | |
|---|---|
state |
Output only. Indicates whether the Managed Rotation is active or not. |
error |
Output only. Displays customer-facing issues that occurred during an asynchronous managed rotation. For example, if there are some permission errors. |
State
This defines the various states in which the managed rotation can be.
| Enums | |
|---|---|
STATE_UNSPECIFIED |
Not specified. This value is unused and invalid. |
ACTIVE |
Indicates that the Managed rotation is ACTIVE. |
INACTIVE |
Indicates that the Managed rotation is INACTIVE. |
Status
The Status type defines a logical different programming environments, including REST APIs and RPC APIs. It is used by gRPC. Each Status message contains three pieces of data:
You can find out more about this [API Design Guide](https://documentation.s3ns.fr/apis/design/
| JSON representation |
|---|
{ "code": integer, "message": string, "details": [ { "@type": string, field1: ..., ... } ] } |
| Fields | |
|---|---|
code |
The status code, which should be an enum value of |
message |
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the |
details[] |
A list of messages that carry the error details. There is a common set of message types for APIs to use. An object containing fields of an arbitrary type. An additional field |
SecretType
This defines the various values of the type of secret can be.
| Enums | |
|---|---|
SECRET_TYPE_UNSPECIFIED |
Applicable to all secrets which do not have any restriction on the SecretVersions. |
CLOUD_SQL_DB_CREDENTIALS |
Applicable to secrets which are used for the managed rotation feature for Cloud SQL Single User. |
ACCESS_KEY |
Applicable to secrets where the payload contains an access key. |
CERTIFICATE |
Applicable to secrets where the payload contains a certificate. |
OTHER_DB_CREDENTIALS |
Applicable to secrets where the payload contains database credentials. |
OTHER |
Applicable to secrets whose type doesn't belong to any of the above defined types. |
ResourcePolicyMember
Output-only policy member strings of a Cloud de Confiance resource's built-in identity.
| JSON representation |
|---|
{ "iamPolicyNamePrincipal": string, "iamPolicyUidPrincipal": string } |
| Fields | |
|---|---|
iamPolicyNamePrincipal |
Output only. IAM policy binding member referring to a Cloud de Confiance resource by user-assigned name (https://google.aip.dev//122). If a resource is deleted and recreated with the same name, the binding will be applicable to the new resource. Example: |
iamPolicyUidPrincipal |
Output only. IAM policy binding member referring to a Cloud de Confiance resource by system-assigned unique identifier (https://google.aip.dev//148#uid). If a resource is deleted and recreated with the same name, the binding will not be applicable to the new resource Example: |
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. |
|
The method google.cloud.secretmanager.v1.SecretManagerService.EnableManagedRotation is not available in Cloud de Confiance by S3NS. |
|
The method google.cloud.secretmanager.v1.SecretManagerService.RotateSecret is not available in Cloud de Confiance by S3NS. |