QConnect / Client / search_message_templates
search_message_templates#
- QConnect.Client.search_message_templates(**kwargs)#
Searches for Amazon Q in Connect message templates in the specified knowledge base.
See also: AWS API Documentation
Request Syntax
response = client.search_message_templates( knowledgeBaseId='string', maxResults=123, nextToken='string', searchExpression={ 'filters': [ { 'includeNoExistence': True|False, 'name': 'string', 'operator': 'EQUALS'|'PREFIX', 'values': [ 'string', ] }, ], 'orderOnField': { 'name': 'string', 'order': 'ASC'|'DESC' }, 'queries': [ { 'allowFuzziness': True|False, 'name': 'string', 'operator': 'CONTAINS'|'CONTAINS_AND_PREFIX', 'priority': 'HIGH'|'MEDIUM'|'LOW', 'values': [ 'string', ] }, ] } )
- Parameters:
knowledgeBaseId (string) –
[REQUIRED]
The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.
maxResults (integer) – The maximum number of results to return per page.
nextToken (string) – The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
searchExpression (dict) –
[REQUIRED]
The search expression for querying the message template.
filters (list) –
The configuration of filtering rules applied to message template query results.
(dict) –
The message template fields to filter the message template query results by. The following is the list of supported field names:
name
description
channel
channelSubtype
language
qualifier
createdTime
lastModifiedTime
lastModifiedBy
groupingConfiguration.criteria
groupingConfiguration.values
includeNoExistence (boolean) –
Whether to treat null value as a match for the attribute field.
name (string) – [REQUIRED]
The name of the attribute field to filter the message templates by.
operator (string) – [REQUIRED]
The operator to use for filtering.
values (list) –
The values of attribute field to filter the message template by.
(string) –
orderOnField (dict) –
The message template attribute fields on which the query results are ordered.
name (string) – [REQUIRED]
The name of the message template.
order (string) –
The order at which the message templates are sorted by.
queries (list) –
The message template query expressions.
(dict) –
The message template fields to query message templates by. The following is the list of supported field names:
name
description
allowFuzziness (boolean) –
Whether the query expects only exact matches on the attribute field values. The results of the query will only include exact matches if this parameter is set to false.
name (string) – [REQUIRED]
The name of the attribute to query the message templates by.
operator (string) – [REQUIRED]
The operator to use for matching attribute field values in the query.
priority (string) –
The importance of the attribute field when calculating query result relevancy scores. The value set for this parameter affects the ordering of search results.
values (list) – [REQUIRED]
The values of the attribute to query the message templates by.
(string) –
- Return type:
dict
- Returns:
Response Syntax
{ 'nextToken': 'string', 'results': [ { 'channelSubtype': 'EMAIL'|'SMS', 'createdTime': datetime(2015, 1, 1), 'description': 'string', 'groupingConfiguration': { 'criteria': 'string', 'values': [ 'string', ] }, 'isActive': True|False, 'knowledgeBaseArn': 'string', 'knowledgeBaseId': 'string', 'language': 'string', 'lastModifiedBy': 'string', 'lastModifiedTime': datetime(2015, 1, 1), 'messageTemplateArn': 'string', 'messageTemplateId': 'string', 'name': 'string', 'tags': { 'string': 'string' }, 'versionNumber': 123 }, ] }
Response Structure
(dict) –
nextToken (string) –
If there are additional results, this is the token for the next set of results.
results (list) –
The results of the message template search.
(dict) –
The result of message template search.
channelSubtype (string) –
The channel subtype this message template applies to.
createdTime (datetime) –
The timestamp when the message template was created.
description (string) –
The description of the message template.
groupingConfiguration (dict) –
The configuration information of the grouping of Amazon Q in Connect users.
criteria (string) –
The criteria used for grouping Amazon Q in Connect users.
The following is the list of supported criteria values.
RoutingProfileArn
: Grouping the users by their Amazon Connect routing profile ARN. User should have SearchRoutingProfile and DescribeRoutingProfile permissions when setting criteria to this value.
values (list) –
The list of values that define different groups of Amazon Q in Connect users.
When setting
criteria
toRoutingProfileArn
, you need to provide a list of ARNs of Amazon Connect routing profiles as values of this parameter.
(string) –
isActive (boolean) –
Whether the version of the message template is activated.
knowledgeBaseArn (string) –
The Amazon Resource Name (ARN) of the knowledge base.
knowledgeBaseId (string) –
The identifier of the knowledge base.
language (string) –
The language code value for the language in which the quick response is written. The supported language codes include
de_DE
,en_US
,es_ES
,fr_FR
,id_ID
,it_IT
,ja_JP
,ko_KR
,pt_BR
,zh_CN
,zh_TW
lastModifiedBy (string) –
The Amazon Resource Name (ARN) of the user who last updated the message template data.
lastModifiedTime (datetime) –
The timestamp when the message template data was last modified.
messageTemplateArn (string) –
The Amazon Resource Name (ARN) of the message template.
messageTemplateId (string) –
The identifier of the message template.
name (string) –
The name of the message template.
tags (dict) –
The tags used to organize, track, or control access for this resource.
(string) –
(string) –
versionNumber (integer) –
The version number of the message template version.
Exceptions
QConnect.Client.exceptions.ValidationException
QConnect.Client.exceptions.AccessDeniedException
QConnect.Client.exceptions.ResourceNotFoundException
QConnect.Client.exceptions.ThrottlingException