AlexaForBusiness / Client / search_users

search_users#

AlexaForBusiness.Client.search_users(**kwargs)#

Searches users and lists the ones that meet a set of filter and sort criteria.

Danger

This operation is deprecated and may not function as expected. This operation should not be used going forward and is only kept for the purpose of backwards compatiblity.

See also: AWS API Documentation

Request Syntax

response = client.search_users(
    NextToken='string',
    MaxResults=123,
    Filters=[
        {
            'Key': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    SortCriteria=[
        {
            'Key': 'string',
            'Value': 'ASC'|'DESC'
        },
    ]
)
Parameters:
  • NextToken (string) – An optional token returned from a prior request. Use this token for pagination of results from this action. If this parameter is specified, the response includes only results beyond the token, up to the value specified by MaxResults. Required.

  • MaxResults (integer) – The maximum number of results to include in the response. If more results exist than the specified MaxResults value, a token is included in the response so that the remaining results can be retrieved. Required.

  • Filters (list) –

    The filters to use for listing a specific set of users. Required. Supported filter keys are UserId, FirstName, LastName, Email, and EnrollmentStatus.

    • (dict) –

      A filter name and value pair that is used to return a more specific list of results. Filters can be used to match a set of resources by various criteria.

      • Key (string) – [REQUIRED]

        The key of a filter.

      • Values (list) – [REQUIRED]

        The values of a filter.

        • (string) –

  • SortCriteria (list) –

    The sort order to use in listing the filtered set of users. Required. Supported sort keys are UserId, FirstName, LastName, Email, and EnrollmentStatus.

    • (dict) –

      An object representing a sort criteria.

      • Key (string) – [REQUIRED]

        The sort key of a sort object.

      • Value (string) – [REQUIRED]

        The sort value of a sort object.

Return type:

dict

Returns:

Response Syntax

{
    'Users': [
        {
            'UserArn': 'string',
            'FirstName': 'string',
            'LastName': 'string',
            'Email': 'string',
            'EnrollmentStatus': 'INITIALIZED'|'PENDING'|'REGISTERED'|'DISASSOCIATING'|'DEREGISTERING',
            'EnrollmentId': 'string'
        },
    ],
    'NextToken': 'string',
    'TotalCount': 123
}

Response Structure

  • (dict) –

    • Users (list) –

      The users that meet the specified set of filter criteria, in sort order.

      • (dict) –

        Information related to a user.

        • UserArn (string) –

          The ARN of a user.

        • FirstName (string) –

          The first name of a user.

        • LastName (string) –

          The last name of a user.

        • Email (string) –

          The email of a user.

        • EnrollmentStatus (string) –

          The enrollment status of a user.

        • EnrollmentId (string) –

          The enrollment ARN of a user.

    • NextToken (string) –

      The token returned to indicate that there is more data available.

    • TotalCount (integer) –

      The total number of users returned.