java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.cloudwatch.actions.Ec2Action
All Implemented Interfaces:
IAlarmAction, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.101.0 (build b95fe5d)", date="2024-07-12T19:33:58.931Z") @Stability(Stable) public class Ec2Action extends software.amazon.jsii.JsiiObject implements IAlarmAction
Use an EC2 action as an Alarm action.

Example:

 // Alarm must be configured with an EC2 per-instance metric
 Alarm alarm;
 // Attach a reboot when alarm triggers
 alarm.addAlarmAction(
 new Ec2Action(Ec2InstanceAction.REBOOT));
 
  • Nested Class Summary

    Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject

    software.amazon.jsii.JsiiObject.InitializationMode

    Nested classes/interfaces inherited from interface software.amazon.awscdk.services.cloudwatch.IAlarmAction

    IAlarmAction.Jsii$Default, IAlarmAction.Jsii$Proxy
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    Ec2Action(Ec2InstanceAction instanceAction)
     
    protected
    Ec2Action(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    Ec2Action(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    bind(software.constructs.Construct _scope, IAlarm _alarm)
    Returns an alarm action configuration to use an EC2 action as an alarm action.

    Methods inherited from class software.amazon.jsii.JsiiObject

    jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Constructor Details

    • Ec2Action

      protected Ec2Action(software.amazon.jsii.JsiiObjectRef objRef)
    • Ec2Action

      protected Ec2Action(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • Ec2Action

      @Stability(Stable) public Ec2Action(@NotNull Ec2InstanceAction instanceAction)
      Parameters:
      instanceAction - This parameter is required.
  • Method Details

    • bind

      @Stability(Stable) @NotNull public AlarmActionConfig bind(@NotNull software.constructs.Construct _scope, @NotNull IAlarm _alarm)
      Returns an alarm action configuration to use an EC2 action as an alarm action.

      Specified by:
      bind in interface IAlarmAction
      Parameters:
      _scope - This parameter is required.
      _alarm - This parameter is required.