pub struct User {Show 14 fields
pub kind: String,
pub password: String,
pub etag: String,
pub name: String,
pub host: String,
pub instance: String,
pub project: String,
pub type: i32,
pub iam_email: String,
pub password_policy: Option<UserPasswordValidationPolicy>,
pub dual_password_type: Option<i32>,
pub iam_status: Option<i32>,
pub database_roles: Vec<String>,
pub user_details: Option<UserDetails>,
}Expand description
A Cloud SQL user resource.
Fields§
§kind: StringThis is always sql#user.
password: StringThe password for the user.
etag: StringThis field is deprecated and will be removed from a future version of the API.
name: StringThe name of the user in the Cloud SQL instance. Can be omitted for
update because it is already specified in the URL.
host: StringOptional. The host from which the user can connect. For insert
operations, host defaults to an empty string. For update
operations, host is specified as part of the request URL. The host name
cannot be updated after insertion. For a MySQL instance, it’s required;
for a PostgreSQL or SQL Server instance, it’s optional.
instance: StringThe name of the Cloud SQL instance. This does not include the project ID.
Can be omitted for update because it is already specified on the
URL.
project: StringThe project ID of the project containing the Cloud SQL database. The Google
apps domain is prefixed if applicable. Can be omitted for update because
it is already specified on the URL.
type: i32The user type. It determines the method to authenticate the user during login. The default is the database’s built-in user type.
iam_email: StringOptional. The full email for an IAM user. For normal database users, this will not be filled. Only applicable to MySQL database users.
password_policy: Option<UserPasswordValidationPolicy>User level password validation policy.
dual_password_type: Option<i32>Dual password status for the user.
iam_status: Option<i32>Indicates if a group is active or inactive for IAM database authentication.
database_roles: Vec<String>Optional. Role memberships of the user
user_details: Option<UserDetails>User details for specific database type
Implementations§
Source§impl User
impl User
Sourcepub fn type(&self) -> SqlUserType
pub fn type(&self) -> SqlUserType
Returns the enum value of type, or the default if the field is set to an invalid enum value.
Sourcepub fn set_type(&mut self, value: SqlUserType)
pub fn set_type(&mut self, value: SqlUserType)
Sets type to the provided enum value.
Sourcepub fn dual_password_type(&self) -> DualPasswordType
pub fn dual_password_type(&self) -> DualPasswordType
Returns the enum value of dual_password_type, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_dual_password_type(&mut self, value: DualPasswordType)
pub fn set_dual_password_type(&mut self, value: DualPasswordType)
Sets dual_password_type to the provided enum value.
Sourcepub fn iam_status(&self) -> IamStatus
pub fn iam_status(&self) -> IamStatus
Returns the enum value of iam_status, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_iam_status(&mut self, value: IamStatus)
pub fn set_iam_status(&mut self, value: IamStatus)
Sets iam_status to the provided enum value.
Trait Implementations§
Source§impl Message for User
impl Message for User
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.impl Eq for User
impl StructuralPartialEq for User
Auto Trait Implementations§
impl Freeze for User
impl RefUnwindSafe for User
impl Send for User
impl Sync for User
impl Unpin for User
impl UnwindSafe for User
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request