Skip to content

get_time_series_service_statistics

get_time_series_service_statistics(
    start_time: Timestamp,
    end_time: Timestamp,
    *,
    config_overrides: Optional[XRayClientConfig] = None,
    group_name: Optional[GroupName] = None,
    group_arn: Optional[GroupARN] = None,
    entity_selector_expression: Optional[EntitySelectorExpression] = None,
    period: Optional[NullableInteger] = None,
    forecast_statistics: Optional[NullableBoolean] = None,
    next_token: Optional[String] = None,
) -> GetTimeSeriesServiceStatisticsResult

Get an aggregation of service statistics defined by a specific time range.

Parameters:

  • start_time (Timestamp) –

    The start of the time frame for which to aggregate statistics.

  • end_time (Timestamp) –

    The end of the time frame for which to aggregate statistics.

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

    The case-sensitive name of the group for which to pull statistics from.

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

    The Amazon Resource Name (ARN) of the group for which to pull statistics from.

  • entity_selector_expression (Optional[EntitySelectorExpression], default: None ) –

    A filter expression defining entities that will be aggregated for statistics. Supports ID, service, and edge functions. If no selector expression is specified, edge statistics are returned.

  • period (Optional[NullableInteger], default: None ) –

    Aggregation period in seconds.

  • forecast_statistics (Optional[NullableBoolean], default: None ) –

    The forecasted high and low fault count values. Forecast enabled requests require the EntitySelectorExpression ID be provided.

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

    Pagination token.

Raises:

Source code in docs_src/capo_xray/_services/x_ray.py
def get_time_series_service_statistics(
    self,
    start_time: "capo_xray.types.timestamp.Timestamp",
    end_time: "capo_xray.types.timestamp.Timestamp",
    *,
    config_overrides: Optional[XRayClientConfig] = None,
    group_name: Optional["capo_xray.types.group_name.GroupName"] = None,
    group_arn: Optional["capo_xray.types.group_arn.GroupARN"] = None,
    entity_selector_expression: Optional[
        "capo_xray.types.entity_selector_expression.EntitySelectorExpression"
    ] = None,
    period: Optional["capo_xray.types.nullable_integer.NullableInteger"] = None,
    forecast_statistics: Optional[
        "capo_xray.types.nullable_boolean.NullableBoolean"
    ] = None,
    next_token: Optional["capo_xray.types.string.String"] = None,
) -> "capo_xray.types.get_time_series_service_statistics_result.GetTimeSeriesServiceStatisticsResult":
    """<p>Get an aggregation of service statistics defined by a specific time range.</p>

    Args:
        start_time: <p>The start of the time frame for which to aggregate statistics.</p>
        end_time: <p>The end of the time frame for which to aggregate statistics.</p>
        group_name: <p>The case-sensitive name of the group for which to pull statistics from.</p>
        group_arn: <p>The Amazon Resource Name (ARN) of the group for which to pull statistics from.</p>
        entity_selector_expression: <p>A filter expression defining entities that will be aggregated for statistics. Supports ID, service, and edge functions. If no selector expression is specified, edge statistics are returned. </p>
        period: <p>Aggregation period in seconds.</p>
        forecast_statistics: <p>The forecasted high and low fault count values. Forecast enabled requests require the EntitySelectorExpression ID be provided.</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_time_series_service_statistics_request.GetTimeSeriesServiceStatisticsRequest]",
    ) -> OperationResponse[
        "capo_xray.types.get_time_series_service_statistics_result.GetTimeSeriesServiceStatisticsResult"
    ]:
        import capo_xray._operations.awsx_ray.get_time_series_service_statistics

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetTimeSeriesServiceStatistics")
    )
    input_: capo_xray.types.get_time_series_service_statistics_request.GetTimeSeriesServiceStatisticsRequest = {
        "start_time": start_time,
        "end_time": end_time,
    }
    if group_name is not None:
        input_["group_name"] = group_name
    if group_arn is not None:
        input_["group_arn"] = group_arn
    if entity_selector_expression is not None:
        input_["entity_selector_expression"] = entity_selector_expression
    if period is not None:
        input_["period"] = period
    if forecast_statistics is not None:
        input_["forecast_statistics"] = forecast_statistics
    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