Share via


MetricTrigger Class

Definition

The trigger that results in a scaling action.

public class MetricTrigger : System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.Monitor.Models.MetricTrigger>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.Monitor.Models.MetricTrigger>
public class MetricTrigger
type MetricTrigger = class
    interface IJsonModel<MetricTrigger>
    interface IPersistableModel<MetricTrigger>
type MetricTrigger = class
Public Class MetricTrigger
Implements IJsonModel(Of MetricTrigger), IPersistableModel(Of MetricTrigger)
Public Class MetricTrigger
Inheritance
MetricTrigger
Implements

Constructors

MetricTrigger(String, ResourceIdentifier, TimeSpan, MetricStatisticType, TimeSpan, MetricTriggerTimeAggregationType, MetricTriggerComparisonOperation, Double)

Initializes a new instance of MetricTrigger.

Properties

Dimensions

List of dimension conditions. For example: [{"DimensionName":"AppName","Operator":"Equals","Values":["App1"]},{"DimensionName":"Deployment","Operator":"Equals","Values":["default"]}].

IsDividedPerInstance

a value indicating whether metric should divide per instance.

MetricName

the name of the metric that defines what the rule monitors.

MetricNamespace

the namespace of the metric that defines what the rule monitors.

MetricResourceId

the resource identifier of the resource the rule monitors.

MetricResourceLocation

the location of the resource the rule monitors.

Operator

the operator that is used to compare the metric data and the threshold.

Statistic

the metric statistic type. How the metrics from multiple instances are combined.

Threshold

the threshold of the metric that triggers the scale action.

TimeAggregation

time aggregation type. How the data that is collected should be combined over time. The default value is Average.

TimeGrain

the granularity of metrics the rule monitors. Must be one of the predefined values returned from metric definitions for the metric. Must be between 12 hours and 1 minute.

TimeWindow

the range of time in which instance data is collected. This value must be greater than the delay in metric collection, which can vary from resource-to-resource. Must be between 12 hours and 5 minutes.

Explicit Interface Implementations

IJsonModel<MetricTrigger>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<MetricTrigger>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<MetricTrigger>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<MetricTrigger>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<MetricTrigger>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to