StopContactRecordingCommand

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.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { ConnectClient, StopContactRecordingCommand } from "@aws-sdk/client-connect"; // ES Modules import
// const { ConnectClient, StopContactRecordingCommand } = require("@aws-sdk/client-connect"); // CommonJS import
const client = new ConnectClient(config);
const input = { // StopContactRecordingRequest
  InstanceId: "STRING_VALUE", // required
  ContactId: "STRING_VALUE", // required
  InitialContactId: "STRING_VALUE", // required
  ContactRecordingType: "AGENT" || "IVR" || "SCREEN",
};
const command = new StopContactRecordingCommand(input);
const response = await client.send(command);
// {};

StopContactRecordingCommand Input

Parameter
Type
Description
ContactId
Required
string | undefined

The identifier of the contact.

InitialContactId
Required
string | undefined

The identifier of the contact. This is the identifier of the contact associated with the first interaction with the contact center.

InstanceId
Required
string | undefined

The identifier of the Amazon Connect instance. You can find the instance ID  in the Amazon Resource Name (ARN) of the instance.

ContactRecordingType
ContactRecordingType | undefined

The type of recording being operated on.

StopContactRecordingCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.

Throws

Name
Fault
Details
InternalServiceException
server

Request processing failed because of an error or failure with the service.

InvalidRequestException
client

The request is not valid.

ResourceNotFoundException
client

The specified resource was not found.

ConnectServiceException
Base exception class for all service exceptions from Connect service.