Class LogQueryWidgetProps.Builder
java.lang.Object
software.amazon.awscdk.services.cloudwatch.LogQueryWidgetProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<LogQueryWidgetProps>
- Enclosing interface:
LogQueryWidgetProps
@Stability(Stable)
public static final class LogQueryWidgetProps.Builder
extends Object
implements software.amazon.jsii.Builder<LogQueryWidgetProps>
A builder for
LogQueryWidgetProps-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSets the value ofLogQueryWidgetProps.getAccountId()build()Builds the configured instance.Sets the value ofLogQueryWidgetProps.getHeight()logGroupNames(List<String> logGroupNames) Sets the value ofLogQueryWidgetProps.getLogGroupNames()queryLanguage(LogQueryLanguage queryLanguage) Sets the value ofLogQueryWidgetProps.getQueryLanguage()queryLines(List<String> queryLines) Sets the value ofLogQueryWidgetProps.getQueryLines()queryString(String queryString) Sets the value ofLogQueryWidgetProps.getQueryString()Sets the value ofLogQueryWidgetProps.getRegion()Sets the value ofLogQueryWidgetProps.getTitle()Sets the value ofLogQueryWidgetProps.getView()Sets the value ofLogQueryWidgetProps.getWidth()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
logGroupNames
Sets the value ofLogQueryWidgetProps.getLogGroupNames()- Parameters:
logGroupNames- Names of log groups to query. This parameter is required.- Returns:
this
-
accountId
Sets the value ofLogQueryWidgetProps.getAccountId()- Parameters:
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
- Returns:
this
-
height
Sets the value ofLogQueryWidgetProps.getHeight()- Parameters:
height- Height of the widget.- Returns:
this
-
queryLanguage
Sets the value ofLogQueryWidgetProps.getQueryLanguage()- Parameters:
queryLanguage- The query language to use for the query.- Returns:
this
-
queryLines
Sets the value ofLogQueryWidgetProps.getQueryLines()- Parameters:
queryLines- A sequence of lines to use to build the query. The query will be built by joining the lines together using\n|.- Returns:
this
-
queryString
Sets the value ofLogQueryWidgetProps.getQueryString()- Parameters:
queryString- Full query string for log insights. Be sure to prepend every new line with a newline and pipe character (\n|).- Returns:
this
-
region
Sets the value ofLogQueryWidgetProps.getRegion()- Parameters:
region- The region the metrics of this widget should be taken from.- Returns:
this
-
title
Sets the value ofLogQueryWidgetProps.getTitle()- Parameters:
title- Title for the widget.- Returns:
this
-
view
Sets the value ofLogQueryWidgetProps.getView()- Parameters:
view- The type of view to use.- Returns:
this
-
width
Sets the value ofLogQueryWidgetProps.getWidth()- Parameters:
width- Width of the widget, in a grid of 24 units wide.- Returns:
this
-
build
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<LogQueryWidgetProps>- Returns:
- a new instance of
LogQueryWidgetProps - Throws:
NullPointerException- if any required attribute was not provided
-