Struct aws_sdk_elasticache::input::create_user_input::Builder
source · pub struct Builder { /* private fields */ }
Expand description
A builder for CreateUserInput
.
Implementations§
source§impl Builder
impl Builder
sourcepub fn set_user_id(self, input: Option<String>) -> Self
pub fn set_user_id(self, input: Option<String>) -> Self
The ID of the user.
sourcepub fn set_user_name(self, input: Option<String>) -> Self
pub fn set_user_name(self, input: Option<String>) -> Self
The username of the user.
sourcepub fn set_engine(self, input: Option<String>) -> Self
pub fn set_engine(self, input: Option<String>) -> Self
The current supported value is Redis.
sourcepub fn passwords(self, input: impl Into<String>) -> Self
pub fn passwords(self, input: impl Into<String>) -> Self
Appends an item to passwords
.
To override the contents of this collection use set_passwords
.
Passwords used for this user. You can create up to two passwords for each user.
sourcepub fn set_passwords(self, input: Option<Vec<String>>) -> Self
pub fn set_passwords(self, input: Option<Vec<String>>) -> Self
Passwords used for this user. You can create up to two passwords for each user.
sourcepub fn access_string(self, input: impl Into<String>) -> Self
pub fn access_string(self, input: impl Into<String>) -> Self
Access permissions string used for this user.
sourcepub fn set_access_string(self, input: Option<String>) -> Self
pub fn set_access_string(self, input: Option<String>) -> Self
Access permissions string used for this user.
sourcepub fn no_password_required(self, input: bool) -> Self
pub fn no_password_required(self, input: bool) -> Self
Indicates a password is not required for this user.
sourcepub fn set_no_password_required(self, input: Option<bool>) -> Self
pub fn set_no_password_required(self, input: Option<bool>) -> Self
Indicates a password is not required for this user.
Appends an item to tags
.
To override the contents of this collection use set_tags
.
A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag value, although null is accepted.
A list of tags to be added to this resource. A tag is a key-value pair. A tag key must be accompanied by a tag value, although null is accepted.
sourcepub fn build(self) -> Result<CreateUserInput, BuildError>
pub fn build(self) -> Result<CreateUserInput, BuildError>
Consumes the builder and constructs a CreateUserInput
.
Examples found in repository?
3739 3740 3741 3742 3743 3744 3745 3746 3747 3748 3749 3750 3751 3752 3753 3754 3755 3756 3757 3758 3759 3760 3761 3762 3763 3764 3765 3766 3767 3768 3769 3770 3771 3772 3773 3774 3775 3776 3777 3778 3779 3780 3781
pub async fn customize(
self,
) -> std::result::Result<
crate::operation::customize::CustomizableOperation<
crate::operation::CreateUser,
aws_http::retry::AwsResponseRetryClassifier,
>,
aws_smithy_http::result::SdkError<crate::error::CreateUserError>,
> {
let handle = self.handle.clone();
let operation = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
Ok(crate::operation::customize::CustomizableOperation { handle, operation })
}
/// Sends the request and returns the response.
///
/// If an error occurs, an `SdkError` will be returned with additional details that
/// can be matched against.
///
/// By default, any retryable failures will be retried twice. Retry behavior
/// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
/// set when configuring the client.
pub async fn send(
self,
) -> std::result::Result<
crate::output::CreateUserOutput,
aws_smithy_http::result::SdkError<crate::error::CreateUserError>,
> {
let op = self
.inner
.build()
.map_err(aws_smithy_http::result::SdkError::construction_failure)?
.make_operation(&self.handle.conf)
.await
.map_err(aws_smithy_http::result::SdkError::construction_failure)?;
self.handle.client.call(op).await
}