Skip to content

delete_stream

delete_stream(
    cluster_identifier: ClusterId,
    stream_identifier: StreamId,
    *,
    config_overrides: Optional[DSQLClientConfig] = None,
    client_token: Optional[ClientToken] = None,
) -> DeleteStreamOutput

Deletes a stream from a cluster.

Parameters:

  • cluster_identifier (ClusterId) –

    The ID of the cluster containing the stream to delete.

  • stream_identifier (StreamId) –

    The ID of the stream to delete.

  • client_token (Optional[ClientToken], default: None ) –

    A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect.

    If you don't specify a client token, the Amazon Web Services SDK automatically generates one.

Raises:

Source code in docs_src/capo_dsql/_services/dsql.py
def delete_stream(
    self,
    cluster_identifier: "capo_dsql.types.cluster_id.ClusterId",
    stream_identifier: "capo_dsql.types.stream_id.StreamId",
    *,
    config_overrides: Optional[DSQLClientConfig] = None,
    client_token: Optional["capo_dsql.types.client_token.ClientToken"] = None,
) -> "capo_dsql.types.delete_stream_output.DeleteStreamOutput":
    """<p>Deletes a stream from a cluster.</p>

    Args:
        cluster_identifier: <p>The ID of the cluster containing the stream to delete.</p>
        stream_identifier: <p>The ID of the stream to delete.</p>
        client_token: <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request. Idempotency ensures that an API request completes only once. With an idempotent request, if the original request completes successfully, the subsequent retries with the same client token return the result from the original successful request and they have no additional effect.</p> <p>If you don't specify a client token, the Amazon Web Services SDK automatically generates one.</p>

    Raises:
        capo_dsql.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_dsql.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_dsql.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_dsql.errors.validation_exception.ValidationException: <p>The input failed to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_dsql.errors.conflict_exception.ConflictException: <p>The submitted action has conflicts.</p>
        capo_dsql.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource could not be found.</p>
        capo_dsql.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_dsql.types.delete_stream_input.DeleteStreamInput]",
    ) -> OperationResponse[
        "capo_dsql.types.delete_stream_output.DeleteStreamOutput"
    ]:
        import capo_dsql._operations.dsql.delete_stream

        output, http_response = (
            capo_dsql._operations.dsql.delete_stream.delete_stream(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteStream")
    )
    input_: capo_dsql.types.delete_stream_input.DeleteStreamInput = {
        "cluster_identifier": cluster_identifier,
        "stream_identifier": stream_identifier,
    }
    if client_token is None:
        client_token = str(uuid.uuid4())
    input_["client_token"] = client_token

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