evaluateSession method
Evaluates a specified session based on audio data accumulated during a streaming Amazon Connect Voice ID call.
May throw AccessDeniedException.
May throw ConflictException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter domainId :
The identifier of the domain where the session started.
Parameter sessionNameOrId :
The session identifier, or name of the session, that you want to evaluate.
In Voice ID integration, this is the Contact-Id.
Implementation
Future<EvaluateSessionResponse> evaluateSession({
required String domainId,
required String sessionNameOrId,
}) async {
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.0',
'X-Amz-Target': 'VoiceID.EvaluateSession'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'DomainId': domainId,
'SessionNameOrId': sessionNameOrId,
},
);
return EvaluateSessionResponse.fromJson(jsonResponse.body);
}