Search in sources :

Example 1 with DeleteStreamRequest

use of software.amazon.awssdk.services.kinesis.model.DeleteStreamRequest in project aws-doc-sdk-examples by awsdocs.

the class DeleteDataStream method deleteStream.

// snippet-start:[kinesis.java2.delete.main]
public static void deleteStream(KinesisClient kinesisClient, String streamName) {
    try {
        DeleteStreamRequest delStream = DeleteStreamRequest.builder().streamName(streamName).build();
        kinesisClient.deleteStream(delStream);
    } catch (KinesisException e) {
        System.err.println(e.getMessage());
        System.exit(1);
    }
}
Also used : DeleteStreamRequest(software.amazon.awssdk.services.kinesis.model.DeleteStreamRequest) KinesisException(software.amazon.awssdk.services.kinesis.model.KinesisException)

Aggregations

DeleteStreamRequest (software.amazon.awssdk.services.kinesis.model.DeleteStreamRequest)1 KinesisException (software.amazon.awssdk.services.kinesis.model.KinesisException)1