Skip to main content

database_usages

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

Overview

Namedatabase_usages
TypeResource
Idazure.cosmos_db.database_usages

Fields

The following fields are returned by SELECT queries:

The usages for the database were retrieved successfully.

NameDatatypeDescription
nameobjectThe name information for the metric.
currentValueinteger (int64)Current value for this metric
limitinteger (int64)Maximum value for this metric
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$filterRetrieves the usages (most recent data) for the given database.

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.
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 data) for the given database.

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