{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/snowflake/main/json-schema/snowflake-password-policy-schema.json",
  "title": "PasswordPolicy",
  "description": "A Snowflake password policy",
  "x-generated": "2026-10-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/snowflake-password-policy-api-openapi.yml#/components/schemas/PasswordPolicy",
  "type": "object",
  "properties": {
    "comment": {
      "type": "string",
      "description": "Comment for the password policy"
    },
    "password_min_length": {
      "type": "integer",
      "description": "Minimum length of new password."
    },
    "password_max_length": {
      "type": "integer",
      "description": "Maximum length of new password."
    },
    "password_min_upper_case_chars": {
      "type": "integer",
      "description": "Minimum number of uppercase characters in new password."
    },
    "password_min_lower_case_chars": {
      "type": "integer",
      "description": "Minimum number of lowercase characters in new password."
    },
    "password_min_numeric_chars": {
      "type": "integer",
      "description": "Minimum number of numeric characters in new password."
    },
    "password_min_special_chars": {
      "type": "integer",
      "description": "Minimum number of special characters in new password."
    },
    "password_min_age_days": {
      "type": "integer",
      "description": "Period after a password is changed during which a password cannot be changed again, in days."
    },
    "password_max_age_days": {
      "type": "integer",
      "description": "Period after which password must be changed, in days."
    },
    "password_max_retries": {
      "type": "integer",
      "description": "Number of attempts users have to enter the correct password before their account is locked."
    },
    "password_lockout_time_mins": {
      "type": "integer",
      "description": "Period of time for which users will be locked after entering their password incorrectly many times (specified by MAX_RETRIES), in minutes"
    },
    "password_history": {
      "type": "integer",
      "description": "Number of distinct passwords that a user must create before re-using a previous password"
    },
    "name": {
      "type": "string",
      "pattern": "^\"([^\"]|\"\")+\"|[a-zA-Z_][a-zA-Z0-9_$]*$",
      "description": "Name of the password policy"
    },
    "created_on": {
      "type": "string",
      "format": "date-time",
      "readOnly": true,
      "description": "Date and time when the password policy was created."
    },
    "database_name": {
      "type": "string",
      "pattern": "^\"([^\"]|\"\")+\"|[a-zA-Z_][a-zA-Z0-9_$]*$",
      "readOnly": true,
      "description": "Database in which the password policy is stored"
    },
    "schema_name": {
      "type": "string",
      "pattern": "^\"([^\"]|\"\")+\"|[a-zA-Z_][a-zA-Z0-9_$]*$",
      "readOnly": true,
      "description": "Schema in which the password policy is stored"
    },
    "owner": {
      "type": "string",
      "pattern": "^\"([^\"]|\"\")+\"|[a-zA-Z_][a-zA-Z0-9_$]*$",
      "readOnly": true,
      "description": "Role that owns the password policy"
    },
    "owner_role_type": {
      "type": "string",
      "readOnly": true,
      "description": "The type of role that owns the password policy"
    }
  },
  "required": [
    "name"
  ]
}