getSimilarProfiles method
Returns a set of profiles that belong to the same matching group using the
matchId or profileId. You can also specify the
type of matching that you want for finding similar profiles using either
RULE_BASED_MATCHING or ML_BASED_MATCHING.
May throw AccessDeniedException.
May throw BadRequestException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
Parameter domainName :
The unique name of the domain.
Parameter matchType :
Specify the type of matching to get similar profiles for.
Parameter searchKey :
The string indicating the search key to be used.
Parameter searchValue :
The string based on SearchKey to be searched for similar
profiles.
Parameter maxResults :
The maximum number of objects returned per page.
Parameter nextToken :
The pagination token from the previous GetSimilarProfiles API
call.
Implementation
Future<GetSimilarProfilesResponse> getSimilarProfiles({
required String domainName,
required MatchType matchType,
required String searchKey,
required String searchValue,
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final $query = <String, List<String>>{
if (maxResults != null) 'max-results': [maxResults.toString()],
if (nextToken != null) 'next-token': [nextToken],
};
final $payload = <String, dynamic>{
'MatchType': matchType.value,
'SearchKey': searchKey,
'SearchValue': searchValue,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/domains/${Uri.encodeComponent(domainName)}/matches',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return GetSimilarProfilesResponse.fromJson(response);
}