WorkMail / Client / list_groups_for_entity

list_groups_for_entity#

WorkMail.Client.list_groups_for_entity(**kwargs)#

Returns all the groups to which an entity belongs.

See also: AWS API Documentation

Request Syntax

response = client.list_groups_for_entity(
    OrganizationId='string',
    EntityId='string',
    Filters={
        'GroupNamePrefix': 'string'
    },
    NextToken='string',
    MaxResults=123
)
Parameters:
  • OrganizationId (string) –

    [REQUIRED]

    The identifier for the organization under which the entity exists.

  • EntityId (string) –

    [REQUIRED]

    The identifier for the entity.

    The entity ID can accept UserId or GroupID, Username or Groupname, or email.

    • Entity ID: 12345678-1234-1234-1234-123456789012 or S-1-1-12-1234567890-123456789-123456789-1234

    • Email address: entity@domain.tld

    • Entity name: entity

  • Filters (dict) –

    Limit the search results based on the filter criteria.

    • GroupNamePrefix (string) –

      Filters only group names that start with the provided name prefix.

  • 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

{
    'Groups': [
        {
            'GroupId': 'string',
            'GroupName': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) –

    • Groups (list) –

      The overview of groups in an organization.

      • (dict) –

        The identifier that contains the Group ID and name of a group.

        • GroupId (string) –

          Group ID that matched the group.

        • GroupName (string) –

          Group name that matched the group.

    • 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.EntityNotFoundException

  • WorkMail.Client.exceptions.EntityStateException

  • WorkMail.Client.exceptions.OrganizationNotFoundException

  • WorkMail.Client.exceptions.OrganizationStateException

  • WorkMail.Client.exceptions.InvalidParameterException