Ec2Action
- class aws_cdk.aws_cloudwatch_actions.Ec2Action(instance_action)
Bases:
object
Use an EC2 action as an Alarm action.
- 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))
- Parameters:
instance_action (
Ec2InstanceAction
) –
Methods
- bind(_scope, _alarm)
Returns an alarm action configuration to use an EC2 action as an alarm action.
- Parameters:
- Return type: