Skip to content

delete_channel async

delete_channel(
    channel: ChannelArn,
    *,
    config_overrides: Optional[AsyncCloudTrailClientConfig] = None,
) -> DeleteChannelResponse

CloudTrail Lake will no longer be open to new customers starting May 31, 2026. If you would like to use CloudTrail Lake, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see CloudTrail Lake availability change.

Deletes a channel.

Parameters:

  • channel (ChannelArn) –

    The ARN or the UUID value of the channel that you want to delete.

Raises:

Source code in docs_src/capo_cloudtrail/_services/async_cloud_trail.py
async def delete_channel(
    self,
    channel: "capo_cloudtrail.types.channel_arn.ChannelArn",
    *,
    config_overrides: Optional[AsyncCloudTrailClientConfig] = None,
) -> "capo_cloudtrail.types.delete_channel_response.DeleteChannelResponse":
    """<important> <p>CloudTrail Lake will no longer be open to new customers starting May 31, 2026. If you would like to use CloudTrail Lake, sign up prior to that date. Existing customers can continue to use the service as normal. For more information, see <a href="https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-lake-service-availability-change.html">CloudTrail Lake availability change</a>.</p> </important> <p>Deletes a channel.</p>

    Args:
        channel: <p>The ARN or the <code>UUID</code> value of the channel that you want to delete.</p>

    Raises:
        capo_cloudtrail.errors.channel_arn_invalid_exception.ChannelARNInvalidException: <p>This exception is thrown when the specified value of <code>ChannelARN</code> is not valid.</p>
        capo_cloudtrail.errors.channel_not_found_exception.ChannelNotFoundException: <p>This exception is thrown when CloudTrail cannot find the specified channel.</p>
        capo_cloudtrail.errors.operation_not_permitted_exception.OperationNotPermittedException: <p>This exception is thrown when the requested operation is not permitted.</p>
        capo_cloudtrail.errors.unsupported_operation_exception.UnsupportedOperationException: <p>This exception is thrown when the requested operation is not supported.</p>
        capo_cloudtrail.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cloudtrail.types.delete_channel_request.DeleteChannelRequest]",
    ) -> AsyncOperationResponse[
        "capo_cloudtrail.types.delete_channel_response.DeleteChannelResponse"
    ]:
        import capo_cloudtrail._operations.cloud_trail_20131101.delete_channel

        (
            output,
            http_response,
        ) = await capo_cloudtrail._operations.cloud_trail_20131101.delete_channel.async_delete_channel(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

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

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