use of software.amazon.awssdk.services.kinesis.model.DescribeLimitsResponse in project aws-doc-sdk-examples by awsdocs.
the class DescribeLimits method describeKinLimits.
// snippet-start:[kinesis.java2.DescribeLimits.main]
public static void describeKinLimits(KinesisClient kinesisClient) {
try {
DescribeLimitsRequest request = DescribeLimitsRequest.builder().build();
DescribeLimitsResponse response = kinesisClient.describeLimits(request);
System.out.println("Number of open shards: " + response.openShardCount());
System.out.println("Maximum shards allowed: " + response.shardLimit());
} catch (KinesisException e) {
System.err.println(e.getMessage());
System.exit(1);
}
System.out.println("Done");
}
Aggregations