{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/snowflake/main/json-schema/snowflake-secret-schema.json",
  "title": "Secret",
  "description": "A Snowflake secret",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/snowflake-secret-api-openapi.yml#/components/schemas/Secret",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "description": "Type of the secret"
    },
    "comment": {
      "type": "string",
      "description": "user comment associated to an object in the dictionary"
    },
    "name": {
      "type": "string",
      "pattern": "^\"([^\"]|\"\")+\"|[a-zA-Z_][a-zA-Z0-9_$]*$",
      "description": "Name of the secret"
    },
    "created_on": {
      "type": "string",
      "format": "date-time",
      "readOnly": true,
      "description": "Date and time when the secret was created."
    },
    "database_name": {
      "type": "string",
      "pattern": "^\"([^\"]|\"\")+\"|[a-zA-Z_][a-zA-Z0-9_$]*$",
      "readOnly": true,
      "description": "Database in which the secret is stored"
    },
    "schema_name": {
      "type": "string",
      "pattern": "^\"([^\"]|\"\")+\"|[a-zA-Z_][a-zA-Z0-9_$]*$",
      "readOnly": true,
      "description": "Schema in which the secret is stored"
    },
    "owner": {
      "type": "string",
      "pattern": "^\"([^\"]|\"\")+\"|[a-zA-Z_][a-zA-Z0-9_$]*$",
      "readOnly": true,
      "description": "Role that owns the secret"
    },
    "owner_role_type": {
      "type": "string",
      "readOnly": true,
      "description": "The type of role that owns the secret"
    }
  },
  "required": [
    "type",
    "name"
  ]
}