Class LogQueryWidget.Builder

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

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

    • create

      @Stability(Stable) public static LogQueryWidget.Builder create()
      Returns:
      a new instance of LogQueryWidget.Builder.
    • logGroupNames

      @Stability(Stable) public LogQueryWidget.Builder logGroupNames(List<String> logGroupNames)
      Names of log groups to query.

      Parameters:
      logGroupNames - Names of log groups to query. This parameter is required.
      Returns:
      this
    • height

      @Stability(Stable) public LogQueryWidget.Builder height(Number height)
      Height of the widget.

      Default: 6

      Parameters:
      height - Height of the widget. This parameter is required.
      Returns:
      this
    • queryLines

      @Stability(Stable) public LogQueryWidget.Builder queryLines(List<String> queryLines)
      A sequence of lines to use to build the query.

      The query will be built by joining the lines together using \n|.

      Default: - Exactly one of `queryString`, `queryLines` is required.

      Parameters:
      queryLines - A sequence of lines to use to build the query. This parameter is required.
      Returns:
      this
    • queryString

      @Stability(Stable) public LogQueryWidget.Builder queryString(String queryString)
      Full query string for log insights.

      Be sure to prepend every new line with a newline and pipe character (\n|).

      Default: - Exactly one of `queryString`, `queryLines` is required.

      Parameters:
      queryString - Full query string for log insights. This parameter is required.
      Returns:
      this
    • region

      @Stability(Stable) public LogQueryWidget.Builder region(String region)
      The region the metrics of this widget should be taken from.

      Default: Current region

      Parameters:
      region - The region the metrics of this widget should be taken from. This parameter is required.
      Returns:
      this
    • title

      @Stability(Stable) public LogQueryWidget.Builder title(String title)
      Title for the widget.

      Default: No title

      Parameters:
      title - Title for the widget. This parameter is required.
      Returns:
      this
    • view

      @Stability(Stable) public LogQueryWidget.Builder view(LogQueryVisualizationType view)
      The type of view to use.

      Default: LogQueryVisualizationType.TABLE

      Parameters:
      view - The type of view to use. This parameter is required.
      Returns:
      this
    • width

      @Stability(Stable) public LogQueryWidget.Builder width(Number width)
      Width of the widget, in a grid of 24 units wide.

      Default: 6

      Parameters:
      width - Width of the widget, in a grid of 24 units wide. This parameter is required.
      Returns:
      this
    • build

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