This package has been deprecated

Author message:

AWS CDK v1 has reached End-of-Support on 2023-06-01. This package is no longer being updated, and users should migrate to AWS CDK v2. For more information on how to migrate, see https://docs.aws.amazon.com/cdk/v2/guide/migrating-v2.html

@aws-cdk/aws-cloudwatch-actions
TypeScript icon, indicating that this package has built-in type declarations

1.204.0 • Public • Published

CloudWatch Alarm Actions library


End-of-Support

AWS CDK v1 has reached End-of-Support on 2023-06-01. This package is no longer being updated, and users should migrate to AWS CDK v2.

For more information on how to migrate, see the Migrating to AWS CDK v2 guide.


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

The currently implemented actions are: EC2 Actions, SNS Actions, SSM OpsCenter Actions, Autoscaling Actions and Application Autoscaling Actions

EC2 Action Example

// Alarm must be configured with an EC2 per-instance metric
declare const alarm: cloudwatch.Alarm;
// Attach a reboot when alarm triggers
alarm.addAlarmAction(
  new actions.Ec2Action(actions.Ec2InstanceAction.REBOOT),
);

SSM OpsCenter Action Example

declare const alarm: cloudwatch.Alarm;
// Create an OpsItem with specific severity and category when alarm triggers
alarm.addAlarmAction(
  new actions.SsmAction(
    actions.OpsItemSeverity.CRITICAL,
    actions.OpsItemCategory.PERFORMANCE // category is optional
  )
);

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

Package Sidebar

Install

npm i @aws-cdk/aws-cloudwatch-actions

Weekly Downloads

6,715

Version

1.204.0

License

Apache-2.0

Unpacked Size

120 kB

Total Files

21

Last publish

Collaborators

  • amzn-oss
  • aws-cdk-team