enum Ec2InstanceAction
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.CloudWatch.Actions.Ec2InstanceAction |
![]() | software.amazon.awscdk.services.cloudwatch.actions.Ec2InstanceAction |
![]() | aws_cdk.aws_cloudwatch_actions.Ec2InstanceAction |
![]() | @aws-cdk/aws-cloudwatch-actions » Ec2InstanceAction |
Types of EC2 actions available.
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),
);
Members
Name | Description |
---|---|
STOP | Stop the instance. |
TERMINATE | Terminatethe instance. |
RECOVER | Recover the instance. |
REBOOT | Reboot the instance. |
STOP
Stop the instance.
TERMINATE
Terminatethe instance.
RECOVER
Recover the instance.
REBOOT
Reboot the instance.