Skip to content

configure_logs_for_channel async

configure_logs_for_channel(
    channel_name: __string,
    log_types: LogTypes,
    *,
    config_overrides: Optional[AsyncMediaTailorClientConfig] = None,
) -> ConfigureLogsForChannelResponse

Configures Amazon CloudWatch log settings for a channel.

Parameters:

  • channel_name (__string) –

    The name of the channel.

  • log_types (LogTypes) –

    The types of logs to collect.

Raises:

Source code in docs_src/capo_mediatailor/_services/async_media_tailor.py
async def configure_logs_for_channel(
    self,
    channel_name: "capo_mediatailor.types.__string.__string",
    log_types: "capo_mediatailor.types.log_types.LogTypes",
    *,
    config_overrides: Optional[AsyncMediaTailorClientConfig] = None,
) -> "capo_mediatailor.types.configure_logs_for_channel_response.ConfigureLogsForChannelResponse":
    """<p>Configures Amazon CloudWatch log settings for a channel.</p>

    Args:
        channel_name: <p>The name of the channel.</p>
        log_types: <p>The types of logs to collect.</p>

    Raises:
        capo_mediatailor.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_mediatailor.types.configure_logs_for_channel_request.ConfigureLogsForChannelRequest]",
    ) -> AsyncOperationResponse[
        "capo_mediatailor.types.configure_logs_for_channel_response.ConfigureLogsForChannelResponse"
    ]:
        import capo_mediatailor._operations.media_tailor.configure_logs_for_channel

        (
            output,
            http_response,
        ) = await capo_mediatailor._operations.media_tailor.configure_logs_for_channel.async_configure_logs_for_channel(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ConfigureLogsForChannel")
    )
    input_: capo_mediatailor.types.configure_logs_for_channel_request.ConfigureLogsForChannelRequest = {
        "channel_name": channel_name,
        "log_types": log_types,
    }

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