Skip to content

submit_feedback

submit_feedback(
    profiling_group_name: ProfilingGroupName,
    anomaly_instance_id: AnomalyInstanceId,
    type: FeedbackType,
    *,
    config_overrides: Optional[CodeGuruProfilerClientConfig] = None,
    comment: Optional[str] = None,
) -> SubmitFeedbackResponse

Sends feedback to CodeGuru Profiler about whether the anomaly detected by the analysis is useful or not.

Parameters:

  • profiling_group_name (ProfilingGroupName) –

    The name of the profiling group that is associated with the analysis data.

  • anomaly_instance_id (AnomalyInstanceId) –

    The universally unique identifier (UUID) of the AnomalyInstance object that is included in the analysis data.

  • type (FeedbackType) –

    The feedback tpye. Thee are two valid values, Positive and Negative.

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

    Optional feedback about this anomaly.

Raises:

Source code in docs_src/capo_codeguruprofiler/_services/code_guru_profiler.py
def submit_feedback(
    self,
    profiling_group_name: "capo_codeguruprofiler.types.profiling_group_name.ProfilingGroupName",
    anomaly_instance_id: "capo_codeguruprofiler.types.anomaly_instance_id.AnomalyInstanceId",
    type: "capo_codeguruprofiler.types.feedback_type.FeedbackType",
    *,
    config_overrides: Optional[CodeGuruProfilerClientConfig] = None,
    comment: Optional[str] = None,
) -> "capo_codeguruprofiler.types.submit_feedback_response.SubmitFeedbackResponse":
    """<p>Sends feedback to CodeGuru Profiler about whether the anomaly detected by the analysis is useful or not.</p>

    Args:
        profiling_group_name: <p>The name of the profiling group that is associated with the analysis data.</p>
        anomaly_instance_id: <p>The universally unique identifier (UUID) of the <a href="https://docs.aws.amazon.com/codeguru/latest/profiler-api/API_AnomalyInstance.html"> <code>AnomalyInstance</code> </a> object that is included in the analysis data.</p>
        type: <p> The feedback tpye. Thee are two valid values, <code>Positive</code> and <code>Negative</code>. </p>
        comment: <p>Optional feedback about this anomaly.</p>

    Raises:
        capo_codeguruprofiler.errors.internal_server_exception.InternalServerException: <p>The server encountered an internal error and is unable to complete the request.</p>
        capo_codeguruprofiler.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
        capo_codeguruprofiler.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_codeguruprofiler.errors.validation_exception.ValidationException: <p>The parameter is not valid.</p>
        capo_codeguruprofiler.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_codeguruprofiler.types.submit_feedback_request.SubmitFeedbackRequest]",
    ) -> OperationResponse[
        "capo_codeguruprofiler.types.submit_feedback_response.SubmitFeedbackResponse"
    ]:
        import capo_codeguruprofiler._operations.code_guru_profiler.submit_feedback

        output, http_response = (
            capo_codeguruprofiler._operations.code_guru_profiler.submit_feedback.submit_feedback(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("SubmitFeedback")
    )
    input_: capo_codeguruprofiler.types.submit_feedback_request.SubmitFeedbackRequest = {
        "profiling_group_name": profiling_group_name,
        "anomaly_instance_id": anomaly_instance_id,
        "type": type,
    }
    if comment is not None:
        input_["comment"] = comment

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