Skip to content

delete_channel_policy async

delete_channel_policy(
    channel_name: __string,
    *,
    config_overrides: Optional[AsyncMediaTailorClientConfig] = None,
) -> DeleteChannelPolicyResponse

The channel policy to delete.

Parameters:

  • channel_name (__string) –

    The name of the channel associated with this channel policy.

Raises:

Source code in docs_src/capo_mediatailor/_services/async_media_tailor.py
async def delete_channel_policy(
    self,
    channel_name: "capo_mediatailor.types.__string.__string",
    *,
    config_overrides: Optional[AsyncMediaTailorClientConfig] = None,
) -> "capo_mediatailor.types.delete_channel_policy_response.DeleteChannelPolicyResponse":
    """<p>The channel policy to delete.</p>

    Args:
        channel_name: <p>The name of the channel associated with this channel policy.</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.delete_channel_policy_request.DeleteChannelPolicyRequest]",
    ) -> AsyncOperationResponse[
        "capo_mediatailor.types.delete_channel_policy_response.DeleteChannelPolicyResponse"
    ]:
        import capo_mediatailor._operations.media_tailor.delete_channel_policy

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteChannelPolicy")
    )
    input_: capo_mediatailor.types.delete_channel_policy_request.DeleteChannelPolicyRequest = {
        "channel_name": channel_name
    }

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