Skip to main content

databases_metric_definitions

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

Overview

Namedatabases_metric_definitions
TypeResource
Idazure.sql.databases_metric_definitions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
nameobjectThe name information for the metric.
metricAvailabilitiesarrayThe list of database metric availabilities for the metric.
primaryAggregationTypestringThe primary aggregation type defining how metric values are displayed.
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, serverName, databaseNameReturns database metric definitions.

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
databaseNamestringThe name of the database.
resourceGroupNamestringThe name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
serverNamestringThe name of the server.
subscriptionIdstringThe subscription ID that identifies an Azure subscription.

SELECT examples

Returns database metric definitions.

SELECT
name,
metricAvailabilities,
primaryAggregationType,
resourceUri,
unit
FROM azure.sql.databases_metric_definitions
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND serverName = '{{ serverName }}' -- required
AND databaseName = '{{ databaseName }}' -- required
;