searchUsers

abstract suspend fun searchUsers(input: SearchUsersRequest): SearchUsersResponse

Searches the specified directory for a user. You can find users that match the SearchString parameter with the value of their attributes included in the SearchString parameter.

This operation supports pagination with the use of the NextToken request and response parameters. If more results are available, the SearchUsers.NextToken member contains a token that you pass in the next call to SearchUsers. This retrieves the next set of items.

You can also specify a maximum number of return results with the MaxResults parameter.

Samples


fun main() { 
   //sampleStart 
   // The following command searches for users in the domain based on the SearchAttributes.
val resp = directoryServiceDataClient.searchUsers {
    directoryId = "d-12233abcde"
    realm = "examplecorp.com"
    searchAttributes = listOf<String>(
        "department"
    )
    searchString = "DevOps"
} 
   //sampleEnd
}