Skip to main content

database_account_region_metrics

Creates, updates, deletes, gets or lists a database_account_region_metrics resource.

Overview

Namedatabase_account_region_metrics
TypeResource
Idazure.cosmos_db.database_account_region_metrics

Fields

The following fields are returned by SELECT queries:

The metrics for the database account were retrieved successfully.

NameDatatypeDescription
nameobjectThe name information for the metric.
endTimestring (date-time)The end time for the metric (ISO-8601 format).
metricValuesarrayThe metric values for the specified time window and timestep.
startTimestring (date-time)The start time for the metric (ISO-8601 format).
timeGrainstringThe time grain to be used to summarize the metric values.
unitstringThe unit of the metric.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectsubscriptionId, resourceGroupName, accountName, region, $filterRetrieves the metrics determined by the given filter for the given database account and region.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
$filterstringAn OData filter expression that describes a subset of metrics to return. The parameters that can be filtered are name.value (name of the metric, can have an or of multiple names), startTime, endTime, and timeGrain. The supported operator is eq.
accountNamestringCosmos DB database account name.
regionstringCosmos DB region, with spaces between words and each word capitalized.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstringThe ID of the target subscription.

SELECT examples

Retrieves the metrics determined by the given filter for the given database account and region.

SELECT
name,
endTime,
metricValues,
startTime,
timeGrain,
unit
FROM azure.cosmos_db.database_account_region_metrics
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND accountName = '{{ accountName }}' -- required
AND region = '{{ region }}' -- required
AND $filter = '{{ $filter }}' -- required
;