Skip to content

get_insight_summaries

get_insight_summaries(
    start_time: Timestamp,
    end_time: Timestamp,
    *,
    config_overrides: Optional[XRayClientConfig] = None,
    states: Optional[InsightStateList] = None,
    group_arn: Optional[GroupARN] = None,
    group_name: Optional[GroupName] = None,
    max_results: Optional[GetInsightSummariesMaxResults] = None,
    next_token: Optional[Token] = None,
) -> GetInsightSummariesResult

Retrieves the summaries of all insights in the specified group matching the provided filter values.

Parameters:

  • states (Optional[InsightStateList], default: None ) –

    The list of insight states.

  • group_arn (Optional[GroupARN], default: None ) –

    The Amazon Resource Name (ARN) of the group. Required if the GroupName isn't provided.

  • group_name (Optional[GroupName], default: None ) –

    The name of the group. Required if the GroupARN isn't provided.

  • start_time (Timestamp) –

    The beginning of the time frame in which the insights started. The start time can't be more than 30 days old.

  • end_time (Timestamp) –

    The end of the time frame in which the insights ended. The end time can't be more than 30 days old.

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

    The maximum number of results to display.

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

    Pagination token.

Raises:

Source code in docs_src/capo_xray/_services/x_ray.py
def get_insight_summaries(
    self,
    start_time: "capo_xray.types.timestamp.Timestamp",
    end_time: "capo_xray.types.timestamp.Timestamp",
    *,
    config_overrides: Optional[XRayClientConfig] = None,
    states: Optional["capo_xray.types.insight_state_list.InsightStateList"] = None,
    group_arn: Optional["capo_xray.types.group_arn.GroupARN"] = None,
    group_name: Optional["capo_xray.types.group_name.GroupName"] = None,
    max_results: Optional[
        "capo_xray.types.get_insight_summaries_max_results.GetInsightSummariesMaxResults"
    ] = None,
    next_token: Optional["capo_xray.types.token.Token"] = None,
) -> "capo_xray.types.get_insight_summaries_result.GetInsightSummariesResult":
    """<p>Retrieves the summaries of all insights in the specified group matching the provided filter values.</p>

    Args:
        states: <p>The list of insight states. </p>
        group_arn: <p>The Amazon Resource Name (ARN) of the group. Required if the GroupName isn't provided.</p>
        group_name: <p>The name of the group. Required if the GroupARN isn't provided.</p>
        start_time: <p>The beginning of the time frame in which the insights started. The start time can't be more than 30 days old.</p>
        end_time: <p>The end of the time frame in which the insights ended. The end time can't be more than 30 days old.</p>
        max_results: <p>The maximum number of results to display.</p>
        next_token: <p>Pagination token.</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_summaries_request.GetInsightSummariesRequest]",
    ) -> OperationResponse[
        "capo_xray.types.get_insight_summaries_result.GetInsightSummariesResult"
    ]:
        import capo_xray._operations.awsx_ray.get_insight_summaries

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetInsightSummaries")
    )
    input_: capo_xray.types.get_insight_summaries_request.GetInsightSummariesRequest = {
        "start_time": start_time,
        "end_time": end_time,
    }
    if states is not None:
        input_["states"] = states
    if group_arn is not None:
        input_["group_arn"] = group_arn
    if group_name is not None:
        input_["group_name"] = group_name
    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