stopContactRecording method
When a contact is being recorded, this API stops recording the call. 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 InvalidRequestException. May throw ResourceNotFoundException. May throw InternalServiceException.
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 Amazon Connect instance.
Implementation
Future<void> stopContactRecording({
required String contactId,
required String initialContactId,
required String instanceId,
}) async {
ArgumentError.checkNotNull(contactId, 'contactId');
_s.validateStringLength(
'contactId',
contactId,
1,
256,
isRequired: true,
);
ArgumentError.checkNotNull(initialContactId, 'initialContactId');
_s.validateStringLength(
'initialContactId',
initialContactId,
1,
256,
isRequired: true,
);
ArgumentError.checkNotNull(instanceId, 'instanceId');
_s.validateStringLength(
'instanceId',
instanceId,
1,
100,
isRequired: true,
);
final $payload = <String, dynamic>{
'ContactId': contactId,
'InitialContactId': initialContactId,
'InstanceId': instanceId,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/contact/stop-recording',
exceptionFnMap: _exceptionFns,
);
}