pub struct AlterUser {Show 19 fields
pub if_exists: bool,
pub name: Ident,
pub rename_to: Option<Ident>,
pub reset_password: bool,
pub abort_all_queries: bool,
pub add_role_delegation: Option<AlterUserAddRoleDelegation>,
pub remove_role_delegation: Option<AlterUserRemoveRoleDelegation>,
pub enroll_mfa: bool,
pub set_default_mfa_method: Option<MfaMethodKind>,
pub remove_mfa_method: Option<MfaMethodKind>,
pub modify_mfa_method: Option<AlterUserModifyMfaMethod>,
pub add_mfa_method_otp: Option<AlterUserAddMfaMethodOtp>,
pub set_policy: Option<AlterUserSetPolicy>,
pub unset_policy: Option<UserPolicyKind>,
pub set_tag: KeyValueOptions,
pub unset_tag: Vec<String>,
pub set_props: KeyValueOptions,
pub unset_props: Vec<String>,
pub password: Option<AlterUserPassword>,
}Expand description
Modifies the properties of a user
ALTER USER [ IF EXISTS ] [ <name> ] [ OPTIONS ]ALTER USER <role_specification> [ WITH ] option [ ... ]Fields§
§if_exists: boolWhether to only alter the user if it exists.
name: IdentThe name of the user to alter.
rename_to: Option<Ident>Optional new name for the user (Snowflake-specific). See: https://docs.snowflake.com/en/sql-reference/sql/alter-user#syntax
reset_password: boolReset the user’s password.
abort_all_queries: boolAbort all running queries for the user.
add_role_delegation: Option<AlterUserAddRoleDelegation>Optionally add a delegated role authorization.
remove_role_delegation: Option<AlterUserRemoveRoleDelegation>Optionally remove a delegated role authorization.
enroll_mfa: boolEnroll the user in MFA.
set_default_mfa_method: Option<MfaMethodKind>Set the default MFA method for the user.
remove_mfa_method: Option<MfaMethodKind>Remove the user’s default MFA method.
modify_mfa_method: Option<AlterUserModifyMfaMethod>Modify an MFA method for the user.
add_mfa_method_otp: Option<AlterUserAddMfaMethodOtp>Add an MFA OTP method with optional count.
set_policy: Option<AlterUserSetPolicy>Set a user policy.
unset_policy: Option<UserPolicyKind>Unset a user policy.
set_tag: KeyValueOptionsKey/value tag options to set on the user.
unset_tag: Vec<String>Tags to unset on the user.
set_props: KeyValueOptionsKey/value properties to set on the user.
unset_props: Vec<String>Properties to unset on the user.
password: Option<AlterUserPassword>The following options are PostgreSQL-specific: https://www.postgresql.org/docs/current/sql-alteruser.html
Trait Implementations§
impl Eq for AlterUser
Source§impl Ord for AlterUser
impl Ord for AlterUser
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for AlterUser
impl PartialOrd for AlterUser
impl StructuralPartialEq for AlterUser
Source§impl VisitMut for AlterUser
impl VisitMut for AlterUser
Source§fn visit<V>(&mut self, visitor: &mut V) -> ControlFlow<<V as VisitorMut>::Break>where
V: VisitorMut,
fn visit<V>(&mut self, visitor: &mut V) -> ControlFlow<<V as VisitorMut>::Break>where
V: VisitorMut,
VisitorMut. Read moreAuto Trait Implementations§
impl Freeze for AlterUser
impl RefUnwindSafe for AlterUser
impl Send for AlterUser
impl Sync for AlterUser
impl Unpin for AlterUser
impl UnsafeUnpin for AlterUser
impl UnwindSafe for AlterUser
Blanket Implementations§
Source§impl<Source> AccessAs for Source
impl<Source> AccessAs for Source
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more