WorkMail / Client / list_groups

list_groups#

WorkMail.Client.list_groups(**kwargs)#

Returns summaries of the organization’s groups.

See also: AWS API Documentation

Request Syntax

response = client.list_groups(
    OrganizationId='string',
    NextToken='string',
    MaxResults=123,
    Filters={
        'NamePrefix': 'string',
        'PrimaryEmailPrefix': 'string',
        'State': 'ENABLED'|'DISABLED'|'DELETED'
    }
)
Parameters:
  • OrganizationId (string) –

    [REQUIRED]

    The identifier for the organization under which the groups 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.

  • Filters (dict) –

    Limit the search results based on the filter criteria. Only one filter per request is supported.

    • NamePrefix (string) –

      Filters only groups with the provided name prefix.

    • PrimaryEmailPrefix (string) –

      Filters only groups with the provided primary email prefix.

    • State (string) –

      Filters only groups with the provided state.

Return type:

dict

Returns:

Response Syntax

{
    'Groups': [
        {
            'Id': 'string',
            'Email': 'string',
            'Name': 'string',
            'State': 'ENABLED'|'DISABLED'|'DELETED',
            'EnabledDate': datetime(2015, 1, 1),
            'DisabledDate': datetime(2015, 1, 1)
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • Groups (list) –

      The overview of groups for an organization.

      • (dict) –

        The representation of an WorkMail group.

        • Id (string) –

          The identifier of the group.

        • Email (string) –

          The email of the group.

        • Name (string) –

          The name of the group.

        • State (string) –

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

        • EnabledDate (datetime) –

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

        • DisabledDate (datetime) –

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

    • NextToken (string) –

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

Exceptions

  • WorkMail.Client.exceptions.EntityNotFoundException

  • WorkMail.Client.exceptions.InvalidParameterException

  • WorkMail.Client.exceptions.OrganizationNotFoundException

  • WorkMail.Client.exceptions.OrganizationStateException