use of com.amazonaws.services.cloudwatch.model.DisableAlarmActionsRequest in project aws-doc-sdk-examples by awsdocs.
the class DisableAlarmActions method main.
public static void main(String[] args) {
final String USAGE = "To run this example, supply an alarm name\n" + "Ex: DisableAlarmActions <alarm-name>\n";
if (args.length != 1) {
System.out.println(USAGE);
System.exit(1);
}
String alarmName = args[0];
final AmazonCloudWatch cw = AmazonCloudWatchClientBuilder.defaultClient();
DisableAlarmActionsRequest request = new DisableAlarmActionsRequest().withAlarmNames(alarmName);
DisableAlarmActionsResult response = cw.disableAlarmActions(request);
System.out.printf("Successfully disabled actions on alarm %s", alarmName);
}
Aggregations