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);
}
}
Aggregations