Class GaugeWidgetProps.Builder

java.lang.Object
software.amazon.awscdk.services.cloudwatch.GaugeWidgetProps.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<GaugeWidgetProps>
Enclosing interface:
GaugeWidgetProps

@Stability(Stable) public static final class GaugeWidgetProps.Builder extends Object implements software.amazon.jsii.Builder<GaugeWidgetProps>
A builder for GaugeWidgetProps
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • annotations

      @Stability(Stable) public GaugeWidgetProps.Builder annotations(List<? extends HorizontalAnnotation> annotations)
      Parameters:
      annotations - Annotations for the left Y axis.
      Returns:
      this
    • end

      @Stability(Stable) public GaugeWidgetProps.Builder end(String end)
      Sets the value of GaugeWidgetProps.getEnd()
      Parameters:
      end - The end of the time range to use for each widget independently from those of the dashboard. If you specify a value for end, you must also specify a value for start. Specify an absolute time in the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z.
      Returns:
      this
    • leftYAxis

      @Stability(Stable) public GaugeWidgetProps.Builder leftYAxis(YAxisProps leftYAxis)
      Parameters:
      leftYAxis - Left Y axis.
      Returns:
      this
    • legendPosition

      @Stability(Stable) public GaugeWidgetProps.Builder legendPosition(LegendPosition legendPosition)
      Parameters:
      legendPosition - Position of the legend.
      Returns:
      this
    • liveData

      @Stability(Stable) public GaugeWidgetProps.Builder liveData(Boolean liveData)
      Parameters:
      liveData - Whether the graph should show live data.
      Returns:
      this
    • metrics

      @Stability(Stable) public GaugeWidgetProps.Builder metrics(List<? extends IMetric> metrics)
      Parameters:
      metrics - Metrics to display on left Y axis.
      Returns:
      this
    • period

      @Stability(Stable) public GaugeWidgetProps.Builder period(Duration period)
      Parameters:
      period - The default period for all metrics in this widget. The period is the length of time represented by one data point on the graph. This default can be overridden within each metric definition.
      Returns:
      this
    • setPeriodToTimeRange

      @Stability(Stable) public GaugeWidgetProps.Builder setPeriodToTimeRange(Boolean setPeriodToTimeRange)
      Parameters:
      setPeriodToTimeRange - Whether to show the value from the entire time range. Only applicable for Bar and Pie charts. If false, values will be from the most recent period of your chosen time range; if true, shows the value from the entire time range.
      Returns:
      this
    • start

      @Stability(Stable) public GaugeWidgetProps.Builder start(String start)
      Sets the value of GaugeWidgetProps.getStart()
      Parameters:
      start - The start of the time range to use for each widget independently from those of the dashboard. You can specify start without specifying end to specify a relative time range that ends with the current time. In this case, the value of start must begin with -P, and you can use M, H, D, W and M as abbreviations for minutes, hours, days, weeks and months. For example, -PT8H shows the last 8 hours and -P3M shows the last three months. You can also use start along with an end field, to specify an absolute time range. When specifying an absolute time range, use the ISO 8601 format. For example, 2018-12-17T06:00:00.000Z.
      Returns:
      this
    • statistic

      @Stability(Stable) public GaugeWidgetProps.Builder statistic(String statistic)
      Parameters:
      statistic - The default statistic to be displayed for each metric. This default can be overridden within the definition of each individual metric
      Returns:
      this
    • accountId

      @Stability(Stable) public GaugeWidgetProps.Builder accountId(String accountId)
      Parameters:
      accountId - The AWS account ID where the metrics are located. This enables cross-account functionality for CloudWatch dashboards. Before using this feature, ensure that proper cross-account sharing is configured between the monitoring account and source account.

      For more information, see: https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html

      Returns:
      this
    • height

      @Stability(Stable) public GaugeWidgetProps.Builder height(Number height)
      Parameters:
      height - Height of the widget.
      Returns:
      this
    • region

      @Stability(Stable) public GaugeWidgetProps.Builder region(String region)
      Parameters:
      region - The region the metrics of this graph should be taken from.
      Returns:
      this
    • title

      @Stability(Stable) public GaugeWidgetProps.Builder title(String title)
      Parameters:
      title - Title for the graph.
      Returns:
      this
    • width

      @Stability(Stable) public GaugeWidgetProps.Builder width(Number width)
      Parameters:
      width - Width of the widget, in a grid of 24 units wide.
      Returns:
      this
    • build

      @Stability(Stable) public GaugeWidgetProps build()
      Builds the configured instance.
      Specified by:
      build in interface software.amazon.jsii.Builder<GaugeWidgetProps>
      Returns:
      a new instance of GaugeWidgetProps
      Throws:
      NullPointerException - if any required attribute was not provided