WorkMail / Client / list_users

list_users#

WorkMail.Client.list_users(**kwargs)#

Returns summaries of the organization’s users.

See also: AWS API Documentation

Request Syntax

response = client.list_users(
    OrganizationId='string',
    NextToken='string',
    MaxResults=123
)
Parameters:
  • OrganizationId (string) –

    [REQUIRED]

    The identifier for the organization under which the users exist.

  • NextToken (string) – The token to use to retrieve the next page of results. The first call does not contain any tokens.

  • MaxResults (integer) – The maximum number of results to return in a single call.

Return type:

dict

Returns:

Response Syntax

{
    'Users': [
        {
            'Id': 'string',
            'Email': 'string',
            'Name': 'string',
            'DisplayName': 'string',
            'State': 'ENABLED'|'DISABLED'|'DELETED',
            'UserRole': 'USER'|'RESOURCE'|'SYSTEM_USER',
            'EnabledDate': datetime(2015, 1, 1),
            'DisabledDate': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • Users (list) –

      The overview of users for an organization.

      • (dict) –

        The representation of an WorkMail user.

        • Id (string) –

          The identifier of the user.

        • Email (string) –

          The email of the user.

        • Name (string) –

          The name of the user.

        • DisplayName (string) –

          The display name of the user.

        • State (string) –

          The state of the user, which can be ENABLED, DISABLED, or DELETED.

        • UserRole (string) –

          The role of the user.

        • EnabledDate (datetime) –

          The date indicating when the user was enabled for WorkMail use.

        • DisabledDate (datetime) –

          The date indicating when the user was disabled from WorkMail use.

    • NextToken (string) –

      The token to use to retrieve the next page of results. This value is null when there are no more results to return.

Exceptions

  • WorkMail.Client.exceptions.InvalidParameterException

  • WorkMail.Client.exceptions.OrganizationNotFoundException

  • WorkMail.Client.exceptions.OrganizationStateException