-
Notifications
You must be signed in to change notification settings - Fork 17
/
AdjustmentType.go
52 lines (48 loc) · 1.63 KB
/
AdjustmentType.go
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
package awsautoscaling
// How adjustment numbers are interpreted.
//
// Example:
// var autoScalingGroup autoScalingGroup
//
//
// workerUtilizationMetric := cloudwatch.NewMetric(&MetricProps{
// Namespace: jsii.String("MyService"),
// MetricName: jsii.String("WorkerUtilization"),
// })
//
// autoScalingGroup.scaleOnMetric(jsii.String("ScaleToCPU"), &BasicStepScalingPolicyProps{
// Metric: workerUtilizationMetric,
// ScalingSteps: []scalingInterval{
// &scalingInterval{
// Upper: jsii.Number(10),
// Change: -jsii.Number(1),
// },
// &scalingInterval{
// Lower: jsii.Number(50),
// Change: +jsii.Number(1),
// },
// &scalingInterval{
// Lower: jsii.Number(70),
// Change: +jsii.Number(3),
// },
// },
//
// // Change this to AdjustmentType.PERCENT_CHANGE_IN_CAPACITY to interpret the
// // 'change' numbers before as percentages instead of capacity counts.
// AdjustmentType: autoscaling.AdjustmentType_CHANGE_IN_CAPACITY,
// })
//
type AdjustmentType string
const (
// Add the adjustment number to the current capacity.
//
// A positive number increases capacity, a negative number decreases capacity.
AdjustmentType_CHANGE_IN_CAPACITY AdjustmentType = "CHANGE_IN_CAPACITY"
// Add this percentage of the current capacity to itself.
//
// The number must be between -100 and 100; a positive number increases
// capacity and a negative number decreases it.
AdjustmentType_PERCENT_CHANGE_IN_CAPACITY AdjustmentType = "PERCENT_CHANGE_IN_CAPACITY"
// Make the capacity equal to the exact number given.
AdjustmentType_EXACT_CAPACITY AdjustmentType = "EXACT_CAPACITY"
)