Skip to main content

database_accounts_metric_definitions

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

Overview

Namedatabase_accounts_metric_definitions
TypeResource
Idazure.cosmos_db.database_accounts_metric_definitions

Fields

The following fields are returned by SELECT queries:

The metric definitions for the database account were retrieved successfully.

NameDatatypeDescription
nameobjectThe name information for the metric.
metricAvailabilitiesarrayThe list of metric availabilities for the account.
primaryAggregationTypestringThe primary aggregation type of the metric.
resourceUristringThe resource uri of the database.
unitstringThe unit of the metric.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectsubscriptionId, resourceGroupName, accountNameRetrieves metric definitions for the given database account.

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.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstringThe ID of the target subscription.

SELECT examples

Retrieves metric definitions for the given database account.

SELECT
name,
metricAvailabilities,
primaryAggregationType,
resourceUri,
unit
FROM azure.cosmos_db.database_accounts_metric_definitions
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND accountName = '{{ accountName }}' -- required
;