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
)
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.

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