aws_sdk_workmail/client/
create_user.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`CreateUser`](crate::operation::create_user::builders::CreateUserFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`organization_id(impl Into<String>)`](crate::operation::create_user::builders::CreateUserFluentBuilder::organization_id) / [`set_organization_id(Option<String>)`](crate::operation::create_user::builders::CreateUserFluentBuilder::set_organization_id):<br>required: **true**<br><p>The identifier of the organization for which the user is created.</p><br>
    ///   - [`name(impl Into<String>)`](crate::operation::create_user::builders::CreateUserFluentBuilder::name) / [`set_name(Option<String>)`](crate::operation::create_user::builders::CreateUserFluentBuilder::set_name):<br>required: **true**<br><p>The name for the new user. WorkMail directory user names have a maximum length of 64. All others have a maximum length of 20.</p><br>
    ///   - [`display_name(impl Into<String>)`](crate::operation::create_user::builders::CreateUserFluentBuilder::display_name) / [`set_display_name(Option<String>)`](crate::operation::create_user::builders::CreateUserFluentBuilder::set_display_name):<br>required: **true**<br><p>The display name for the new user.</p><br>
    ///   - [`password(impl Into<String>)`](crate::operation::create_user::builders::CreateUserFluentBuilder::password) / [`set_password(Option<String>)`](crate::operation::create_user::builders::CreateUserFluentBuilder::set_password):<br>required: **false**<br><p>The password for the new user.</p><br>
    ///   - [`role(UserRole)`](crate::operation::create_user::builders::CreateUserFluentBuilder::role) / [`set_role(Option<UserRole>)`](crate::operation::create_user::builders::CreateUserFluentBuilder::set_role):<br>required: **false**<br><p>The role of the new user.</p> <p>You cannot pass <i>SYSTEM_USER</i> or <i>RESOURCE</i> role in a single request. When a user role is not selected, the default role of <i>USER</i> is selected.</p><br>
    ///   - [`first_name(impl Into<String>)`](crate::operation::create_user::builders::CreateUserFluentBuilder::first_name) / [`set_first_name(Option<String>)`](crate::operation::create_user::builders::CreateUserFluentBuilder::set_first_name):<br>required: **false**<br><p>The first name of the new user.</p><br>
    ///   - [`last_name(impl Into<String>)`](crate::operation::create_user::builders::CreateUserFluentBuilder::last_name) / [`set_last_name(Option<String>)`](crate::operation::create_user::builders::CreateUserFluentBuilder::set_last_name):<br>required: **false**<br><p>The last name of the new user.</p><br>
    ///   - [`hidden_from_global_address_list(bool)`](crate::operation::create_user::builders::CreateUserFluentBuilder::hidden_from_global_address_list) / [`set_hidden_from_global_address_list(Option<bool>)`](crate::operation::create_user::builders::CreateUserFluentBuilder::set_hidden_from_global_address_list):<br>required: **false**<br><p>If this parameter is enabled, the user will be hidden from the address book.</p><br>
    ///   - [`identity_provider_user_id(impl Into<String>)`](crate::operation::create_user::builders::CreateUserFluentBuilder::identity_provider_user_id) / [`set_identity_provider_user_id(Option<String>)`](crate::operation::create_user::builders::CreateUserFluentBuilder::set_identity_provider_user_id):<br>required: **false**<br><p>User ID from the IAM Identity Center. If this parameter is empty it will be updated automatically when the user logs in for the first time to the mailbox associated with WorkMail.</p><br>
    /// - On success, responds with [`CreateUserOutput`](crate::operation::create_user::CreateUserOutput) with field(s):
    ///   - [`user_id(Option<String>)`](crate::operation::create_user::CreateUserOutput::user_id): <p>The identifier for the new user.</p>
    /// - On failure, responds with [`SdkError<CreateUserError>`](crate::operation::create_user::CreateUserError)
    pub fn create_user(&self) -> crate::operation::create_user::builders::CreateUserFluentBuilder {
        crate::operation::create_user::builders::CreateUserFluentBuilder::new(self.handle.clone())
    }
}