Skip to content

CloudWatchLogsQuery🔗

Constructor🔗

CloudWatchLogsQuery()

Methods🔗

build🔗

Builds the object.

def build() -> cloudwatch.CloudWatchLogsQuery

datasource🔗

For mixed data sources the selected datasource is on the query level.

For non mixed scenarios this is undefined.

TODO find a better way to do this ^ that's friendly to schema

TODO this shouldn't be unknown but DataSourceRef | null

def datasource(datasource: dashboard.DataSourceRef) -> typing.Self

expression🔗

The CloudWatch Logs Insights query to execute

def expression(expression: str) -> typing.Self

hide🔗

If hide is set to true, Grafana will filter out the response(s) associated with this query before returning it to the panel.

def hide(hide: bool) -> typing.Self

id_val🔗

def id_val(id_val: str) -> typing.Self

log_group_names🔗

@deprecated use logGroups

def log_group_names(log_group_names: list[str]) -> typing.Self

log_groups🔗

Log groups to query

def log_groups(log_groups: list[cogbuilder.Builder[cloudwatch.LogGroup]]) -> typing.Self

query_mode🔗

Whether a query is a Metrics, Logs, or Annotations query

def query_mode(query_mode: cloudwatch.CloudWatchQueryMode) -> typing.Self

query_type🔗

Specify the query flavor

TODO make this required and give it a default

def query_type(query_type: str) -> typing.Self

ref_id🔗

A unique identifier for the query within the list of targets.

In server side expressions, the refId is used as a variable name to identify results.

By default, the UI will assign A->Z; however setting meaningful names may be useful.

def ref_id(ref_id: str) -> typing.Self

region🔗

AWS region to query for the logs

def region(region: str) -> typing.Self

stats_groups🔗

Fields to group the results by, this field is automatically populated whenever the query is updated

def stats_groups(stats_groups: list[str]) -> typing.Self

See also🔗