Skip to content

AzureMetricQuery🔗

Constructor🔗

AzureMetricQuery()

Methods🔗

build🔗

Builds the object.

def build() -> azuremonitor.AzureMetricQuery

aggregation🔗

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

def aggregation(aggregation: str) -> typing.Self

alias🔗

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

def alias(alias: str) -> typing.Self

allowed_time_grains_ms🔗

Time grains that are supported by the metric.

def allowed_time_grains_ms(allowed_time_grains_ms: list[int]) -> typing.Self

custom_namespace🔗

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

def custom_namespace(custom_namespace: str) -> typing.Self

dimension🔗

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

def dimension(dimension: str) -> typing.Self

dimension_filter🔗

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

def dimension_filter(dimension_filter: str) -> typing.Self

dimension_filters🔗

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

def dimension_filters(dimension_filters: list[cogbuilder.Builder[azuremonitor.AzureMetricDimension]]) -> typing.Self

metric_definition🔗

@deprecated Use metricNamespace instead

def metric_definition(metric_definition: str) -> typing.Self

metric_name🔗

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

def metric_name(metric_name: str) -> typing.Self

metric_namespace🔗

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.

def metric_namespace(metric_namespace: str) -> typing.Self

region🔗

The Azure region containing the resource(s).

def region(region: str) -> typing.Self

resource_group🔗

@deprecated Use resources instead

def resource_group(resource_group: str) -> typing.Self

resource_name🔗

@deprecated Use resources instead

def resource_name(resource_name: str) -> typing.Self

resource_uri🔗

@deprecated Use resourceGroup, resourceName and metricNamespace instead

def resource_uri(resource_uri: str) -> typing.Self

resources🔗

Array of resource URIs to be queried.

def resources(resources: list[cogbuilder.Builder[azuremonitor.AzureMonitorResource]]) -> typing.Self

time_grain🔗

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

def time_grain(time_grain: str) -> typing.Self

time_grain_unit🔗

@deprecated

def time_grain_unit(time_grain_unit: str) -> typing.Self

top🔗

Maximum number of records to return. Defaults to 10.

def top(top: str) -> typing.Self

See also🔗