Skip to content

describe_recommendation_feedback

describe_recommendation_feedback(
    code_review_arn: Arn,
    recommendation_id: RecommendationId,
    *,
    config_overrides: Optional[CodeGuruReviewerClientConfig] = None,
    user_id: Optional[UserId] = None,
) -> DescribeRecommendationFeedbackResponse

Describes the customer feedback for a CodeGuru Reviewer recommendation.

Parameters:

  • code_review_arn (Arn) –

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

  • recommendation_id (RecommendationId) –

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

  • user_id (Optional[UserId], default: None ) –

    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 Amazon Web Services account ID or an Amazon Resource Name (ARN). For more information, see Specifying a Principal in the Amazon Web Services Identity and Access Management User Guide.

Raises:

Source code in docs_src/capo_codeguru_reviewer/_services/code_guru_reviewer.py
def describe_recommendation_feedback(
    self,
    code_review_arn: "capo_codeguru_reviewer.types.arn.Arn",
    recommendation_id: "capo_codeguru_reviewer.types.recommendation_id.RecommendationId",
    *,
    config_overrides: Optional[CodeGuruReviewerClientConfig] = None,
    user_id: Optional["capo_codeguru_reviewer.types.user_id.UserId"] = None,
) -> "capo_codeguru_reviewer.types.describe_recommendation_feedback_response.DescribeRecommendationFeedbackResponse":
    """<p>Describes the customer feedback for a CodeGuru Reviewer recommendation.</p>

    Args:
        code_review_arn: <p>The Amazon Resource Name (ARN) of the <a href="https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html">CodeReview</a> object. </p>
        recommendation_id: <p>The recommendation ID that can be used to track the provided recommendations and then to collect the feedback.</p>
        user_id: <p>Optional parameter to describe the feedback for a given user. If this is not supplied, it defaults to the user making the request.</p> <p> The <code>UserId</code> is an IAM principal that can be specified as an Amazon Web Services account ID or an Amazon Resource Name (ARN). For more information, see <a href="https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying"> Specifying a Principal</a> in the <i>Amazon Web Services Identity and Access Management User Guide</i>.</p>

    Raises:
        capo_codeguru_reviewer.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_codeguru_reviewer.errors.internal_server_exception.InternalServerException: <p>The server encountered an internal error and is unable to complete the request.</p>
        capo_codeguru_reviewer.errors.resource_not_found_exception.ResourceNotFoundException: <p> The resource specified in the request was not found. </p>
        capo_codeguru_reviewer.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_codeguru_reviewer.errors.validation_exception.ValidationException: <p>The input fails to satisfy the specified constraints.</p>
        capo_codeguru_reviewer.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_codeguru_reviewer.types.describe_recommendation_feedback_request.DescribeRecommendationFeedbackRequest]",
    ) -> OperationResponse[
        "capo_codeguru_reviewer.types.describe_recommendation_feedback_response.DescribeRecommendationFeedbackResponse"
    ]:
        import capo_codeguru_reviewer._operations.aws_guru_frontend_service.describe_recommendation_feedback

        output, http_response = (
            capo_codeguru_reviewer._operations.aws_guru_frontend_service.describe_recommendation_feedback.describe_recommendation_feedback(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeRecommendationFeedback")
    )
    input_: capo_codeguru_reviewer.types.describe_recommendation_feedback_request.DescribeRecommendationFeedbackRequest = {
        "code_review_arn": code_review_arn,
        "recommendation_id": recommendation_id,
    }
    if user_id is not None:
        input_["user_id"] = user_id

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output