Hierarchy

  • Construct
    • DatabaseAlarms

Constructors

Properties

node: Node

The tree node.

Methods

  • Sets up a CloudWatch Alarm that triggers if the CPU credit balance for a burstable instance breach a certain threshold.

    NOTE: This alarm is only applicable for burstable instances, and a balance of 0 credits will only have performance implications for T2 instances. T3 and T4g instances will instead cost more for prolonged high CPU utilization after the balance is depleted.

    Parameters

    • Optionalprops: { action?: IAlarmAction; appendToAlarmDescription?: string; threshold?: number }

      Configuration for an alarm.

      Configured with sane defaults.
      
      • Optionalaction?: IAlarmAction

        An action to use for CloudWatch alarm state changes instead of the default action

      • OptionalappendToAlarmDescription?: string

        Add extra information to the alarm description, like Runbook URL or steps to triage.

      • Optionalthreshold?: number

        The CloudWatch Alarm will change its state to ALARM if the number of CPU credits drops below this threshold.

        See https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-credits-baseline-concepts.html#earning-CPU-credits for an overview of maximum CPU credits for various instance types.

        10% of the maximum earned CPU credits for the instance type.
        

    Returns void

  • Sets up a CloudWatch Alarm that triggers if the average CPU utilization for the RDS instance exceeds a given threshold.

    Parameters

    • Optionalprops: {
          action?: IAlarmAction;
          appendToAlarmDescription?: string;
          evaluationPeriods?: number;
          period?: Duration;
          threshold?: number;
      }

      Configuration for an alarm.

      Configured with sane defaults.
      
      • Optionalaction?: IAlarmAction

        An action to use for CloudWatch alarm state changes instead of the default action

      • OptionalappendToAlarmDescription?: string

        Add extra information to the alarm description, like Runbook URL or steps to triage.

      • OptionalevaluationPeriods?: number
        5
        
      • Optionalperiod?: Duration
        2 minutes
        
      • Optionalthreshold?: number

        The threshold defined as a percentage that determines if CPU utilization should trigger an alarm or not.

        80
        

    Returns void

  • Sets up two CloudWatch Alarms for monitoring disk storage space:

    1. one that triggers if the available disk storage space is low.
    2. one that triggers if the available disk storage space is critcally low.

    You may want to use different alarm actions for the two alarms, e.g., one can be categorized as a "warning", while the other one can be considered an "alarm".

    Parameters

    • Optionalprops: {
          appendToAlarmDescription?: string;
          criticallyLowStorageSpaceAlarm?: {
              action?: IAlarmAction;
              enabled?: boolean;
              threshold?: Size;
          };
          lowStorageSpaceAlarm?: {
              action?: IAlarmAction;
              enabled?: boolean;
              threshold?: Size;
          };
      }
      • OptionalappendToAlarmDescription?: string

        Add extra information to the alarm description, like Runbook URL or steps to triage.

      • OptionalcriticallyLowStorageSpaceAlarm?: { action?: IAlarmAction; enabled?: boolean; threshold?: Size }

        Configuration for an alarm.

        Configured with sane defaults.
        
        • Optionalaction?: IAlarmAction

          An action to use for CloudWatch alarm state changes instead of the default action

        • Optionalenabled?: boolean
          true
          
        • Optionalthreshold?: Size
          5% of the allocated storage.
          
      • OptionallowStorageSpaceAlarm?: { action?: IAlarmAction; enabled?: boolean; threshold?: Size }

        Configuration for an alarm.

        Configured with sane defaults.
        
        • Optionalaction?: IAlarmAction

          An action to use for CloudWatch alarm state changes instead of the default action

        • Optionalenabled?: boolean
          true
          
        • Optionalthreshold?: Size
          25% of the allocated storage.
          

    Returns void

  • Returns a string representation of this construct.

    Returns string

  • Checks if x is a construct.

    Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

    Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

    Parameters

    • x: any

      Any object

    Returns x is Construct

    true if x is an object created from a class which extends Construct.