Skip to content

batch_get_omni_slo_report

batch_get_omni_slo_report(
    space_id: SpaceId,
    slo_ids: SloReportIdList,
    *,
    config_overrides: Optional[CloudWatchOmniClientConfig] = None,
    burn_rate: Optional[SloReportBurnRateInput] = None,
) -> BatchGetOmniSloReportOutput

Returns the current measurements of up to 50 SLOs in one space: state, attainment, error budget consumed, burn rate over one recent window, and the estimated time the budget runs out. GetOmniSlo and ListOmniSlos report the measurement taken when the state last changed; this operation reports it as of now. Each requested SLO appears exactly once, in reports or in errors. An SLO that does not exist in the space is a NOT_FOUND entry in errors, not a failure of the call.

Parameters:

  • space_id (SpaceId) –

    The unique ID of the space that owns the SLOs.

  • slo_ids (SloReportIdList) –

    The SLOs to report on: 1 to 50 identifiers, each at most once.

  • burn_rate (Optional[SloReportBurnRateInput], default: None ) –

    The burn-rate window. Omitted means a 60-minute window.

Raises:

Examples:

Report on several SLOs The following example reports on three SLOs with a 60-minute burn-rate window. Every report carries the same measuredAt. The first SLO is spending its error budget 2.4 times faster than the pace that would use it up over its 30-day window, and estimatedExhaustionTime is when the remaining budget runs out at that rate. The second is in the NODATA state, so its report has the state and measuredAt but no figures. The third does not exist in the space, so it appears in errors instead of failing the request. Payloads are shown as JSON; on the wire they are CBOR-encoded.

>>> client.batch_get_omni_slo_report(space_id='a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d', slo_ids=['9f8e7d6c5b4a49382716051a2b3c4d5e', '5e4d3c2b1a0f49e8d7c6b5a4f3e2d1c0', '0123456789abcdef0123456789abcdef'], burn_rate={'windowMinutes': 60})
Source code in docs_src/capo_cloudwatchomni/_services/cloud_watch_omni.py
def batch_get_omni_slo_report(
    self,
    space_id: "capo_cloudwatchomni.types.space_id.SpaceId",
    slo_ids: "capo_cloudwatchomni.types.slo_report_id_list.SloReportIdList",
    *,
    config_overrides: Optional[CloudWatchOmniClientConfig] = None,
    burn_rate: Optional[
        "capo_cloudwatchomni.types.slo_report_burn_rate_input.SloReportBurnRateInput"
    ] = None,
) -> "capo_cloudwatchomni.types.batch_get_omni_slo_report_output.BatchGetOmniSloReportOutput":
    """Returns the current measurements of up to 50 SLOs in one space: state, attainment, error budget consumed, burn rate over one recent window, and the estimated time the budget runs out. GetOmniSlo and ListOmniSlos report the measurement taken when the state last changed; this operation reports it as of now. Each requested SLO appears exactly once, in reports or in errors. An SLO that does not exist in the space is a NOT_FOUND entry in errors, not a failure of the call.

    Args:
        space_id: The unique ID of the space that owns the SLOs.
        slo_ids: The SLOs to report on: 1 to 50 identifiers, each at most once.
        burn_rate: The burn-rate window. Omitted means a 60-minute window.

    Raises:
        capo_cloudwatchomni.errors.access_denied_exception.AccessDeniedException: The caller is not authorized to perform this action.
        capo_cloudwatchomni.errors.internal_server_exception.InternalServerException: An unexpected error occurred while processing the request.
        capo_cloudwatchomni.errors.resource_not_found_exception.ResourceNotFoundException: The specified resource does not exist.
        capo_cloudwatchomni.errors.throttling_exception.ThrottlingException: The request was throttled due to exceeding the allowed request rate.
        capo_cloudwatchomni.errors.validation_exception.ValidationException: A parameter is specified incorrectly.
        capo_cloudwatchomni.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Report on several SLOs
        The following example reports on three SLOs with a 60-minute burn-rate window. Every report carries the same measuredAt. The first SLO is spending its error budget 2.4 times faster than the pace that would use it up over its 30-day window, and estimatedExhaustionTime is when the remaining budget runs out at that rate. The second is in the NODATA state, so its report has the state and measuredAt but no figures. The third does not exist in the space, so it appears in errors instead of failing the request. Payloads are shown as JSON; on the wire they are CBOR-encoded.

        >>> client.batch_get_omni_slo_report(space_id='a1b2c3d4-5e6f-4a3b-8c9d-0e1f2a3b4c5d', slo_ids=['9f8e7d6c5b4a49382716051a2b3c4d5e', '5e4d3c2b1a0f49e8d7c6b5a4f3e2d1c0', '0123456789abcdef0123456789abcdef'], burn_rate={'windowMinutes': 60})
    """

    def _handler(
        req: "OperationRequest[capo_cloudwatchomni.types.batch_get_omni_slo_report_input.BatchGetOmniSloReportInput]",
    ) -> OperationResponse[
        "capo_cloudwatchomni.types.batch_get_omni_slo_report_output.BatchGetOmniSloReportOutput"
    ]:
        import capo_cloudwatchomni._operations.cloud_watch_omni_frontend.batch_get_omni_slo_report

        output, http_response = (
            capo_cloudwatchomni._operations.cloud_watch_omni_frontend.batch_get_omni_slo_report.batch_get_omni_slo_report(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchGetOmniSloReport")
    )
    input_: capo_cloudwatchomni.types.batch_get_omni_slo_report_input.BatchGetOmniSloReportInput = {
        "space_id": space_id,
        "slo_ids": slo_ids,
    }
    if burn_rate is not None:
        input_["burn_rate"] = burn_rate

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