Skip to content

QueryBuilder🔗

Constructor🔗

new QueryBuilder()

Methods🔗

build🔗

Builds the object.

public Query build()

azureLogAnalytics🔗

Azure Monitor Logs sub-query properties.

public QueryBuilder azureLogAnalytics(com.grafana.foundation.cog.Builder<AzureLogsQuery> azureLogAnalytics)

azureMonitor🔗

Azure Monitor Metrics sub-query properties.

public QueryBuilder azureMonitor(com.grafana.foundation.cog.Builder<AzureMetricQuery> azureMonitor)

azureResourceGraph🔗

Azure Resource Graph sub-query properties.

public QueryBuilder azureResourceGraph(com.grafana.foundation.cog.Builder<AzureResourceGraphQuery> azureResourceGraph)

azureTraces🔗

Application Insights Traces sub-query properties.

public QueryBuilder azureTraces(com.grafana.foundation.cog.Builder<AzureTracesQuery> azureTraces)

customNamespace🔗

Custom namespace used in template variable queries

public QueryBuilder customNamespace(String customNamespace)

datasource🔗

New type for datasource reference

Not creating a new type until we figure out how to handle DS refs for group by, adhoc, and every place that uses DataSourceRef in TS.

public QueryBuilder datasource(com.grafana.foundation.cog.Builder<Dashboardv2beta1DataQueryKindDatasource> datasource)

grafanaTemplateVariableFn🔗

@deprecated Legacy template variable support.

public QueryBuilder grafanaTemplateVariableFn(GrafanaTemplateVariableQuery grafanaTemplateVariableFn)

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 QueryBuilder hide(Boolean hide)

namespace🔗

Namespace used in template variable queries

public QueryBuilder namespace(String namespace)

oldDatasource🔗

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 QueryBuilder oldDatasource(DataSourceRef datasource)

query🔗

Used only for exemplar queries from Prometheus

public QueryBuilder query(String query)

queryType🔗

Specify the query flavor

TODO make this required and give it a default

public QueryBuilder 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 QueryBuilder refId(String refId)

region🔗

Region used in template variable queries

public QueryBuilder region(String region)

resource🔗

Resource used in template variable queries

public QueryBuilder resource(String resource)

resourceGroup🔗

Resource group used in template variable queries

public QueryBuilder resourceGroup(String resourceGroup)

subscription🔗

Azure subscription containing the resource(s) to be queried.

Also used for template variable queries

public QueryBuilder subscription(String subscription)

subscriptions🔗

Subscriptions to be queried via Azure Resource Graph.

public QueryBuilder subscriptions(List<String> subscriptions)

version🔗

public QueryBuilder version(String version)

See also🔗