Skip to main content

partition_key_range_id_metrics

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

Overview

Namepartition_key_range_id_metrics
TypeResource
Idazure.cosmos_db.partition_key_range_id_metrics

Fields

The following fields are returned by SELECT queries:

The partition-level metrics for the partition key range id 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.
partitionIdstringThe partition id (GUID identifier) of the metric values.
partitionKeyRangeIdstringThe partition key range id (integer identifier) of the metric values.
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, databaseRid, collectionRid, partitionKeyRangeId, $filterRetrieves the metrics determined by the given filter for the given partition key range id.

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.
collectionRidstringCosmos DB collection rid.
databaseRidstringCosmos DB database rid.
partitionKeyRangeIdstringPartition Key Range Id for which to get data.
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 partition key range id.

SELECT
name,
endTime,
metricValues,
partitionId,
partitionKeyRangeId,
startTime,
timeGrain,
unit
FROM azure.cosmos_db.partition_key_range_id_metrics
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND accountName = '{{ accountName }}' -- required
AND databaseRid = '{{ databaseRid }}' -- required
AND collectionRid = '{{ collectionRid }}' -- required
AND partitionKeyRangeId = '{{ partitionKeyRangeId }}' -- required
AND $filter = '{{ $filter }}' -- required
;