Skip to content

put_agent_recommendation_feedback async

put_agent_recommendation_feedback(
    recommendation_arn: AgentRecommendationArn,
    type: RecommendationFeedbackType,
    *,
    config_overrides: Optional[AsyncWellArchitectedClientConfig] = None,
    feedback_category: Optional[FeedbackCategory] = None,
    comments: Optional[str] = None,
) -> PutAgentRecommendationFeedbackResponse

Submits user feedback on a recommendation to help improve future optimization suggestions and track implementation outcomes.

Parameters:

  • recommendation_arn (AgentRecommendationArn) –

    The Amazon Resource Name (ARN) of the recommendation to provide feedback for.

  • type (RecommendationFeedbackType) –

    The type of feedback being provided.

  • feedback_category (Optional[FeedbackCategory], default: None ) –

    Optional category classifying the nature of the feedback.

  • comments (Optional[str], default: None ) –

    Optional comments providing additional context about the feedback.

Raises:

Source code in docs_src/capo_wellarchitected/_services/async_well_architected.py
async def put_agent_recommendation_feedback(
    self,
    recommendation_arn: "capo_wellarchitected.types.agent_recommendation_arn.AgentRecommendationArn",
    type: "capo_wellarchitected.types.recommendation_feedback_type.RecommendationFeedbackType",
    *,
    config_overrides: Optional[AsyncWellArchitectedClientConfig] = None,
    feedback_category: Optional[
        "capo_wellarchitected.types.feedback_category.FeedbackCategory"
    ] = None,
    comments: Optional[str] = None,
) -> "capo_wellarchitected.types.put_agent_recommendation_feedback_response.PutAgentRecommendationFeedbackResponse":
    """<p>Submits user feedback on a recommendation to help improve future optimization suggestions and track implementation outcomes.</p>

    Args:
        recommendation_arn: <p>The Amazon Resource Name (ARN) of the recommendation to provide feedback for.</p>
        type: <p>The type of feedback being provided.</p>
        feedback_category: <p>Optional category classifying the nature of the feedback.</p>
        comments: <p>Optional comments providing additional context about the feedback.</p>

    Raises:
        capo_wellarchitected.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
        capo_wellarchitected.errors.internal_server_exception.InternalServerException: <p>There is a problem with the Well-Architected Tool API service.</p>
        capo_wellarchitected.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource was not found.</p>
        capo_wellarchitected.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling.</p>
        capo_wellarchitected.errors.validation_exception.ValidationException: <p>The user input is not valid.</p>
        capo_wellarchitected.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_wellarchitected.types.put_agent_recommendation_feedback_request.PutAgentRecommendationFeedbackRequest]",
    ) -> AsyncOperationResponse[
        "capo_wellarchitected.types.put_agent_recommendation_feedback_response.PutAgentRecommendationFeedbackResponse"
    ]:
        import capo_wellarchitected._operations.well_architected_api_service_lambda.put_agent_recommendation_feedback

        (
            output,
            http_response,
        ) = await capo_wellarchitected._operations.well_architected_api_service_lambda.put_agent_recommendation_feedback.async_put_agent_recommendation_feedback(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutAgentRecommendationFeedback")
    )
    input_: capo_wellarchitected.types.put_agent_recommendation_feedback_request.PutAgentRecommendationFeedbackRequest = {
        "recommendation_arn": recommendation_arn,
        "type": type,
    }
    if feedback_category is not None:
        input_["feedback_category"] = feedback_category
    if comments is not None:
        input_["comments"] = comments

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output