Skip to content

delete_channel

delete_channel(
    channel_arn: ChannelARN, *, config_overrides: Optional[KinesisClientConfig] = None
) -> None

Deletes the specified channel. Deleting a channel stops delivery from the source stream to the destination. Data already delivered to the destination is not deleted.

A stream cannot be deleted while it has active channels. Use ListChannels with a stream filter to find the channels attached to a stream before deleting it.

This operation has a call limit of 5 transactions per second (TPS) for each Amazon Web Services account. Exceeding 5 TPS results in a LimitExceededException.

Parameters:

  • channel_arn (ChannelARN) –

    The Amazon Resource Name (ARN) of the channel to delete.

Raises:

  • AccessDeniedException –

    Specifies that you do not have the permissions required to perform this operation.

  • InvalidArgumentException –

    A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.

  • LimitExceededException –

    The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed.

  • ResourceNotFoundException –

    The requested resource could not be found. The stream might not be specified correctly.

  • ValidationException –

    Specifies that you tried to invoke this API for a data stream with the on-demand capacity mode. This API is only supported for data streams with the provisioned capacity mode.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Examples:

To delete a channel

>>> client.delete_channel(channel_arn='arn:aws:kinesis:us-east-1:123456789012:channel/my-channel-id')
Source code in docs_src/capo_kinesis/_services/kinesis.py
def delete_channel(
    self,
    channel_arn: "capo_kinesis.types.channel_arn.ChannelARN",
    *,
    config_overrides: Optional[KinesisClientConfig] = None,
) -> None:
    """<p>Deletes the specified channel. Deleting a channel stops delivery from the source stream to the destination. Data already delivered to the destination is not deleted.</p> <p>A stream cannot be deleted while it has active channels. Use <a>ListChannels</a> with a stream filter to find the channels attached to a stream before deleting it.</p> <p>This operation has a call limit of 5 transactions per second (TPS) for each Amazon Web Services account. Exceeding 5 TPS results in a <code>LimitExceededException</code>.</p>

    Args:
        channel_arn: <p>The Amazon Resource Name (ARN) of the channel to delete.</p>

    Raises:
        capo_kinesis.errors.access_denied_exception.AccessDeniedException: <p>Specifies that you do not have the permissions required to perform this operation.</p>
        capo_kinesis.errors.invalid_argument_exception.InvalidArgumentException: <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p>
        capo_kinesis.errors.limit_exceeded_exception.LimitExceededException: <p>The requested resource exceeds the maximum number allowed, or the number of concurrent stream requests exceeds the maximum number allowed. </p>
        capo_kinesis.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found. The stream might not be specified correctly.</p>
        capo_kinesis.errors.validation_exception.ValidationException: <p>Specifies that you tried to invoke this API for a data stream with the on-demand capacity mode. This API is only supported for data streams with the provisioned capacity mode. </p>
        capo_kinesis.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To delete a channel

        >>> client.delete_channel(channel_arn='arn:aws:kinesis:us-east-1:123456789012:channel/my-channel-id')
    """

    def _handler(
        req: "OperationRequest[capo_kinesis.types.delete_channel_input.DeleteChannelInput]",
    ) -> OperationResponse[None]:
        import capo_kinesis._operations.kinesis_20131202.delete_channel

        output, http_response = (
            capo_kinesis._operations.kinesis_20131202.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_kinesis.types.delete_channel_input.DeleteChannelInput = {
        "channel_arn": channel_arn
    }

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