snowflake.core.user.UserΒΆ
- class snowflake.core.user.User(name: str, password: str | None = None, login_name: str | None = None, display_name: str | None = None, first_name: str | None = None, middle_name: str | None = None, last_name: str | None = None, email: str | None = None, must_change_password: bool | None = None, disabled: bool | None = None, days_to_expiry: int | None = None, mins_to_unlock: int | None = None, default_warehouse: str | None = None, default_namespace: str | None = None, default_role: str | None = None, default_secondary_roles: str | None = 'ALL', mins_to_bypass_mfa: int | None = None, rsa_public_key: str | None = None, rsa_public_key_2: str | None = None, comment: str | None = None, type: str | None = None, enable_unredacted_query_syntax_error: bool | None = None, network_policy: str | None = None, created_on: datetime | None = None, last_successful_login: datetime | None = None, expires_at: datetime | None = None, locked_until: datetime | None = None, has_password: bool | None = None, has_rsa_public_key: bool | None = None, rsa_public_key_fp: str | None = None, rsa_public_key_2_fp: str | None = None, ext_authn_duo: bool | None = None, ext_authn_uid: str | None = None, owner: str | None = None, snowflake_lock: bool | None = False, snowflake_support: bool | None = False, mins_to_bypass_network_policy: int | None = None, password_last_set: datetime | None = None, custom_landing_page_url: str | None = None, custom_landing_page_url_flush_next_ui_load: bool | None = False)ΒΆ
Bases:
object
A model object representing the User resource.
Constructs an object of type User with the provided properties.
- Parameters:
name (str) β User name
password (str, optional) β Password
login_name (str, optional) β Login name
display_name (str, optional) β Display name
first_name (str, optional) β First name
middle_name (str, optional) β Middle name
last_name (str, optional) β Last name
email (str, optional) β Email address
must_change_password (bool, optional) β Does this user need to change their password (e.g., after assigning a temp password)
disabled (bool, optional) β Has this user been disabled from the system
days_to_expiry (int, optional) β How many days until this user expires
mins_to_unlock (int, optional) β How many minutes until the account is unlocked after multiple failed logins
default_warehouse (str, optional) β The default warehouse to use when this user starts a session
default_namespace (str, optional) β The default namespace to use when this user starts a session
default_role (str, optional) β The default role to use when this user starts a session
default_secondary_roles (str, default 'ALL') β The default secondary roles of this user to use when starting a session. Only valid set values are ALL or NONE. Default is ALL after 2024-07 BCR.
mins_to_bypass_mfa (int, optional) β How many minutes until MFA is required again
rsa_public_key (str, optional) β RSA public key of the user
rsa_public_key_2 (str, optional) β Second RSA public key of the user
comment (str, optional) β Comment about the user.
type (str, optional) β Indicates the type of user (REGULAR or SERVICE)
enable_unredacted_query_syntax_error (bool, optional) β Whether to show unredacted query syntax errors in the query history.
network_policy (str, optional) β Specifies an existing network policy is active for the user. Otherwise, use account default.
created_on (datetime, optional)
last_successful_login (datetime, optional)
expires_at (datetime, optional)
locked_until (datetime, optional)
has_password (bool, optional)
has_rsa_public_key (bool, optional)
rsa_public_key_fp (str, optional) β Fingerprint of the userβs RSA public key
rsa_public_key_2_fp (str, optional) β Fingerprint of the userβs second RSA public key
ext_authn_duo (bool, optional)
ext_authn_uid (str, optional)
owner (str, optional)
snowflake_lock (bool, default False) β Whether the user, account, or organization is locked by Snowflake.
snowflake_support (bool, default False) β Whether Snowflake Support is allowed to use the user or account
mins_to_bypass_network_policy (int, optional) β Temporary bypass network policy on the user for a specified number of minutes
password_last_set (datetime, optional)
custom_landing_page_url (str, optional)
custom_landing_page_url_flush_next_ui_load (bool, default False) β Whether or not to flush the custom landing page of the user on next UI load
Methods
- classmethod from_dict(obj: dict) UserModel ΒΆ
Creates an instance of User from a dict.
This method constructs a User object from a dictionary with the key-value pairs of its properties.
- Parameters:
obj (dict) β A dictionary whose keys and values correspond to the properties of the resource object.
- Returns:
A User object created using the input dictionary; this will fail if the required properties are missing.
- Return type:
- to_dict()ΒΆ
Creates a dictionary of the properties from a User.
This method constructs a dictionary with the key-value entries corresponding to the properties of the User object.
- Returns:
A dictionary object created using the input model.
- Return type:
dict