stopContactRecording method
Stops recording a call when a contact is being recorded. StopContactRecording is a one-time action. If you use StopContactRecording to stop recording an ongoing call, you can't use StartContactRecording to restart it. For scenarios where the recording has started and you want to suspend it for sensitive information (for example, to collect a credit card number), and then restart it, use SuspendContactRecording and ResumeContactRecording.
Only voice recordings are supported at this time.
May throw InternalServiceException.
May throw InvalidActiveRegionException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
Parameter contactId :
The identifier of the contact.
Parameter initialContactId :
The identifier of the contact. This is the identifier of the contact
associated with the first interaction with the contact center.
Parameter instanceId :
The identifier of the Connect Customer instance. You can find
the instance ID in the Amazon Resource Name (ARN) of the instance.
Parameter contactRecordingType :
The type of recording being operated on.
Implementation
Future<void> stopContactRecording({
required String contactId,
required String initialContactId,
required String instanceId,
ContactRecordingType? contactRecordingType,
}) async {
final $payload = <String, dynamic>{
'ContactId': contactId,
'InitialContactId': initialContactId,
'InstanceId': instanceId,
if (contactRecordingType != null)
'ContactRecordingType': contactRecordingType.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/contact/stop-recording',
exceptionFnMap: _exceptionFns,
);
}