Compartir a través de


ScaleRule Class

Definition

A rule that provide the triggers and parameters for the scaling action.

[System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Models.Api20221001.ScaleRuleTypeConverter))]
public class ScaleRule : Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Models.Api20221001.IScaleRule
[<System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Models.Api20221001.ScaleRuleTypeConverter))>]
type ScaleRule = class
    interface IScaleRule
    interface IJsonSerializable
Public Class ScaleRule
Implements IScaleRule
Inheritance
ScaleRule
Attributes
Implements

Constructors

ScaleRule()

Creates an new ScaleRule instance.

Properties

MetricTriggerDimension

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

MetricTriggerDividePerInstance

a value indicating whether metric should divide per instance.

MetricTriggerMetricName

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

MetricTriggerMetricNamespace

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

MetricTriggerMetricResourceLocation

the location of the resource the rule monitors.

MetricTriggerMetricResourceUri

the resource identifier of the resource the rule monitors.

MetricTriggerOperator

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

MetricTriggerStatistic

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

MetricTriggerThreshold

the threshold of the metric that triggers the scale action.

MetricTriggerTimeAggregation

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

MetricTriggerTimeGrain

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.

MetricTriggerTimeWindow

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.

ScaleActionCooldown

the amount of time to wait since the last scaling action before this action occurs. It must be between 1 week and 1 minute in ISO 8601 format.

ScaleActionDirection

the scale direction. Whether the scaling action increases or decreases the number of instances.

ScaleActionType

the type of action that should occur when the scale rule fires.

ScaleActionValue

the number of instances that are involved in the scaling action. This value must be 1 or greater. The default value is 1.

Methods

DeserializeFromDictionary(IDictionary)

Deserializes a IDictionary into an instance of ScaleRule.

DeserializeFromPSObject(PSObject)

Deserializes a PSObject into an instance of ScaleRule.

FromJson(JsonNode)

Deserializes a JsonNode into an instance of Microsoft.Azure.PowerShell.Cmdlets.Monitor.Autoscale.Models.Api20221001.IScaleRule.

FromJsonString(String)

Creates a new instance of ScaleRule, deserializing the content from a json string.

ToJson(JsonObject, SerializationMode)

Serializes this instance of ScaleRule into a JsonNode.

ToJsonString()

Serializes this instance to a json string.

ToString()

Applies to