databases_metrics
Creates, updates, deletes, gets or lists a databases_metrics
resource.
Overview
Name | databases_metrics |
Type | Resource |
Id | azure.sql.databases_metrics |
Fields
The following fields are returned by SELECT
queries:
- list
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 step 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 , serverName , databaseName , $filter | Returns database metrics. |
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. |
databaseName | string | The name of the database. |
resourceGroupName | string | The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
serverName | string | The name of the server. |
subscriptionId | string | The subscription ID that identifies an Azure subscription. |
SELECT
examples
- list
Returns database metrics.
SELECT
name,
endTime,
metricValues,
startTime,
timeGrain,
unit
FROM azure.sql.databases_metrics
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND serverName = '{{ serverName }}' -- required
AND databaseName = '{{ databaseName }}' -- required
AND $filter = '{{ $filter }}' -- required
;