snowflake.core.password_policy.PasswordPolicy

class snowflake.core.password_policy.PasswordPolicy(*, comment: Annotated[str, Strict(strict=True)] | None = None, password_min_length: Annotated[int, Strict(strict=True)] | None = None, password_max_length: Annotated[int, Strict(strict=True)] | None = None, password_min_upper_case_chars: Annotated[int, Strict(strict=True)] | None = None, password_min_lower_case_chars: Annotated[int, Strict(strict=True)] | None = None, password_min_numeric_chars: Annotated[int, Strict(strict=True)] | None = None, password_min_special_chars: Annotated[int, Strict(strict=True)] | None = None, password_min_age_days: Annotated[int, Strict(strict=True)] | None = None, password_max_age_days: Annotated[int, Strict(strict=True)] | None = None, password_max_retries: Annotated[int, Strict(strict=True)] | None = None, password_lockout_time_mins: Annotated[int, Strict(strict=True)] | None = None, password_history: Annotated[int, Strict(strict=True)] | None = None, name: Annotated[str, Strict(strict=True)], created_on: datetime | None = None, database_name: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True)])] | None = None, schema_name: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True)])] | None = None, owner: Annotated[str, FieldInfo(annotation=NoneType, required=True, metadata=[Strict(strict=True)])] | None = None, owner_role_type: Annotated[str, Strict(strict=True)] | None = None)

Bases: BaseModel

A model object representing the PasswordPolicy resource.

Constructs an object of type PasswordPolicy with the provided properties.

Parameters:
  • name (str) – Name of the password policy

  • comment (str, optional) – Comment for the password policy

  • password_min_length (int, optional) – Minimum length of new password.

  • password_max_length (int, optional) – Maximum length of new password.

  • password_min_upper_case_chars (int, optional) – Minimum number of uppercase characters in new password.

  • password_min_lower_case_chars (int, optional) – Minimum number of lowercase characters in new password.

  • password_min_numeric_chars (int, optional) – Minimum number of numeric characters in new password.

  • password_min_special_chars (int, optional) – Minimum number of special characters in new password.

  • password_min_age_days (int, optional) – Period after a password is changed during which a password cannot be changed again, in days.

  • password_max_age_days (int, optional) – Period after which password must be changed, in days.

  • password_max_retries (int, optional) – Number of attempts users have to enter the correct password before their account is locked.

  • password_lockout_time_mins (int, optional) – Period of time for which users will be locked after entering their password incorrectly many times (specified by MAX_RETRIES), in minutes

  • password_history (int, optional) – Number of distinct passwords that a user must create before re-using a previous password

  • created_on (datetime, optional) – Date and time when the password policy was created.

  • database_name (str, optional) – Database in which the password policy is stored

  • schema_name (str, optional) – Schema in which the password policy is stored

  • owner (str, optional) – Role that owns the password policy

  • owner_role_type (str, optional) – The type of role that owns the password policy

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Methods

classmethod from_dict(obj: dict) PasswordPolicy

Create an instance of PasswordPolicy from a dict.

classmethod from_json(json_str: str) PasswordPolicy

Create an instance of PasswordPolicy from a JSON string.

to_dict(hide_readonly_properties: bool = False) dict[str, Any]

Returns the dictionary representation of the model using alias.

to_dict_without_readonly_properties() dict[str, Any]

Return the dictionary representation of the model without readonly properties.

to_json() str

Returns the JSON representation of the model using alias.

to_str() str

Returns the string representation of the model using alias.

Language: English