suspendContactRecording method

Future<void> suspendContactRecording({
  1. required String contactId,
  2. required String initialContactId,
  3. required String instanceId,
})

When a contact is being recorded, this API suspends recording the call. For example, you might suspend the call recording while collecting sensitive information, such as a credit card number. Then use ResumeContactRecording to restart recording.

The period of time that the recording is suspended is filled with silence in the final recording.

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> suspendContactRecording({
  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/suspend-recording',
    exceptionFnMap: _exceptionFns,
  );
}