Search in sources :

Example 1 with ListDeliveryStreamsResponse

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

the class ListDeliveryStreams method listStreams.

// snippet-start:[firehose.java2.list_streams.main]
public static void listStreams(FirehoseClient firehoseClient) {
    try {
        ListDeliveryStreamsResponse streamsResponse = firehoseClient.listDeliveryStreams();
        List<String> items = streamsResponse.deliveryStreamNames();
        for (String item : items) {
            System.out.println("The delivery stream name is: " + item);
        }
    } catch (FirehoseException e) {
        System.out.println(e.getLocalizedMessage());
        System.exit(1);
    }
}
Also used : FirehoseException(software.amazon.awssdk.services.firehose.model.FirehoseException) ListDeliveryStreamsResponse(software.amazon.awssdk.services.firehose.model.ListDeliveryStreamsResponse)

Aggregations

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