Class Ec2Action
Use an EC2 action as an Alarm action.
Inheritance
System.Object
Ec2Action
Implements
Namespace: Amazon.CDK.AWS.CloudWatch.Actions
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class Ec2Action : DeputyBase, IAlarmAction
Syntax (vb)
Public Class Ec2Action
Inherits DeputyBase
Implements IAlarmAction
Remarks
ExampleMetadata: infused
Examples
// Alarm must be configured with an EC2 per-instance metric
Alarm alarm;
// Attach a reboot when alarm triggers
alarm.AddAlarmAction(
new Ec2Action(Ec2InstanceAction.REBOOT));
Synopsis
Constructors
Ec2Action(Ec2InstanceAction) | |
Ec2Action(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Ec2Action(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Methods
Bind(Construct, IAlarm) | Returns an alarm action configuration to use an EC2 action as an alarm action. |
Constructors
Ec2Action(Ec2InstanceAction)
Ec2Action(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Ec2Action(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Ec2Action(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Ec2Action(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Methods
Bind(Construct, IAlarm)
Returns an alarm action configuration to use an EC2 action as an alarm action.
public virtual IAlarmActionConfig Bind(Construct scope, IAlarm alarm)
Parameters
- scope Constructs.Construct
- alarm IAlarm
Returns