Skip to content

AzureMetricQueryBuilder🔗

Constructor🔗

new AzureMetricQueryBuilder()

Methods🔗

build🔗

Builds the object.

build()

aggregation🔗

The aggregation to be used within the query. Defaults to the primaryAggregationType defined by the metric.

aggregation(aggregation: string)

alias🔗

Aliases can be set to modify the legend labels. e.g. {{ resourceGroup }}. See docs for more detail.

alias(alias: string)

allowedTimeGrainsMs🔗

Time grains that are supported by the metric.

allowedTimeGrainsMs(allowedTimeGrainsMs: number[])

customNamespace🔗

Used as the value for the metricNamespace property when it's different from the resource namespace.

customNamespace(customNamespace: string)

dimension🔗

@deprecated This property was migrated to dimensionFilters and should only be accessed in the migration

dimension(dimension: string)

dimensionFilter🔗

@deprecated This property was migrated to dimensionFilters and should only be accessed in the migration

dimensionFilter(dimensionFilter: string)

dimensionFilters🔗

Filters to reduce the set of data returned. Dimensions that can be filtered on are defined by the metric.

dimensionFilters(dimensionFilters: cog.Builder<azuremonitor.AzureMetricDimension>[])

metricDefinition🔗

@deprecated Use metricNamespace instead

metricDefinition(metricDefinition: string)

metricName🔗

The metric to query data for within the specified metricNamespace. e.g. UsedCapacity

metricName(metricName: string)

metricNamespace🔗

metricNamespace is used as the resource type (or resource namespace).

It's usually equal to the target metric namespace. e.g. microsoft.storage/storageaccounts

Kept the name of the variable as metricNamespace to avoid backward incompatibility issues.

metricNamespace(metricNamespace: string)

region🔗

The Azure region containing the resource(s).

region(region: string)

resourceGroup🔗

@deprecated Use resources instead

resourceGroup(resourceGroup: string)

resourceName🔗

@deprecated Use resources instead

resourceName(resourceName: string)

resourceUri🔗

@deprecated Use resourceGroup, resourceName and metricNamespace instead

resourceUri(resourceUri: string)

resources🔗

Array of resource URIs to be queried.

resources(resources: cog.Builder<azuremonitor.AzureMonitorResource>[])

timeGrain🔗

The granularity of data points to be queried. Defaults to auto.

timeGrain(timeGrain: string)

timeGrainUnit🔗

@deprecated

timeGrainUnit(timeGrainUnit: string)

top🔗

Maximum number of records to return. Defaults to 10.

top(top: string)

See also🔗