Skip to content

CloudWatchLogsQueryBuilder🔗

Constructor🔗

new CloudWatchLogsQueryBuilder()

Methods🔗

build🔗

Builds the object.

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

datasource(\Grafana\Foundation\Dashboard\DataSourceRef $datasource)

expression🔗

The CloudWatch Logs Insights query to execute

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.

hide(bool $hide)

id🔗

id(string $id)

logGroupNames🔗

@deprecated use logGroups

@param array $logGroupNames

logGroupNames(array $logGroupNames)

logGroups🔗

Log groups to query

@param array<\Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Cloudwatch\LogGroup>> $logGroups

logGroups(array $logGroups)

queryMode🔗

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

queryMode(\Grafana\Foundation\Cloudwatch\CloudWatchQueryMode $queryMode)

queryType🔗

Specify the query flavor

TODO make this required and give it a default

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.

refId(string $refId)

region🔗

AWS region to query for the logs

region(string $region)

statsGroups🔗

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

@param array $statsGroups

statsGroups(array $statsGroups)

See also🔗