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

    [REQUIRED]

    The password for the new user.

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