Ec2InstanceAction
- class aws_cdk.aws_cloudwatch_actions.Ec2InstanceAction(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)
Bases:
Enum
Types of EC2 actions available.
- ExampleMetadata:
infused
Example:
# Alarm must be configured with an EC2 per-instance metric # alarm: cloudwatch.Alarm # Attach a reboot when alarm triggers alarm.add_alarm_action( actions.Ec2Action(actions.Ec2InstanceAction.REBOOT))
Attributes
- REBOOT
Reboot the instance.
- RECOVER
Recover the instance.
- STOP
Stop the instance.
- TERMINATE
Terminatethe instance.