Skip to content

get_insight_events

get_insight_events(
    insight_id: InsightId,
    *,
    config_overrides: Optional[XRayClientConfig] = None,
    max_results: Optional[GetInsightEventsMaxResults] = None,
    next_token: Optional[Token] = None,
) -> GetInsightEventsResult

X-Ray reevaluates insights periodically until they're resolved, and records each intermediate state as an event. You can review an insight's events in the Impact Timeline on the Inspect page in the X-Ray console.

Parameters:

  • insight_id (InsightId) –

    The insight's unique identifier. Use the GetInsightSummaries action to retrieve an InsightId.

  • max_results (Optional[GetInsightEventsMaxResults], default: None ) –

    Used to retrieve at most the specified value of events.

  • next_token (Optional[Token], default: None ) –

    Specify the pagination token returned by a previous request to retrieve the next page of events.

Raises:

Source code in docs_src/capo_xray/_services/x_ray.py
def get_insight_events(
    self,
    insight_id: "capo_xray.types.insight_id.InsightId",
    *,
    config_overrides: Optional[XRayClientConfig] = None,
    max_results: Optional[
        "capo_xray.types.get_insight_events_max_results.GetInsightEventsMaxResults"
    ] = None,
    next_token: Optional["capo_xray.types.token.Token"] = None,
) -> "capo_xray.types.get_insight_events_result.GetInsightEventsResult":
    """<p>X-Ray reevaluates insights periodically until they're resolved, and records each intermediate state as an event. You can review an insight's events in the Impact Timeline on the Inspect page in the X-Ray console.</p>

    Args:
        insight_id: <p>The insight's unique identifier. Use the GetInsightSummaries action to retrieve an InsightId.</p>
        max_results: <p>Used to retrieve at most the specified value of events.</p>
        next_token: <p>Specify the pagination token returned by a previous request to retrieve the next page of events. </p>

    Raises:
        capo_xray.errors.invalid_request_exception.InvalidRequestException: <p>The request is missing required parameters or has invalid parameters.</p>
        capo_xray.errors.throttled_exception.ThrottledException: <p>The request exceeds the maximum number of requests per second.</p>
        capo_xray.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_xray.types.get_insight_events_request.GetInsightEventsRequest]",
    ) -> OperationResponse[
        "capo_xray.types.get_insight_events_result.GetInsightEventsResult"
    ]:
        import capo_xray._operations.awsx_ray.get_insight_events

        output, http_response = (
            capo_xray._operations.awsx_ray.get_insight_events.get_insight_events(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetInsightEvents")
    )
    input_: capo_xray.types.get_insight_events_request.GetInsightEventsRequest = {
        "insight_id": insight_id
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token

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