Skip to content

CloudWatchLogsQueryBuilder🔗

Constructor🔗

new CloudWatchLogsQueryBuilder()

Methods🔗

build🔗

Builds the object.

public CloudWatchLogsQuery build()

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

public CloudWatchLogsQueryBuilder datasource(DataSourceRef datasource)

expression🔗

The CloudWatch Logs Insights query to execute

public CloudWatchLogsQueryBuilder expression(String expression)

hide🔗

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

public CloudWatchLogsQueryBuilder hide(Boolean hide)

id🔗

public CloudWatchLogsQueryBuilder id(String id)

logGroupNames🔗

@deprecated use logGroups

public CloudWatchLogsQueryBuilder logGroupNames(List<String> logGroupNames)

logGroups🔗

Log groups to query

public CloudWatchLogsQueryBuilder logGroups(List<com.grafana.foundation.cog.Builder<LogGroup>> logGroups)

queryLanguage🔗

Language used for querying logs, can be CWLI, SQL, or PPL. If empty, the default language is CWLI.

public CloudWatchLogsQueryBuilder queryLanguage(LogsQueryLanguage queryLanguage)

queryMode🔗

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

public CloudWatchLogsQueryBuilder queryMode(CloudWatchQueryMode queryMode)

queryType🔗

Specify the query flavor

TODO make this required and give it a default

public CloudWatchLogsQueryBuilder queryType(String queryType)

refId🔗

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.

public CloudWatchLogsQueryBuilder refId(String refId)

region🔗

AWS region to query for the logs

public CloudWatchLogsQueryBuilder region(String region)

statsGroups🔗

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

public CloudWatchLogsQueryBuilder statsGroups(List<String> statsGroups)

See also🔗