-
Notifications
You must be signed in to change notification settings - Fork 17
/
CfnScalingPolicy_TargetTrackingScalingPolicyConfigurationProperty.go
106 lines (103 loc) · 6.12 KB
/
CfnScalingPolicy_TargetTrackingScalingPolicyConfigurationProperty.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
package awsapplicationautoscaling
// `TargetTrackingScalingPolicyConfiguration` is a property of the [AWS::ApplicationAutoScaling::ScalingPolicy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-applicationautoscaling-scalingpolicy.html) resource that specifies a target tracking scaling policy configuration for Application Auto Scaling. Use a target tracking scaling policy to adjust the capacity of the specified scalable target in response to actual workloads, so that resource utilization remains at or near the target utilization value.
//
// For more information, see [Target tracking scaling policies](https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-target-tracking.html) in the *Application Auto Scaling User Guide* .
//
// Example:
// // The code below shows an example of how to instantiate this type.
// // The values are placeholders you should change.
// import "github.com/aws/aws-cdk-go/awscdk"
//
// targetTrackingScalingPolicyConfigurationProperty := &TargetTrackingScalingPolicyConfigurationProperty{
// TargetValue: jsii.Number(123),
//
// // the properties below are optional
// CustomizedMetricSpecification: &CustomizedMetricSpecificationProperty{
// MetricName: jsii.String("metricName"),
// Namespace: jsii.String("namespace"),
// Statistic: jsii.String("statistic"),
//
// // the properties below are optional
// Dimensions: []interface{}{
// &MetricDimensionProperty{
// Name: jsii.String("name"),
// Value: jsii.String("value"),
// },
// },
// Unit: jsii.String("unit"),
// },
// DisableScaleIn: jsii.Boolean(false),
// PredefinedMetricSpecification: &PredefinedMetricSpecificationProperty{
// PredefinedMetricType: jsii.String("predefinedMetricType"),
//
// // the properties below are optional
// ResourceLabel: jsii.String("resourceLabel"),
// },
// ScaleInCooldown: jsii.Number(123),
// ScaleOutCooldown: jsii.Number(123),
// }
//
type CfnScalingPolicy_TargetTrackingScalingPolicyConfigurationProperty struct {
// The target value for the metric.
//
// Although this property accepts numbers of type Double, it won't accept values that are either too small or too large. Values must be in the range of -2^360 to 2^360. The value must be a valid number based on the choice of metric. For example, if the metric is CPU utilization, then the target value is a percent value that represents how much of the CPU can be used before scaling out.
TargetValue *float64 `field:"required" json:"targetValue" yaml:"targetValue"`
// A customized metric.
//
// You can specify either a predefined metric or a customized metric.
CustomizedMetricSpecification interface{} `field:"optional" json:"customizedMetricSpecification" yaml:"customizedMetricSpecification"`
// Indicates whether scale in by the target tracking scaling policy is disabled.
//
// If the value is `true` , scale in is disabled and the target tracking scaling policy won't remove capacity from the scalable target. Otherwise, scale in is enabled and the target tracking scaling policy can remove capacity from the scalable target. The default value is `false` .
DisableScaleIn interface{} `field:"optional" json:"disableScaleIn" yaml:"disableScaleIn"`
// A predefined metric.
//
// You can specify either a predefined metric or a customized metric.
PredefinedMetricSpecification interface{} `field:"optional" json:"predefinedMetricSpecification" yaml:"predefinedMetricSpecification"`
// The amount of time, in seconds, after a scale-in activity completes before another scale-in activity can start.
//
// With the *scale-in cooldown period* , the intention is to scale in conservatively to protect your application’s availability, so scale-in activities are blocked until the cooldown period has expired. However, if another alarm triggers a scale-out activity during the scale-in cooldown period, Application Auto Scaling scales out the target immediately. In this case, the scale-in cooldown period stops and doesn't complete.
//
// Application Auto Scaling provides a default value of 600 for Amazon ElastiCache replication groups and a default value of 300 for the following scalable targets:
//
// - AppStream 2.0 fleets
// - Aurora DB clusters
// - ECS services
// - EMR clusters
// - Neptune clusters
// - SageMaker endpoint variants
// - Spot Fleets
// - Custom resources
//
// For all other scalable targets, the default value is 0:
//
// - Amazon Comprehend document classification and entity recognizer endpoints
// - DynamoDB tables and global secondary indexes
// - Amazon Keyspaces tables
// - Lambda provisioned concurrency
// - Amazon MSK broker storage.
ScaleInCooldown *float64 `field:"optional" json:"scaleInCooldown" yaml:"scaleInCooldown"`
// The amount of time, in seconds, to wait for a previous scale-out activity to take effect.
//
// With the *scale-out cooldown period* , the intention is to continuously (but not excessively) scale out. After Application Auto Scaling successfully scales out using a target tracking scaling policy, it starts to calculate the cooldown time. The scaling policy won't increase the desired capacity again unless either a larger scale out is triggered or the cooldown period ends. While the cooldown period is in effect, the capacity added by the initiating scale-out activity is calculated as part of the desired capacity for the next scale-out activity.
//
// Application Auto Scaling provides a default value of 600 for Amazon ElastiCache replication groups and a default value of 300 for the following scalable targets:
//
// - AppStream 2.0 fleets
// - Aurora DB clusters
// - ECS services
// - EMR clusters
// - Neptune clusters
// - SageMaker endpoint variants
// - Spot Fleets
// - Custom resources
//
// For all other scalable targets, the default value is 0:
//
// - Amazon Comprehend document classification and entity recognizer endpoints
// - DynamoDB tables and global secondary indexes
// - Amazon Keyspaces tables
// - Lambda provisioned concurrency
// - Amazon MSK broker storage.
ScaleOutCooldown *float64 `field:"optional" json:"scaleOutCooldown" yaml:"scaleOutCooldown"`
}