Skip to main content

collection_partition_usages

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

Overview

Namecollection_partition_usages
TypeResource
Idazure.cosmos_db.collection_partition_usages

Fields

The following fields are returned by SELECT queries:

The usages for the collection, per partition were retrieved successfully.

NameDatatypeDescription
nameobjectThe name information for the metric.
currentValueinteger (int64)Current value for this metric
limitinteger (int64)Maximum value for this metric
partitionIdstringThe partition id (GUID identifier) of the usages.
partitionKeyRangeIdstringThe partition key range id (integer identifier) of the usages.
quotaPeriodstringThe quota period used to summarize the usage values.
unitstringThe unit of the metric.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectsubscriptionId, resourceGroupName, accountName, databaseRid, collectionRid$filterRetrieves the usages (most recent storage data) for the given collection, split by partition.

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.
$filterstringAn OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names).

SELECT examples

Retrieves the usages (most recent storage data) for the given collection, split by partition.

SELECT
name,
currentValue,
limit,
partitionId,
partitionKeyRangeId,
quotaPeriod,
unit
FROM azure.cosmos_db.collection_partition_usages
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND accountName = '{{ accountName }}' -- required
AND databaseRid = '{{ databaseRid }}' -- required
AND collectionRid = '{{ collectionRid }}' -- required
AND $filter = '{{ $filter }}'
;