putFeedback method

Future<PutFeedbackResponse> putFeedback({
  1. required String assistantId,
  2. required ContentFeedbackData contentFeedback,
  3. required String targetId,
  4. required TargetType targetType,
})

Provides feedback against the specified assistant for the specified target. This API only supports generative targets.

May throw AccessDeniedException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter assistantId : The identifier of the Amazon Q in Connect assistant.

Parameter contentFeedback : Information about the feedback provided.

Parameter targetId : The identifier of the feedback target.

Parameter targetType : The type of the feedback target.

Implementation

Future<PutFeedbackResponse> putFeedback({
  required String assistantId,
  required ContentFeedbackData contentFeedback,
  required String targetId,
  required TargetType targetType,
}) async {
  final $payload = <String, dynamic>{
    'contentFeedback': contentFeedback,
    'targetId': targetId,
    'targetType': targetType.value,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/assistants/${Uri.encodeComponent(assistantId)}/feedback',
    exceptionFnMap: _exceptionFns,
  );
  return PutFeedbackResponse.fromJson(response);
}