interface LogQueryWidgetProps
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.CloudWatch.LogQueryWidgetProps |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awscloudwatch#LogQueryWidgetProps |
![]() | software.amazon.awscdk.services.cloudwatch.LogQueryWidgetProps |
![]() | aws_cdk.aws_cloudwatch.LogQueryWidgetProps |
![]() | aws-cdk-lib » aws_cloudwatch » LogQueryWidgetProps |
Properties for a Query widget.
Example
declare const dashboard: cloudwatch.Dashboard;
dashboard.addWidgets(new cloudwatch.LogQueryWidget({
logGroupNames: ['my-log-group'],
view: cloudwatch.LogQueryVisualizationType.TABLE,
// The lines will be automatically combined using '\n|'.
queryLines: [
'fields @message',
'filter @message like /Error/',
]
}));
Properties
Name | Type | Description |
---|---|---|
log | string[] | Names of log groups to query. |
height? | number | Height of the widget. |
query | string[] | A sequence of lines to use to build the query. |
query | string | Full query string for log insights. |
region? | string | The region the metrics of this widget should be taken from. |
title? | string | Title for the widget. |
view? | Log | The type of view to use. |
width? | number | Width of the widget, in a grid of 24 units wide. |
logGroupNames
Type:
string[]
Names of log groups to query.
height?
Type:
number
(optional, default: 6)
Height of the widget.
queryLines?
Type:
string[]
(optional, default: Exactly one of queryString
, queryLines
is required.)
A sequence of lines to use to build the query.
The query will be built by joining the lines together using \n|
.
queryString?
Type:
string
(optional, default: Exactly one of queryString
, queryLines
is required.)
Full query string for log insights.
Be sure to prepend every new line with a newline and pipe character
(\n|
).
region?
Type:
string
(optional, default: Current region)
The region the metrics of this widget should be taken from.
title?
Type:
string
(optional, default: No title)
Title for the widget.
view?
Type:
Log
(optional, default: LogQueryVisualizationType.TABLE)
The type of view to use.
width?
Type:
number
(optional, default: 6)
Width of the widget, in a grid of 24 units wide.