Skip to content

AzureMetricQueryBuilder🔗

Constructor🔗

func NewAzureMetricQueryBuilder() *AzureMetricQueryBuilder

Methods🔗

Build🔗

Builds the object.

func (builder *AzureMetricQueryBuilder) Build() (AzureMetricQuery, error)

Aggregation🔗

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

func (builder *AzureMetricQueryBuilder) Aggregation(aggregation string) *AzureMetricQueryBuilder

Alias🔗

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

func (builder *AzureMetricQueryBuilder) Alias(alias string) *AzureMetricQueryBuilder

AllowedTimeGrainsMs🔗

Time grains that are supported by the metric.

func (builder *AzureMetricQueryBuilder) AllowedTimeGrainsMs(allowedTimeGrainsMs []int64) *AzureMetricQueryBuilder

CustomNamespace🔗

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

func (builder *AzureMetricQueryBuilder) CustomNamespace(customNamespace string) *AzureMetricQueryBuilder

Dimension🔗

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

func (builder *AzureMetricQueryBuilder) Dimension(dimension string) *AzureMetricQueryBuilder

DimensionFilter🔗

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

func (builder *AzureMetricQueryBuilder) DimensionFilter(dimensionFilter string) *AzureMetricQueryBuilder

DimensionFilters🔗

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

func (builder *AzureMetricQueryBuilder) DimensionFilters(dimensionFilters []cog.Builder[azuremonitor.AzureMetricDimension]) *AzureMetricQueryBuilder

MetricDefinition🔗

@deprecated Use metricNamespace instead

func (builder *AzureMetricQueryBuilder) MetricDefinition(metricDefinition string) *AzureMetricQueryBuilder

MetricName🔗

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

func (builder *AzureMetricQueryBuilder) MetricName(metricName string) *AzureMetricQueryBuilder

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.

func (builder *AzureMetricQueryBuilder) MetricNamespace(metricNamespace string) *AzureMetricQueryBuilder

Region🔗

The Azure region containing the resource(s).

func (builder *AzureMetricQueryBuilder) Region(region string) *AzureMetricQueryBuilder

ResourceGroup🔗

@deprecated Use resources instead

func (builder *AzureMetricQueryBuilder) ResourceGroup(resourceGroup string) *AzureMetricQueryBuilder

ResourceName🔗

@deprecated Use resources instead

func (builder *AzureMetricQueryBuilder) ResourceName(resourceName string) *AzureMetricQueryBuilder

ResourceUri🔗

@deprecated Use resourceGroup, resourceName and metricNamespace instead

func (builder *AzureMetricQueryBuilder) ResourceUri(resourceUri string) *AzureMetricQueryBuilder

Resources🔗

Array of resource URIs to be queried.

func (builder *AzureMetricQueryBuilder) Resources(resources []cog.Builder[azuremonitor.AzureMonitorResource]) *AzureMetricQueryBuilder

TimeGrain🔗

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

func (builder *AzureMetricQueryBuilder) TimeGrain(timeGrain string) *AzureMetricQueryBuilder

TimeGrainUnit🔗

@deprecated

func (builder *AzureMetricQueryBuilder) TimeGrainUnit(timeGrainUnit string) *AzureMetricQueryBuilder

Top🔗

Maximum number of records to return. Defaults to 10.

func (builder *AzureMetricQueryBuilder) Top(top string) *AzureMetricQueryBuilder

See also🔗