Skip to main content

subscription_usages

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

Overview

Namesubscription_usages
TypeResource
Idazure.sql.subscription_usages

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
currentValuenumberCurrent value of the metric.
displayNamestringUser-readable name of the metric.
limitnumberBoundary value of the metric.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
unitstringUnit of the metric.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectlocation_name, usage_name, subscription_idGets a subscription usage metric.
list_by_locationselectlocation_name, subscription_idGets all subscription usage metrics in a given location.

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
location_namestringThe name of the region where the resource is located. Required.
subscription_idstring
usage_namestringName of usage metric to return. Required.

SELECT examples

Gets a subscription usage metric.

SELECT
id,
name,
currentValue,
displayName,
limit,
systemData,
type,
unit
FROM azure.sql.subscription_usages
WHERE location_name = '{{ location_name }}' -- required
AND usage_name = '{{ usage_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;