Search in sources :

Example 1 with CreateStreamRequest

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

the class CreateDataStream method createStream.

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

Aggregations

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