Class LogQueryWidget.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LogQueryWidget>
- Enclosing class:
LogQueryWidget
LogQueryWidget
.-
Method Summary
Modifier and TypeMethodDescriptionThe AWS account ID where the log groups are located.build()
static LogQueryWidget.Builder
create()
Height of the widget.logGroupNames
(List<String> logGroupNames) Names of log groups to query.queryLanguage
(LogQueryLanguage queryLanguage) The query language to use for the query.queryLines
(List<String> queryLines) A sequence of lines to use to build the query.queryString
(String queryString) Full query string for log insights.The region the metrics of this widget should be taken from.Title for the widget.The type of view to use.Width of the widget, in a grid of 24 units wide.
-
Method Details
-
create
- Returns:
- a new instance of
LogQueryWidget.Builder
.
-
logGroupNames
Names of log groups to query.- Parameters:
logGroupNames
- Names of log groups to query. This parameter is required.- Returns:
this
-
accountId
The AWS account ID where the log groups 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
Default: - Current account
- Parameters:
accountId
- The AWS account ID where the log groups are located. This parameter is required.- Returns:
this
-
height
Height of the widget.Default: 6
- Parameters:
height
- Height of the widget. This parameter is required.- Returns:
this
-
queryLanguage
The query language to use for the query.Default: LogQueryLanguage.LOGS_INSIGHTS
- Parameters:
queryLanguage
- The query language to use for the query. This parameter is required.- Returns:
this
-
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
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
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
Title for the widget.Default: No title
- Parameters:
title
- Title for the widget. This parameter is required.- Returns:
this
-
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
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
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<LogQueryWidget>
- Returns:
- a newly built instance of
LogQueryWidget
.
-