metric_definitions
Creates, updates, deletes, gets or lists a metric_definitions resource.
Overview
| Name | metric_definitions |
| Type | Resource |
| Id | azure.monitor.metric_definitions |
Fields
The following fields are returned by SELECT queries:
- list_at_subscription_scope
- list
| Name | Datatype | Description |
|---|---|---|
id | string | The resource identifier of the metric definition. |
name | object | The localizable string class. |
category | string | Custom category name for this metric. |
dimensions | array | The name and the display name of the dimension, i.e. it is a localizable string. |
displayDescription | string | Detailed description of this metric. |
isDimensionRequired | boolean | Flag to indicate whether the dimension is required. |
metricAvailabilities | array | The collection of what aggregation intervals are available to be queried. |
metricClass | string | The class of the metric. Known values are: "Availability", "Transactions", "Errors", "Latency", and "Saturation". (Availability, Transactions, Errors, Latency, Saturation) |
namespace | string | The namespace the metric belongs to. |
primaryAggregationType | string | The primary aggregation type value defining how to use the values for display. Known values are: "None", "Average", "Count", "Minimum", "Maximum", and "Total". (None, Average, Count, Minimum, Maximum, Total) |
resourceId | string | The resource identifier of the resource that emitted the metric. |
supportedAggregationTypes | array | The collection of what aggregation types are supported. |
unit | string | The unit of the metric. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", and "BitsPerSecond". (Count, Bytes, Seconds, CountPerSecond, BytesPerSecond, Percent, MilliSeconds, ByteSeconds, Unspecified, Cores, MilliCores, NanoCores, BitsPerSecond) |
| Name | Datatype | Description |
|---|---|---|
id | string | The resource identifier of the metric definition. |
name | object | The localizable string class. |
category | string | Custom category name for this metric. |
dimensions | array | The name and the display name of the dimension, i.e. it is a localizable string. |
displayDescription | string | Detailed description of this metric. |
isDimensionRequired | boolean | Flag to indicate whether the dimension is required. |
metricAvailabilities | array | The collection of what aggregation intervals are available to be queried. |
metricClass | string | The class of the metric. Known values are: "Availability", "Transactions", "Errors", "Latency", and "Saturation". (Availability, Transactions, Errors, Latency, Saturation) |
namespace | string | The namespace the metric belongs to. |
primaryAggregationType | string | The primary aggregation type value defining how to use the values for display. Known values are: "None", "Average", "Count", "Minimum", "Maximum", and "Total". (None, Average, Count, Minimum, Maximum, Total) |
resourceId | string | The resource identifier of the resource that emitted the metric. |
supportedAggregationTypes | array | The collection of what aggregation types are supported. |
unit | string | The unit of the metric. Known values are: "Count", "Bytes", "Seconds", "CountPerSecond", "BytesPerSecond", "Percent", "MilliSeconds", "ByteSeconds", "Unspecified", "Cores", "MilliCores", "NanoCores", and "BitsPerSecond". (Count, Bytes, Seconds, CountPerSecond, BytesPerSecond, Percent, MilliSeconds, ByteSeconds, Unspecified, Cores, MilliCores, NanoCores, BitsPerSecond) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_at_subscription_scope | select | subscription_id, region | metricnamespace | Lists the metric definitions for the subscription. |
list | select | resource_uri | metricnamespace | Lists the metric definitions for the resource. |
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 |
|---|---|---|
region | string | The region where the metrics you want reside. Required. |
resource_uri | string | The fully qualified Azure Resource manager identifier of the resource. Required. |
subscription_id | string | |
metricnamespace | string | Metric namespace where the metrics you want reside. Default value is None. |
SELECT examples
- list_at_subscription_scope
- list
Lists the metric definitions for the subscription.
SELECT
id,
name,
category,
dimensions,
displayDescription,
isDimensionRequired,
metricAvailabilities,
metricClass,
namespace,
primaryAggregationType,
resourceId,
supportedAggregationTypes,
unit
FROM azure.monitor.metric_definitions
WHERE subscription_id = '{{ subscription_id }}' -- required
AND region = '{{ region }}' -- required
AND metricnamespace = '{{ metricnamespace }}'
;
Lists the metric definitions for the resource.
SELECT
id,
name,
category,
dimensions,
displayDescription,
isDimensionRequired,
metricAvailabilities,
metricClass,
namespace,
primaryAggregationType,
resourceId,
supportedAggregationTypes,
unit
FROM azure.monitor.metric_definitions
WHERE resource_uri = '{{ resource_uri }}' -- required
AND metricnamespace = '{{ metricnamespace }}'
;