DeactivateMessageTemplateCommand

Deactivates a specific version of the Amazon Q in Connect message template . After the version is deactivated, you can no longer use the $ACTIVE_VERSION qualifier to reference the version in active status.

Example Syntax

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

import { QConnectClient, DeactivateMessageTemplateCommand } from "@aws-sdk/client-qconnect"; // ES Modules import
// const { QConnectClient, DeactivateMessageTemplateCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import
const client = new QConnectClient(config);
const input = { // DeactivateMessageTemplateRequest
  knowledgeBaseId: "STRING_VALUE", // required
  messageTemplateId: "STRING_VALUE", // required
  versionNumber: Number("long"), // required
};
const command = new DeactivateMessageTemplateCommand(input);
const response = await client.send(command);
// { // DeactivateMessageTemplateResponse
//   messageTemplateArn: "STRING_VALUE", // required
//   messageTemplateId: "STRING_VALUE", // required
//   versionNumber: Number("long"), // required
// };

DeactivateMessageTemplateCommand Input

Parameter
Type
Description
knowledgeBaseId
Required
string | undefined

The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

messageTemplateId
Required
string | undefined

The identifier of the message template. Can be either the ID or the ARN. It cannot contain any qualifier.

versionNumber
Required
number | undefined

The version number of the message template version to deactivate.

DeactivateMessageTemplateCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
messageTemplateArn
Required
string | undefined

The Amazon Resource Name (ARN) of the message template.

messageTemplateId
Required
string | undefined

The identifier of the message template.

versionNumber
Required
number | undefined

The version number of the message template version that has been deactivated.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient access to perform this action.

ConflictException
client

The request could not be processed because of conflict in the current state of the resource. For example, if you're using a Create API (such as CreateAssistant) that accepts name, a conflicting resource (usually with the same name) is being created or mutated.

ResourceNotFoundException
client

The specified resource does not exist.

ThrottlingException
client

The throttling limit has been exceeded.

ValidationException
client

The input fails to satisfy the constraints specified by a service.

QConnectServiceException
Base exception class for all service exceptions from QConnect service.