describeRecommendationFeedback method

Future<DescribeRecommendationFeedbackResponse> describeRecommendationFeedback({
  1. required String codeReviewArn,
  2. required String recommendationId,
  3. String? userId,
})

Describes the customer feedback for a CodeGuru Reviewer recommendation.

May throw ResourceNotFoundException. May throw InternalServerException. May throw ValidationException. May throw AccessDeniedException. May throw ThrottlingException.

Parameter codeReviewArn : The Amazon Resource Name (ARN) of the CodeReview object.

Parameter recommendationId : The recommendation ID that can be used to track the provided recommendations and then to collect the feedback.

Parameter userId : Optional parameter to describe the feedback for a given user. If this is not supplied, it defaults to the user making the request.

The UserId is an IAM principal that can be specified as an AWS account ID or an Amazon Resource Name (ARN). For more information, see Specifying a Principal in the AWS Identity and Access Management User Guide.

Implementation

Future<DescribeRecommendationFeedbackResponse>
    describeRecommendationFeedback({
  required String codeReviewArn,
  required String recommendationId,
  String? userId,
}) async {
  ArgumentError.checkNotNull(codeReviewArn, 'codeReviewArn');
  _s.validateStringLength(
    'codeReviewArn',
    codeReviewArn,
    1,
    1600,
    isRequired: true,
  );
  ArgumentError.checkNotNull(recommendationId, 'recommendationId');
  _s.validateStringLength(
    'recommendationId',
    recommendationId,
    1,
    64,
    isRequired: true,
  );
  _s.validateStringLength(
    'userId',
    userId,
    1,
    256,
  );
  final $query = <String, List<String>>{
    'RecommendationId': [recommendationId],
    if (userId != null) 'UserId': [userId],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/feedback/${Uri.encodeComponent(codeReviewArn)}',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return DescribeRecommendationFeedbackResponse.fromJson(response);
}