partition_key_range_id_metrics
Creates, updates, deletes, gets or lists a partition_key_range_id_metrics
resource.
Overview
Name | partition_key_range_id_metrics |
Type | Resource |
Id | azure.cosmos_db.partition_key_range_id_metrics |
Fields
The following fields are returned by SELECT
queries:
- list
The partition-level metrics for the partition key range id were retrieved successfully.
Name | Datatype | Description |
---|---|---|
name | object | The name information for the metric. |
endTime | string (date-time) | The end time for the metric (ISO-8601 format). |
metricValues | array | The metric values for the specified time window and timestep. |
partitionId | string | The partition id (GUID identifier) of the metric values. |
partitionKeyRangeId | string | The partition key range id (integer identifier) of the metric values. |
startTime | string (date-time) | The start time for the metric (ISO-8601 format). |
timeGrain | string | The time grain to be used to summarize the metric values. |
unit | string | The unit of the metric. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list | select | subscriptionId , resourceGroupName , accountName , databaseRid , collectionRid , partitionKeyRangeId , $filter | Retrieves 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.
Name | Datatype | Description |
---|---|---|
$filter | string | An 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. |
accountName | string | Cosmos DB database account name. |
collectionRid | string | Cosmos DB collection rid. |
databaseRid | string | Cosmos DB database rid. |
partitionKeyRangeId | string | Partition Key Range Id for which to get data. |
resourceGroupName | string | The name of the resource group. The name is case insensitive. |
subscriptionId | string | The ID of the target subscription. |
SELECT
examples
- list
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
;