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