getMessageTemplate method
Retrieves the Amazon Q in Connect message template. The message template
identifier can contain an optional qualifier, for example,
<message-template-id>:<qualifier>, which is
either an actual version number or an Amazon Q Connect managed qualifier
$ACTIVE_VERSION | $LATEST. If it is not
supplied, then $LATEST is assumed implicitly.
May throw AccessDeniedException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw UnauthorizedException.
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.
Implementation
Future<GetMessageTemplateResponse> getMessageTemplate({
required String knowledgeBaseId,
required String messageTemplateId,
}) async {
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/knowledgeBases/${Uri.encodeComponent(knowledgeBaseId)}/messageTemplates/${Uri.encodeComponent(messageTemplateId)}',
exceptionFnMap: _exceptionFns,
);
return GetMessageTemplateResponse.fromJson(response);
}