Class Dashboard.Builder

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

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

    • create

      @Stability(Stable) public static Dashboard.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of Dashboard.Builder.
    • dashboardName

      @Stability(Stable) public Dashboard.Builder dashboardName(String dashboardName)
      Name of the dashboard.

      If set, must only contain alphanumerics, dash (-) and underscore (_)

      Default: - automatically generated name

      Parameters:
      dashboardName - Name of the dashboard. This parameter is required.
      Returns:
      this
    • end

      @Stability(Stable) public Dashboard.Builder end(String end)
      The end of the time range to use for each widget on the dashboard when the dashboard loads.

      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.

      Default: When the dashboard loads, the end date will be the current time.

      Parameters:
      end - The end of the time range to use for each widget on the dashboard when the dashboard loads. This parameter is required.
      Returns:
      this
    • periodOverride

      @Stability(Stable) public Dashboard.Builder periodOverride(PeriodOverride periodOverride)
      Use this field to specify the period for the graphs when the dashboard loads.

      Specifying Auto causes the period of all graphs on the dashboard to automatically adapt to the time range of the dashboard. Specifying Inherit ensures that the period set for each graph is always obeyed.

      Default: Auto

      Parameters:
      periodOverride - Use this field to specify the period for the graphs when the dashboard loads. This parameter is required.
      Returns:
      this
    • start

      @Stability(Stable) public Dashboard.Builder start(String start)
      The start of the time range to use for each widget on 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.

      Default: When the dashboard loads, the start time will be the default time range.

      Parameters:
      start - The start of the time range to use for each widget on the dashboard. This parameter is required.
      Returns:
      this
    • widgets

      @Stability(Stable) public Dashboard.Builder widgets(List<? extends List<? extends IWidget>> widgets)
      Initial set of widgets on the dashboard.

      One array represents a row of widgets.

      Default: - No widgets

      Parameters:
      widgets - Initial set of widgets on the dashboard. This parameter is required.
      Returns:
      this
    • build

      @Stability(Stable) public Dashboard build()
      Specified by:
      build in interface software.amazon.jsii.Builder<Dashboard>
      Returns:
      a newly built instance of Dashboard.