Search in sources :

Example 1 with DescribeLimitsRequest

use of software.amazon.awssdk.services.kinesis.model.DescribeLimitsRequest 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");
}
Also used : KinesisException(software.amazon.awssdk.services.kinesis.model.KinesisException) DescribeLimitsRequest(software.amazon.awssdk.services.kinesis.model.DescribeLimitsRequest) DescribeLimitsResponse(software.amazon.awssdk.services.kinesis.model.DescribeLimitsResponse)

Aggregations

DescribeLimitsRequest (software.amazon.awssdk.services.kinesis.model.DescribeLimitsRequest)1 DescribeLimitsResponse (software.amazon.awssdk.services.kinesis.model.DescribeLimitsResponse)1 KinesisException (software.amazon.awssdk.services.kinesis.model.KinesisException)1