Secret

A Google Cloud Secret Manager secret resource representing a logical grouping of secret versions containing sensitive data.

ConfigurationCredentialsGoogle CloudKey ManagementSecretsSecurity

Properties

Name Type Description
name string Resource name of the secret in the format projects/{project}/secrets/{secretId}.
replication object Replication policy of the secret.
createTime string Timestamp when the secret was created.
labels object Labels attached to the secret.
expireTime string Timestamp at which the secret expires.
ttl string Time-to-live duration for the secret.
etag string Entity tag for optimistic concurrency control.
rotation object Rotation policy for the secret.
versionAliases object Mapping of alias strings to secret version numbers.
topics array Pub/Sub topics for secret event notifications.
View JSON Schema on GitHub

JSON Schema

secret.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/google-cloud-secret-manager/refs/heads/main/json-schema/secret.json",
  "title": "Secret",
  "description": "A Google Cloud Secret Manager secret resource representing a logical grouping of secret versions containing sensitive data.",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Resource name of the secret in the format projects/{project}/secrets/{secretId}."
    },
    "replication": {
      "type": "object",
      "description": "Replication policy of the secret.",
      "properties": {
        "automatic": {
          "type": "object",
          "description": "Automatic replication policy.",
          "properties": {
            "customerManagedEncryption": {
              "type": "object",
              "properties": {
                "kmsKeyName": {
                  "type": "string",
                  "description": "Resource name of the Cloud KMS key used for encryption."
                }
              }
            }
          }
        },
        "userManaged": {
          "type": "object",
          "description": "User-managed replication policy.",
          "properties": {
            "replicas": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "location": {
                    "type": "string",
                    "description": "Cloud region for the replica."
                  },
                  "customerManagedEncryption": {
                    "type": "object",
                    "properties": {
                      "kmsKeyName": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "createTime": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the secret was created."
    },
    "labels": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Labels attached to the secret."
    },
    "expireTime": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp at which the secret expires."
    },
    "ttl": {
      "type": "string",
      "description": "Time-to-live duration for the secret."
    },
    "etag": {
      "type": "string",
      "description": "Entity tag for optimistic concurrency control."
    },
    "rotation": {
      "type": "object",
      "description": "Rotation policy for the secret.",
      "properties": {
        "nextRotationTime": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp of the next scheduled rotation."
        },
        "rotationPeriod": {
          "type": "string",
          "description": "Duration between automatic rotations."
        }
      }
    },
    "versionAliases": {
      "type": "object",
      "additionalProperties": {
        "type": "string"
      },
      "description": "Mapping of alias strings to secret version numbers."
    },
    "topics": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Pub/Sub topic resource name."
          }
        }
      },
      "description": "Pub/Sub topics for secret event notifications."
    }
  },
  "required": ["replication"]
}