searchUserProfiles method

Future<SearchUserProfilesOutput> searchUserProfiles({
  1. required String domainIdentifier,
  2. required UserSearchType userType,
  3. int? maxResults,
  4. String? nextToken,
  5. String? searchText,
})

Searches user profiles in Amazon DataZone.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter domainIdentifier : The identifier of the Amazon DataZone domain in which you want to search user profiles.

Parameter userType : Specifies the user type for the SearchUserProfiles action.

Parameter maxResults : The maximum number of results to return in a single call to SearchUserProfiles. When the number of results to be listed is greater than the value of MaxResults, the response contains a NextToken value that you can use in a subsequent call to SearchUserProfiles to list the next set of results.

Parameter nextToken : When the number of results is greater than the default value for the MaxResults parameter, or if you explicitly specify a value for MaxResults that is less than the number of results, the response includes a pagination token named NextToken. You can specify this NextToken value in a subsequent call to SearchUserProfiles to list the next set of results.

Parameter searchText : Specifies the text for which to search.

Implementation

Future<SearchUserProfilesOutput> searchUserProfiles({
  required String domainIdentifier,
  required UserSearchType userType,
  int? maxResults,
  String? nextToken,
  String? searchText,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    50,
  );
  final $payload = <String, dynamic>{
    'userType': userType.value,
    if (maxResults != null) 'maxResults': maxResults,
    if (nextToken != null) 'nextToken': nextToken,
    if (searchText != null) 'searchText': searchText,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/v2/domains/${Uri.encodeComponent(domainIdentifier)}/search-user-profiles',
    exceptionFnMap: _exceptionFns,
  );
  return SearchUserProfilesOutput.fromJson(response);
}