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

The following fields are returned by SELECT queries:

The metric definitions for the collection were retrieved successfully.

NameDatatypeDescription
nameobjectThe name information for the metric.
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

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectsubscriptionId, resourceGroupName, accountName, databaseRid, collectionRidRetrieves metric definitions for the given collection.

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
accountNamestringCosmos DB database account name.
collectionRidstringCosmos DB collection rid.
databaseRidstringCosmos DB database rid.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstringThe ID of the target subscription.

SELECT examples

Retrieves metric definitions for the given collection.

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