subscription_usages
Creates, updates, deletes, gets or lists a subscription_usages resource.
Overview
| Name | subscription_usages |
| Type | Resource |
| Id | azure.sql.subscription_usages |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_location
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
currentValue | number | Current value of the metric. |
displayName | string | User-readable name of the metric. |
limit | number | Boundary value of the metric. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
unit | string | Unit of the metric. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
currentValue | number | Current value of the metric. |
displayName | string | User-readable name of the metric. |
limit | number | Boundary value of the metric. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
unit | string | Unit of the metric. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | location_name, usage_name, subscription_id | Gets a subscription usage metric. | |
list_by_location | select | location_name, subscription_id | Gets 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.
| Name | Datatype | Description |
|---|---|---|
location_name | string | The name of the region where the resource is located. Required. |
subscription_id | string | |
usage_name | string | Name of usage metric to return. Required. |
SELECT examples
- get
- list_by_location
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
;
Gets all subscription usage metrics in a given location.
SELECT
id,
name,
currentValue,
displayName,
limit,
systemData,
type,
unit
FROM azure.sql.subscription_usages
WHERE location_name = '{{ location_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;