LogQueryWidget

class aws_cdk.aws_cloudwatch.LogQueryWidget(*, log_group_names, height=None, query_lines=None, query_string=None, region=None, title=None, width=None)

Bases: aws_cdk.aws_cloudwatch.ConcreteWidget

Display query results from Logs Insights.

__init__(*, log_group_names, height=None, query_lines=None, query_string=None, region=None, title=None, width=None)
param log_group_names

Names of log groups to query.

param height

Height of the widget. Default: 6

param query_lines

A sequence of lines to use to build the query. The query will be built by joining the lines together using ``

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

Full query string for log insights. Be sure to prepend every new line with a newline and pipe character (``

|). Default: - Exactly one of ``queryString, queryLines is required.
param region

The region the metrics of this widget should be taken from. Default: Current region

param title

Title for the widget. Default: No title

param width

Width of the widget, in a grid of 24 units wide. Default: 6

Return type

None

Methods

position(x, y)

Place the widget at a given position.

Parameters
  • x (Union[int, float]) –

  • y (Union[int, float]) –

Return type

None

to_json()

Return the widget JSON for use in the dashboard.

Return type

List[Any]

Attributes

height

The amount of vertical grid units the widget will take up.

Return type

Union[int, float]

width

The amount of horizontal grid units the widget will take up.

Return type

Union[int, float]