updateQuickResponse method

Future<UpdateQuickResponseResponse> updateQuickResponse({
  1. required String knowledgeBaseId,
  2. required String quickResponseId,
  3. List<String>? channels,
  4. QuickResponseDataProvider? content,
  5. String? contentType,
  6. String? description,
  7. GroupingConfiguration? groupingConfiguration,
  8. bool? isActive,
  9. String? language,
  10. String? name,
  11. bool? removeDescription,
  12. bool? removeGroupingConfiguration,
  13. bool? removeShortcutKey,
  14. String? shortcutKey,
})

Updates an existing Wisdom quick response.

May throw AccessDeniedException. May throw ConflictException. May throw PreconditionFailedException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter knowledgeBaseId : The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base if you're storing Wisdom Content resource to it. Can be either the ID or the ARN. URLs cannot contain the ARN.

Parameter quickResponseId : The identifier of the quick response.

Parameter channels : The Amazon Connect contact channels this quick response applies to. The supported contact channel types include Chat.

Parameter content : The updated content of the quick response.

Parameter contentType : The media type of the quick response content.

  • Use application/x.quickresponse;format=plain for quick response written in plain text.
  • Use application/x.quickresponse;format=markdown for quick response written in richtext.

Parameter description : The updated description of the quick response.

Parameter groupingConfiguration : The updated grouping configuration of the quick response.

Parameter isActive : Whether the quick response is active.

Parameter language : 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

Parameter name : The name of the quick response.

Parameter removeDescription : Whether to remove the description from the quick response.

Parameter removeGroupingConfiguration : Whether to remove the grouping configuration of the quick response.

Parameter removeShortcutKey : Whether to remove the shortcut key of the quick response.

Parameter shortcutKey : The shortcut key of the quick response. The value should be unique across the knowledge base.

Implementation

Future<UpdateQuickResponseResponse> updateQuickResponse({
  required String knowledgeBaseId,
  required String quickResponseId,
  List<String>? channels,
  QuickResponseDataProvider? content,
  String? contentType,
  String? description,
  GroupingConfiguration? groupingConfiguration,
  bool? isActive,
  String? language,
  String? name,
  bool? removeDescription,
  bool? removeGroupingConfiguration,
  bool? removeShortcutKey,
  String? shortcutKey,
}) async {
  final $payload = <String, dynamic>{
    if (channels != null) 'channels': channels,
    if (content != null) 'content': content,
    if (contentType != null) 'contentType': contentType,
    if (description != null) 'description': description,
    if (groupingConfiguration != null)
      'groupingConfiguration': groupingConfiguration,
    if (isActive != null) 'isActive': isActive,
    if (language != null) 'language': language,
    if (name != null) 'name': name,
    if (removeDescription != null) 'removeDescription': removeDescription,
    if (removeGroupingConfiguration != null)
      'removeGroupingConfiguration': removeGroupingConfiguration,
    if (removeShortcutKey != null) 'removeShortcutKey': removeShortcutKey,
    if (shortcutKey != null) 'shortcutKey': shortcutKey,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/knowledgeBases/${Uri.encodeComponent(knowledgeBaseId)}/quickResponses/${Uri.encodeComponent(quickResponseId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateQuickResponseResponse.fromJson(response);
}