Skip to content

update_channel async

update_channel(
    channel_name: __string,
    outputs: RequestOutputs,
    *,
    config_overrides: Optional[AsyncMediaTailorClientConfig] = None,
    filler_slate: Optional[SlateSource] = None,
    time_shift_configuration: Optional[TimeShiftConfiguration] = None,
    audiences: Optional[Audiences] = None,
) -> UpdateChannelResponse

Updates a channel. For information about MediaTailor channels, see Working with channels in the MediaTailor User Guide.

Parameters:

  • channel_name (__string) –

    The name of the channel.

  • filler_slate (Optional[SlateSource], default: None ) –

    The slate used to fill gaps between programs in the schedule. You must configure filler slate if your channel uses the LINEAR PlaybackMode. MediaTailor doesn't support filler slate for channels using the LOOP PlaybackMode.

  • outputs (RequestOutputs) –

    The channel's output properties.

  • time_shift_configuration (Optional[TimeShiftConfiguration], default: None ) –

    The time-shifted viewing configuration you want to associate to the channel.

  • audiences (Optional[Audiences], default: None ) –

    The list of audiences defined in channel.

Raises:

Source code in docs_src/capo_mediatailor/_services/async_media_tailor.py
async def update_channel(
    self,
    channel_name: "capo_mediatailor.types.__string.__string",
    outputs: "capo_mediatailor.types.request_outputs.RequestOutputs",
    *,
    config_overrides: Optional[AsyncMediaTailorClientConfig] = None,
    filler_slate: Optional[
        "capo_mediatailor.types.slate_source.SlateSource"
    ] = None,
    time_shift_configuration: Optional[
        "capo_mediatailor.types.time_shift_configuration.TimeShiftConfiguration"
    ] = None,
    audiences: Optional["capo_mediatailor.types.audiences.Audiences"] = None,
) -> "capo_mediatailor.types.update_channel_response.UpdateChannelResponse":
    """<p>Updates a channel. For information about MediaTailor channels, see <a href="https://docs.aws.amazon.com/mediatailor/latest/ug/channel-assembly-channels.html">Working with channels</a> in the <i>MediaTailor User Guide</i>.</p>

    Args:
        channel_name: <p>The name of the channel.</p>
        filler_slate: <p>The slate used to fill gaps between programs in the schedule. You must configure filler slate if your channel uses the <code>LINEAR</code> <code>PlaybackMode</code>. MediaTailor doesn't support filler slate for channels using the <code>LOOP</code> <code>PlaybackMode</code>.</p>
        outputs: <p>The channel's output properties.</p>
        time_shift_configuration: <p> The time-shifted viewing configuration you want to associate to the channel. </p>
        audiences: <p>The list of audiences defined in channel.</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.update_channel_request.UpdateChannelRequest]",
    ) -> AsyncOperationResponse[
        "capo_mediatailor.types.update_channel_response.UpdateChannelResponse"
    ]:
        import capo_mediatailor._operations.media_tailor.update_channel

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateChannel")
    )
    input_: capo_mediatailor.types.update_channel_request.UpdateChannelRequest = {
        "channel_name": channel_name,
        "outputs": outputs,
    }
    if filler_slate is not None:
        input_["filler_slate"] = filler_slate
    if time_shift_configuration is not None:
        input_["time_shift_configuration"] = time_shift_configuration
    if audiences is not None:
        input_["audiences"] = audiences

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