WorkMail / Client / create_user
create_user#
- WorkMail.Client.create_user(**kwargs)#
Creates a user who can be used in WorkMail by calling the RegisterToWorkMail operation.
See also: AWS API Documentation
Request Syntax
response = client.create_user( OrganizationId='string', Name='string', DisplayName='string', Password='string', Role='USER'|'RESOURCE'|'SYSTEM_USER'|'REMOTE_USER', FirstName='string', LastName='string', HiddenFromGlobalAddressList=True|False, IdentityProviderUserId='string' )
- Parameters:
OrganizationId (string) –
[REQUIRED]
The identifier of the organization for which the user is created.
Name (string) –
[REQUIRED]
The name for the new user. WorkMail directory user names have a maximum length of 64. All others have a maximum length of 20.
DisplayName (string) –
[REQUIRED]
The display name for the new user.
Password (string) – The password for the new user.
Role (string) –
The role of the new user.
You cannot pass SYSTEM_USER or RESOURCE role in a single request. When a user role is not selected, the default role of USER is selected.
FirstName (string) – The first name of the new user.
LastName (string) – The last name of the new user.
HiddenFromGlobalAddressList (boolean) – If this parameter is enabled, the user will be hidden from the address book.
IdentityProviderUserId (string) – 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.
- Return type:
dict
- Returns:
Response Syntax
{ 'UserId': 'string' }
Response Structure
(dict) –
UserId (string) –
The identifier for the new user.
Exceptions
WorkMail.Client.exceptions.DirectoryServiceAuthenticationFailedException
WorkMail.Client.exceptions.DirectoryUnavailableException
WorkMail.Client.exceptions.InvalidParameterException
WorkMail.Client.exceptions.InvalidPasswordException
WorkMail.Client.exceptions.NameAvailabilityException
WorkMail.Client.exceptions.OrganizationNotFoundException
WorkMail.Client.exceptions.OrganizationStateException
WorkMail.Client.exceptions.ReservedNameException
WorkMail.Client.exceptions.UnsupportedOperationException