public Waiter<DescribeAlarmsRequest> alarmExists() {

        return new WaiterBuilder<DescribeAlarmsRequest, DescribeAlarmsResult>().withSdkFunction(new DescribeAlarmsFunction(client))
                .withAcceptors(new AlarmExists.IsTrueMatcher())
                .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(5)))
                .withExecutorService(executorService).build();
    }
Builds a AlarmExists waiter by using custom parameters waiterParameters and other parameters defined in the
waiters specification, and then polls until it determines whether the resource entered the desired state or not,
where polling criteria is bound by either default polling strategy or custom polling strategy.
aws-java-sdk-cloudwatch/src/main/java/com/amazonaws/services/cloudwatch/waiters/AmazonCloudWatchWaiters.java