snowflake.core.role.RoleΒΆ
- class snowflake.core.role.Role(name: str, comment: str | None = None, created_on: datetime | None = None, owner: str | None = None, is_default: bool | None = None, is_current: bool | None = None, is_inherited: bool | None = None, assigned_to_users: int | None = None, granted_to_roles: int | None = None, granted_roles: int | None = None)ΒΆ
Bases:
object
A model object representing the Role resource.
Constructs an object of type Role with the provided properties.
- Parameters:
name (str) β Name of the role.
comment (str, optional) β Comment of the role.
created_on (datetime, optional) β Date and time when the role was created.
owner (str, optional) β Specifies the role that owns this role.
is_default (bool, optional) β Specifies whether the role being fetched is the userβs default role.
is_current (bool, optional) β Specifies whether the role being fetched is the userβs current role.
is_inherited (bool, optional) β Specifies whether the role used to run the command inherits the specified role.
assigned_to_users (int, optional) β The number of users to whom this role has been assigned.
granted_to_roles (int, optional) β The number of roles to which this role has been granted.
granted_roles (int, optional) β The number of roles that have been granted to this role.
Methods
- classmethod from_dict(obj: dict) RoleModel ΒΆ
Creates an instance of Role from a dict.
This method constructs a Role 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 Role 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 Role.
This method constructs a dictionary with the key-value entries corresponding to the properties of the Role object.
- Returns:
A dictionary object created using the input model.
- Return type:
dict