Search in sources :

Example 1 with DeleteDeliveryStreamRequest

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

the class DeleteStream method delStream.

// snippet-start:[firehose.java2.delete_stream.main]
public static void delStream(FirehoseClient firehoseClient, String streamName) {
    try {
        DeleteDeliveryStreamRequest deleteDeliveryStreamRequest = DeleteDeliveryStreamRequest.builder().deliveryStreamName(streamName).build();
        firehoseClient.deleteDeliveryStream(deleteDeliveryStreamRequest);
        System.out.println("Delivery Stream " + streamName + " is deleted");
    } catch (FirehoseException e) {
        System.out.println(e.getLocalizedMessage());
        System.exit(1);
    }
}
Also used : DeleteDeliveryStreamRequest(software.amazon.awssdk.services.firehose.model.DeleteDeliveryStreamRequest) FirehoseException(software.amazon.awssdk.services.firehose.model.FirehoseException)

Aggregations

DeleteDeliveryStreamRequest (software.amazon.awssdk.services.firehose.model.DeleteDeliveryStreamRequest)1 FirehoseException (software.amazon.awssdk.services.firehose.model.FirehoseException)1