Ec2Action

class aws_cdk.aws_cloudwatch_actions.Ec2Action(instance_action)

Bases: object

Use an EC2 action as an Alarm action.

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_cloudwatch_actions as cloudwatch_actions

ec2_action = cloudwatch_actions.Ec2Action(cloudwatch_actions.Ec2InstanceAction.STOP)
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

AlarmActionConfig