database_account_region_metrics
Creates, updates, deletes, gets or lists a database_account_region_metrics
resource.
Overview
Name | database_account_region_metrics |
Type | Resource |
Id | azure.cosmos_db.database_account_region_metrics |
Fields
The following fields are returned by SELECT
queries:
- list
The metrics for the database account 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. |
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 , region , $filter | Retrieves the metrics determined by the given filter for the given database account and region. |
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. |
region | string | Cosmos DB region, with spaces between words and each word capitalized. |
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 database account and region.
SELECT
name,
endTime,
metricValues,
startTime,
timeGrain,
unit
FROM azure.cosmos_db.database_account_region_metrics
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND accountName = '{{ accountName }}' -- required
AND region = '{{ region }}' -- required
AND $filter = '{{ $filter }}' -- required
;