.period(60)
.statistic(Statistics.SAMPLE_COUNT)
.threshold(1.0));
// Poll alarms until alarm is found
ListAlarmsOptions dmo = new ListAlarmsOptions().alarmName(alarmName);
boolean success = retry(new Predicate<ListAlarmsOptions>() {
public boolean apply(ListAlarmsOptions options) {
return Iterables.size(api().list(options).get(0)) == 1;
}
}, 5, 1, MINUTES).apply(dmo);