-
Notifications
You must be signed in to change notification settings - Fork 4.5k
/
AveragePartitionLoadScalingTrigger.cs
65 lines (57 loc) · 4.1 KB
/
AveragePartitionLoadScalingTrigger.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
using Azure.Core;
namespace Azure.ResourceManager.ServiceFabricManagedClusters.Models
{
/// <summary> Represents a scaling trigger related to an average load of a metric/resource of a partition. </summary>
public partial class AveragePartitionLoadScalingTrigger : ManagedServiceScalingTrigger
{
/// <summary> Initializes a new instance of <see cref="AveragePartitionLoadScalingTrigger"/>. </summary>
/// <param name="metricName"> The name of the metric for which usage should be tracked. </param>
/// <param name="lowerLoadThreshold"> The lower limit of the load below which a scale in operation should be performed. </param>
/// <param name="upperLoadThreshold"> The upper limit of the load beyond which a scale out operation should be performed. </param>
/// <param name="scaleInterval"> The period in seconds on which a decision is made whether to scale or not. This property should come in ISO 8601 format "hh:mm:ss". </param>
/// <exception cref="ArgumentNullException"> <paramref name="metricName"/> or <paramref name="scaleInterval"/> is null. </exception>
public AveragePartitionLoadScalingTrigger(string metricName, double lowerLoadThreshold, double upperLoadThreshold, string scaleInterval)
{
Argument.AssertNotNull(metricName, nameof(metricName));
Argument.AssertNotNull(scaleInterval, nameof(scaleInterval));
MetricName = metricName;
LowerLoadThreshold = lowerLoadThreshold;
UpperLoadThreshold = upperLoadThreshold;
ScaleInterval = scaleInterval;
Kind = ServiceScalingTriggerKind.AveragePartitionLoadTrigger;
}
/// <summary> Initializes a new instance of <see cref="AveragePartitionLoadScalingTrigger"/>. </summary>
/// <param name="kind"> Specifies the trigger associated with this scaling policy. </param>
/// <param name="serializedAdditionalRawData"> Keeps track of any properties unknown to the library. </param>
/// <param name="metricName"> The name of the metric for which usage should be tracked. </param>
/// <param name="lowerLoadThreshold"> The lower limit of the load below which a scale in operation should be performed. </param>
/// <param name="upperLoadThreshold"> The upper limit of the load beyond which a scale out operation should be performed. </param>
/// <param name="scaleInterval"> The period in seconds on which a decision is made whether to scale or not. This property should come in ISO 8601 format "hh:mm:ss". </param>
internal AveragePartitionLoadScalingTrigger(ServiceScalingTriggerKind kind, IDictionary<string, BinaryData> serializedAdditionalRawData, string metricName, double lowerLoadThreshold, double upperLoadThreshold, string scaleInterval) : base(kind, serializedAdditionalRawData)
{
MetricName = metricName;
LowerLoadThreshold = lowerLoadThreshold;
UpperLoadThreshold = upperLoadThreshold;
ScaleInterval = scaleInterval;
Kind = kind;
}
/// <summary> Initializes a new instance of <see cref="AveragePartitionLoadScalingTrigger"/> for deserialization. </summary>
internal AveragePartitionLoadScalingTrigger()
{
}
/// <summary> The name of the metric for which usage should be tracked. </summary>
public string MetricName { get; set; }
/// <summary> The lower limit of the load below which a scale in operation should be performed. </summary>
public double LowerLoadThreshold { get; set; }
/// <summary> The upper limit of the load beyond which a scale out operation should be performed. </summary>
public double UpperLoadThreshold { get; set; }
/// <summary> The period in seconds on which a decision is made whether to scale or not. This property should come in ISO 8601 format "hh:mm:ss". </summary>
public string ScaleInterval { get; set; }
}
}