Skip to content

delete_channel

delete_channel(
    channel_name: __string,
    *,
    config_overrides: Optional[MediaTailorClientConfig] = None,
) -> DeleteChannelResponse

Deletes 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.

Raises:

Source code in docs_src/capo_mediatailor/_services/media_tailor.py
def delete_channel(
    self,
    channel_name: "capo_mediatailor.types.__string.__string",
    *,
    config_overrides: Optional[MediaTailorClientConfig] = None,
) -> "capo_mediatailor.types.delete_channel_response.DeleteChannelResponse":
    """<p>Deletes 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>

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

    def _handler(
        req: "OperationRequest[capo_mediatailor.types.delete_channel_request.DeleteChannelRequest]",
    ) -> OperationResponse[
        "capo_mediatailor.types.delete_channel_response.DeleteChannelResponse"
    ]:
        import capo_mediatailor._operations.media_tailor.delete_channel

        output, http_response = (
            capo_mediatailor._operations.media_tailor.delete_channel.delete_channel(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteChannel")
    )
    input_: capo_mediatailor.types.delete_channel_request.DeleteChannelRequest = {
        "channel_name": channel_name
    }

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