deactivateMessageTemplate method
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.
May throw AccessDeniedException.
May throw ConflictException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter knowledgeBaseId :
The identifier of the knowledge base. Can be either the ID or the ARN.
URLs cannot contain the ARN.
Parameter messageTemplateId :
The identifier of the message template. Can be either the ID or the ARN.
It cannot contain any qualifier.
Parameter versionNumber :
The version number of the message template version to deactivate.
Implementation
Future<DeactivateMessageTemplateResponse> deactivateMessageTemplate({
required String knowledgeBaseId,
required String messageTemplateId,
required int versionNumber,
}) async {
_s.validateNumRange(
'versionNumber',
versionNumber,
1,
1152921504606846976,
isRequired: true,
);
final $payload = <String, dynamic>{
'versionNumber': versionNumber,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/knowledgeBases/${Uri.encodeComponent(knowledgeBaseId)}/messageTemplates/${Uri.encodeComponent(messageTemplateId)}/deactivate',
exceptionFnMap: _exceptionFns,
);
return DeactivateMessageTemplateResponse.fromJson(response);
}