listRecommendationFeedback method

Future<ListRecommendationFeedbackResponse> listRecommendationFeedback({
  1. required String codeReviewArn,
  2. int? maxResults,
  3. String? nextToken,
  4. List<String>? recommendationIds,
  5. List<String>? userIds,
})

Returns a list of RecommendationFeedbackSummary objects that contain customer recommendation feedback for all CodeGuru Reviewer users.

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 maxResults : The maximum number of results that are returned per call. The default is 100.

Parameter nextToken : If nextToken is returned, there are more results available. The value of nextToken is a unique pagination token for each page. Make the call again using the returned token to retrieve the next page. Keep all other arguments unchanged.

Parameter recommendationIds : Used to query the recommendation feedback for a given recommendation.

Parameter userIds : An AWS user's account ID or Amazon Resource Name (ARN). Use this ID to query the recommendation feedback for a code review from that user.

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<ListRecommendationFeedbackResponse> listRecommendationFeedback({
  required String codeReviewArn,
  int? maxResults,
  String? nextToken,
  List<String>? recommendationIds,
  List<String>? userIds,
}) async {
  ArgumentError.checkNotNull(codeReviewArn, 'codeReviewArn');
  _s.validateStringLength(
    'codeReviewArn',
    codeReviewArn,
    1,
    1600,
    isRequired: true,
  );
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    100,
  );
  _s.validateStringLength(
    'nextToken',
    nextToken,
    1,
    2048,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'MaxResults': [maxResults.toString()],
    if (nextToken != null) 'NextToken': [nextToken],
    if (recommendationIds != null) 'RecommendationIds': recommendationIds,
    if (userIds != null) 'UserIds': userIds,
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/feedback/${Uri.encodeComponent(codeReviewArn)}/RecommendationFeedback',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListRecommendationFeedbackResponse.fromJson(response);
}