Skip navigation links

Package software.amazon.awscdk.services.cloudwatch.actions

CloudWatch Alarm Actions library

See: Description

Package software.amazon.awscdk.services.cloudwatch.actions Description

CloudWatch Alarm Actions library

---

cdk-constructs: Stable


This library contains a set of classes which can be used as CloudWatch Alarm actions.

The currently implemented actions are: EC2 Actions, SNS Actions, Autoscaling Actions and Aplication Autoscaling Actions

EC2 Action Example

 // Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
 import software.amazon.awscdk.aws_cloudwatch;
 
 // Alarm must be configured with an EC2 per-instance metric
 Alarm alarm;
 // Attach a reboot when alarm triggers
 alarm.addAlarmAction(
 new Ec2Action(Ec2InstanceActions.getREBOOT()));
 

See @aws-cdk/aws-cloudwatch for more information.

Skip navigation links

Copyright © 2021. All rights reserved.