Skip to main content

collection_metric_definitions

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

Overview

Namecollection_metric_definitions
TypeResource
Idazure.cosmos_db.collection_metric_definitions

Fields

NameDatatypeDescription
nameobjectA metric name.
metricAvailabilitiesarrayThe list of metric availabilities for the account.
primaryAggregationTypestringThe primary aggregation type of the metric.
resourceUristringThe resource uri of the database.
unitstringThe unit of the metric.

Methods

NameAccessible byRequired ParamsDescription
listSELECTaccountName, collectionRid, databaseRid, resourceGroupName, subscriptionIdRetrieves metric definitions for the given collection.

SELECT examples

Retrieves metric definitions for the given collection.

SELECT
name,
metricAvailabilities,
primaryAggregationType,
resourceUri,
unit
FROM azure.cosmos_db.collection_metric_definitions
WHERE accountName = '{{ accountName }}'
AND collectionRid = '{{ collectionRid }}'
AND databaseRid = '{{ databaseRid }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';