updateMessageTemplateMetadata method
Updates the Amazon Q in Connect message template metadata. Note that any
modification to the message template’s name, description and grouping
configuration will applied to the message template pointed by the
$LATEST qualifier and all available versions. Partial update
is supported. If any field is not supplied, it will remain unchanged for
the message template.
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 description :
The description of the message template.
Parameter name :
The name of the message template.
Implementation
Future<UpdateMessageTemplateMetadataResponse> updateMessageTemplateMetadata({
required String knowledgeBaseId,
required String messageTemplateId,
String? description,
GroupingConfiguration? groupingConfiguration,
String? name,
}) async {
final $payload = <String, dynamic>{
if (description != null) 'description': description,
if (groupingConfiguration != null)
'groupingConfiguration': groupingConfiguration,
if (name != null) 'name': name,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri:
'/knowledgeBases/${Uri.encodeComponent(knowledgeBaseId)}/messageTemplates/${Uri.encodeComponent(messageTemplateId)}/metadata',
exceptionFnMap: _exceptionFns,
);
return UpdateMessageTemplateMetadataResponse.fromJson(response);
}