activateMessageTemplate method
Activates a specific version of the Amazon Q in Connect message template.
After the version is activated, the previous active version will be
deactivated automatically. You can use the $ACTIVE_VERSION
qualifier later to reference the version that is 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 activate.
Implementation
Future<ActivateMessageTemplateResponse> activateMessageTemplate({
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)}/activate',
exceptionFnMap: _exceptionFns,
);
return ActivateMessageTemplateResponse.fromJson(response);
}