Skip to content

batch_update_exclusion_windows async

batch_update_exclusion_windows(
    slo_ids: ServiceLevelObjectiveIds,
    *,
    config_overrides: Optional[AsyncApplicationSignalsClientConfig] = None,
    add_exclusion_windows: Optional[ExclusionWindows] = None,
    remove_exclusion_windows: Optional[ExclusionWindows] = None,
) -> BatchUpdateExclusionWindowsOutput

Add or remove time window exclusions for one or more Service Level Objectives (SLOs).

Parameters:

  • slo_ids (ServiceLevelObjectiveIds) –

    The list of SLO IDs to add or remove exclusion windows from.

  • add_exclusion_windows (Optional[ExclusionWindows], default: None ) –

    A list of exclusion windows to add to the specified SLOs. You can add up to 10 exclusion windows per SLO.

  • remove_exclusion_windows (Optional[ExclusionWindows], default: None ) –

    A list of exclusion windows to remove from the specified SLOs. The window configuration must match an existing exclusion window.

Raises:

Source code in docs_src/capo_application_signals/_services/async_application_signals.py
async def batch_update_exclusion_windows(
    self,
    slo_ids: "capo_application_signals.types.service_level_objective_ids.ServiceLevelObjectiveIds",
    *,
    config_overrides: Optional[AsyncApplicationSignalsClientConfig] = None,
    add_exclusion_windows: Optional[
        "capo_application_signals.types.exclusion_windows.ExclusionWindows"
    ] = None,
    remove_exclusion_windows: Optional[
        "capo_application_signals.types.exclusion_windows.ExclusionWindows"
    ] = None,
) -> "capo_application_signals.types.batch_update_exclusion_windows_output.BatchUpdateExclusionWindowsOutput":
    """<p>Add or remove time window exclusions for one or more Service Level Objectives (SLOs).</p>

    Args:
        slo_ids: <p>The list of SLO IDs to add or remove exclusion windows from.</p>
        add_exclusion_windows: <p>A list of exclusion windows to add to the specified SLOs. You can add up to 10 exclusion windows per SLO.</p>
        remove_exclusion_windows: <p>A list of exclusion windows to remove from the specified SLOs. The window configuration must match an existing exclusion window.</p>

    Raises:
        capo_application_signals.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource not found.</p>
        capo_application_signals.errors.throttling_exception.ThrottlingException: <p>The request was throttled because of quota limits.</p>
        capo_application_signals.errors.validation_exception.ValidationException: <p>The resource is not valid.</p>
        capo_application_signals.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_application_signals.types.batch_update_exclusion_windows_input.BatchUpdateExclusionWindowsInput]",
    ) -> AsyncOperationResponse[
        "capo_application_signals.types.batch_update_exclusion_windows_output.BatchUpdateExclusionWindowsOutput"
    ]:
        import capo_application_signals._operations.application_signals.batch_update_exclusion_windows

        (
            output,
            http_response,
        ) = await capo_application_signals._operations.application_signals.batch_update_exclusion_windows.async_batch_update_exclusion_windows(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("BatchUpdateExclusionWindows")
    )
    input_: capo_application_signals.types.batch_update_exclusion_windows_input.BatchUpdateExclusionWindowsInput = {
        "slo_ids": slo_ids
    }
    if add_exclusion_windows is not None:
        input_["add_exclusion_windows"] = add_exclusion_windows
    if remove_exclusion_windows is not None:
        input_["remove_exclusion_windows"] = remove_exclusion_windows

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output