Class GaugeWidget

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.cloudwatch.ConcreteWidget
software.amazon.awscdk.services.cloudwatch.GaugeWidget
All Implemented Interfaces:
IWidget, software.amazon.jsii.JsiiSerializable

@Generated(value="jsii-pacmak/1.98.0 (build 00b106d)", date="2024-06-07T19:09:16.994Z") @Stability(Stable) public class GaugeWidget extends ConcreteWidget
A dashboard gauge widget that displays metrics.

Example:

 Dashboard dashboard;
 Alarm errorAlarm;
 Metric gaugeMetric;
 dashboard.addWidgets(GaugeWidget.Builder.create()
         .metrics(List.of(gaugeMetric))
         .leftYAxis(YAxisProps.builder()
                 .min(0)
                 .max(1000)
                 .build())
         .build());
 
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    A fluent builder for GaugeWidget.

    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.IWidget

    IWidget.Jsii$Default
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    void
    Add another metric to the left Y axis of the GaugeWidget.
    Return the widget JSON for use in the dashboard.

    Methods inherited from class software.amazon.awscdk.services.cloudwatch.ConcreteWidget

    copyMetricWarnings, getHeight, getWarnings, getWarningsV2, getWidth, getX, getY, position, setX, setY

    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

    • GaugeWidget

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

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

      @Stability(Stable) public GaugeWidget(@NotNull GaugeWidgetProps props)
      Parameters:
      props - This parameter is required.
  • Method Details

    • addMetric

      @Stability(Stable) public void addMetric(@NotNull IMetric metric)
      Add another metric to the left Y axis of the GaugeWidget.

      Parameters:
      metric - the metric to add. This parameter is required.
    • toJson

      @Stability(Stable) @NotNull public List<Object> toJson()
      Return the widget JSON for use in the dashboard.
      Specified by:
      toJson in interface IWidget
      Specified by:
      toJson in class ConcreteWidget