Search in sources :

Example 1 with DisableAlarmActionsResult

use of com.amazonaws.services.cloudwatch.model.DisableAlarmActionsResult 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);
}
Also used : AmazonCloudWatch(com.amazonaws.services.cloudwatch.AmazonCloudWatch) DisableAlarmActionsRequest(com.amazonaws.services.cloudwatch.model.DisableAlarmActionsRequest) DisableAlarmActionsResult(com.amazonaws.services.cloudwatch.model.DisableAlarmActionsResult)

Aggregations

AmazonCloudWatch (com.amazonaws.services.cloudwatch.AmazonCloudWatch)1 DisableAlarmActionsRequest (com.amazonaws.services.cloudwatch.model.DisableAlarmActionsRequest)1 DisableAlarmActionsResult (com.amazonaws.services.cloudwatch.model.DisableAlarmActionsResult)1