Skip to content

list_multiplex_alerts async

list_multiplex_alerts(
    multiplex_id: __string,
    *,
    config_overrides: Optional[AsyncMediaLiveClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[__string] = None,
    state_filter: Optional[__string] = None,
) -> ListMultiplexAlertsResponse

List the alerts for a multiplex with optional filtering based on alert state.

Parameters:

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

    The maximum number of items to return

  • multiplex_id (__string) –

    The unique ID of the multiplex

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

    The next pagination token

  • state_filter (Optional[__string], default: None ) –

    Specifies the set of alerts to return based on their state. SET - Return only alerts with SET state. CLEARED - Return only alerts with CLEARED state. ALL - Return all alerts.

Raises:

Source code in docs_src/capo_medialive/_services/async_media_live.py
async def list_multiplex_alerts(
    self,
    multiplex_id: "capo_medialive.types.__string.__string",
    *,
    config_overrides: Optional[AsyncMediaLiveClientConfig] = None,
    max_results: Optional["capo_medialive.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_medialive.types.__string.__string"] = None,
    state_filter: Optional["capo_medialive.types.__string.__string"] = None,
) -> "capo_medialive.types.list_multiplex_alerts_response.ListMultiplexAlertsResponse":
    """List the alerts for a multiplex with optional filtering based on alert state.

    Args:
        max_results: The maximum number of items to return
        multiplex_id: The unique ID of the multiplex
        next_token: The next pagination token
        state_filter: Specifies the set of alerts to return based on their state. SET - Return only alerts with SET state. CLEARED - Return only alerts with CLEARED state. ALL - Return all alerts.

    Raises:
        capo_medialive.errors.bad_gateway_exception.BadGatewayException: Placeholder documentation for BadGatewayException
        capo_medialive.errors.bad_request_exception.BadRequestException: Placeholder documentation for BadRequestException
        capo_medialive.errors.forbidden_exception.ForbiddenException: Placeholder documentation for ForbiddenException
        capo_medialive.errors.gateway_timeout_exception.GatewayTimeoutException: Placeholder documentation for GatewayTimeoutException
        capo_medialive.errors.internal_server_error_exception.InternalServerErrorException: Placeholder documentation for InternalServerErrorException
        capo_medialive.errors.not_found_exception.NotFoundException: Placeholder documentation for NotFoundException
        capo_medialive.errors.too_many_requests_exception.TooManyRequestsException: Placeholder documentation for TooManyRequestsException
        capo_medialive.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_medialive.types.list_multiplex_alerts_request.ListMultiplexAlertsRequest]",
    ) -> AsyncOperationResponse[
        "capo_medialive.types.list_multiplex_alerts_response.ListMultiplexAlertsResponse"
    ]:
        import capo_medialive._operations.media_live.list_multiplex_alerts

        (
            output,
            http_response,
        ) = await capo_medialive._operations.media_live.list_multiplex_alerts.async_list_multiplex_alerts(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListMultiplexAlerts")
    )
    input_: capo_medialive.types.list_multiplex_alerts_request.ListMultiplexAlertsRequest = {
        "multiplex_id": multiplex_id
    }
    if max_results is not None:
        input_["max_results"] = max_results
    if next_token is not None:
        input_["next_token"] = next_token
    if state_filter is not None:
        input_["state_filter"] = state_filter

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