AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
ScalingPolicy.h
1
6#pragma once
7#include <aws/autoscaling/AutoScaling_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/autoscaling/model/TargetTrackingConfiguration.h>
12#include <aws/autoscaling/model/PredictiveScalingConfiguration.h>
13#include <aws/autoscaling/model/StepAdjustment.h>
14#include <aws/autoscaling/model/Alarm.h>
15#include <utility>
16
17namespace Aws
18{
19namespace Utils
20{
21namespace Xml
22{
23 class XmlNode;
24} // namespace Xml
25} // namespace Utils
26namespace AutoScaling
27{
28namespace Model
29{
30
37 {
38 public:
39 AWS_AUTOSCALING_API ScalingPolicy() = default;
40 AWS_AUTOSCALING_API ScalingPolicy(const Aws::Utils::Xml::XmlNode& xmlNode);
41 AWS_AUTOSCALING_API ScalingPolicy& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
42
43 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
44 AWS_AUTOSCALING_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
45
46
48
51 inline const Aws::String& GetAutoScalingGroupName() const { return m_autoScalingGroupName; }
52 inline bool AutoScalingGroupNameHasBeenSet() const { return m_autoScalingGroupNameHasBeenSet; }
53 template<typename AutoScalingGroupNameT = Aws::String>
54 void SetAutoScalingGroupName(AutoScalingGroupNameT&& value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName = std::forward<AutoScalingGroupNameT>(value); }
55 template<typename AutoScalingGroupNameT = Aws::String>
56 ScalingPolicy& WithAutoScalingGroupName(AutoScalingGroupNameT&& value) { SetAutoScalingGroupName(std::forward<AutoScalingGroupNameT>(value)); return *this;}
58
60
63 inline const Aws::String& GetPolicyName() const { return m_policyName; }
64 inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; }
65 template<typename PolicyNameT = Aws::String>
66 void SetPolicyName(PolicyNameT&& value) { m_policyNameHasBeenSet = true; m_policyName = std::forward<PolicyNameT>(value); }
67 template<typename PolicyNameT = Aws::String>
68 ScalingPolicy& WithPolicyName(PolicyNameT&& value) { SetPolicyName(std::forward<PolicyNameT>(value)); return *this;}
70
72
75 inline const Aws::String& GetPolicyARN() const { return m_policyARN; }
76 inline bool PolicyARNHasBeenSet() const { return m_policyARNHasBeenSet; }
77 template<typename PolicyARNT = Aws::String>
78 void SetPolicyARN(PolicyARNT&& value) { m_policyARNHasBeenSet = true; m_policyARN = std::forward<PolicyARNT>(value); }
79 template<typename PolicyARNT = Aws::String>
80 ScalingPolicy& WithPolicyARN(PolicyARNT&& value) { SetPolicyARN(std::forward<PolicyARNT>(value)); return *this;}
82
84
95 inline const Aws::String& GetPolicyType() const { return m_policyType; }
96 inline bool PolicyTypeHasBeenSet() const { return m_policyTypeHasBeenSet; }
97 template<typename PolicyTypeT = Aws::String>
98 void SetPolicyType(PolicyTypeT&& value) { m_policyTypeHasBeenSet = true; m_policyType = std::forward<PolicyTypeT>(value); }
99 template<typename PolicyTypeT = Aws::String>
100 ScalingPolicy& WithPolicyType(PolicyTypeT&& value) { SetPolicyType(std::forward<PolicyTypeT>(value)); return *this;}
102
104
109 inline const Aws::String& GetAdjustmentType() const { return m_adjustmentType; }
110 inline bool AdjustmentTypeHasBeenSet() const { return m_adjustmentTypeHasBeenSet; }
111 template<typename AdjustmentTypeT = Aws::String>
112 void SetAdjustmentType(AdjustmentTypeT&& value) { m_adjustmentTypeHasBeenSet = true; m_adjustmentType = std::forward<AdjustmentTypeT>(value); }
113 template<typename AdjustmentTypeT = Aws::String>
114 ScalingPolicy& WithAdjustmentType(AdjustmentTypeT&& value) { SetAdjustmentType(std::forward<AdjustmentTypeT>(value)); return *this;}
116
118
122 inline int GetMinAdjustmentStep() const { return m_minAdjustmentStep; }
123 inline bool MinAdjustmentStepHasBeenSet() const { return m_minAdjustmentStepHasBeenSet; }
124 inline void SetMinAdjustmentStep(int value) { m_minAdjustmentStepHasBeenSet = true; m_minAdjustmentStep = value; }
125 inline ScalingPolicy& WithMinAdjustmentStep(int value) { SetMinAdjustmentStep(value); return *this;}
127
129
133 inline int GetMinAdjustmentMagnitude() const { return m_minAdjustmentMagnitude; }
134 inline bool MinAdjustmentMagnitudeHasBeenSet() const { return m_minAdjustmentMagnitudeHasBeenSet; }
135 inline void SetMinAdjustmentMagnitude(int value) { m_minAdjustmentMagnitudeHasBeenSet = true; m_minAdjustmentMagnitude = value; }
136 inline ScalingPolicy& WithMinAdjustmentMagnitude(int value) { SetMinAdjustmentMagnitude(value); return *this;}
138
140
145 inline int GetScalingAdjustment() const { return m_scalingAdjustment; }
146 inline bool ScalingAdjustmentHasBeenSet() const { return m_scalingAdjustmentHasBeenSet; }
147 inline void SetScalingAdjustment(int value) { m_scalingAdjustmentHasBeenSet = true; m_scalingAdjustment = value; }
148 inline ScalingPolicy& WithScalingAdjustment(int value) { SetScalingAdjustment(value); return *this;}
150
152
155 inline int GetCooldown() const { return m_cooldown; }
156 inline bool CooldownHasBeenSet() const { return m_cooldownHasBeenSet; }
157 inline void SetCooldown(int value) { m_cooldownHasBeenSet = true; m_cooldown = value; }
158 inline ScalingPolicy& WithCooldown(int value) { SetCooldown(value); return *this;}
160
162
166 inline const Aws::Vector<StepAdjustment>& GetStepAdjustments() const { return m_stepAdjustments; }
167 inline bool StepAdjustmentsHasBeenSet() const { return m_stepAdjustmentsHasBeenSet; }
168 template<typename StepAdjustmentsT = Aws::Vector<StepAdjustment>>
169 void SetStepAdjustments(StepAdjustmentsT&& value) { m_stepAdjustmentsHasBeenSet = true; m_stepAdjustments = std::forward<StepAdjustmentsT>(value); }
170 template<typename StepAdjustmentsT = Aws::Vector<StepAdjustment>>
171 ScalingPolicy& WithStepAdjustments(StepAdjustmentsT&& value) { SetStepAdjustments(std::forward<StepAdjustmentsT>(value)); return *this;}
172 template<typename StepAdjustmentsT = StepAdjustment>
173 ScalingPolicy& AddStepAdjustments(StepAdjustmentsT&& value) { m_stepAdjustmentsHasBeenSet = true; m_stepAdjustments.emplace_back(std::forward<StepAdjustmentsT>(value)); return *this; }
175
177
181 inline const Aws::String& GetMetricAggregationType() const { return m_metricAggregationType; }
182 inline bool MetricAggregationTypeHasBeenSet() const { return m_metricAggregationTypeHasBeenSet; }
183 template<typename MetricAggregationTypeT = Aws::String>
184 void SetMetricAggregationType(MetricAggregationTypeT&& value) { m_metricAggregationTypeHasBeenSet = true; m_metricAggregationType = std::forward<MetricAggregationTypeT>(value); }
185 template<typename MetricAggregationTypeT = Aws::String>
186 ScalingPolicy& WithMetricAggregationType(MetricAggregationTypeT&& value) { SetMetricAggregationType(std::forward<MetricAggregationTypeT>(value)); return *this;}
188
190
194 inline int GetEstimatedInstanceWarmup() const { return m_estimatedInstanceWarmup; }
195 inline bool EstimatedInstanceWarmupHasBeenSet() const { return m_estimatedInstanceWarmupHasBeenSet; }
196 inline void SetEstimatedInstanceWarmup(int value) { m_estimatedInstanceWarmupHasBeenSet = true; m_estimatedInstanceWarmup = value; }
197 inline ScalingPolicy& WithEstimatedInstanceWarmup(int value) { SetEstimatedInstanceWarmup(value); return *this;}
199
201
204 inline const Aws::Vector<Alarm>& GetAlarms() const { return m_alarms; }
205 inline bool AlarmsHasBeenSet() const { return m_alarmsHasBeenSet; }
206 template<typename AlarmsT = Aws::Vector<Alarm>>
207 void SetAlarms(AlarmsT&& value) { m_alarmsHasBeenSet = true; m_alarms = std::forward<AlarmsT>(value); }
208 template<typename AlarmsT = Aws::Vector<Alarm>>
209 ScalingPolicy& WithAlarms(AlarmsT&& value) { SetAlarms(std::forward<AlarmsT>(value)); return *this;}
210 template<typename AlarmsT = Alarm>
211 ScalingPolicy& AddAlarms(AlarmsT&& value) { m_alarmsHasBeenSet = true; m_alarms.emplace_back(std::forward<AlarmsT>(value)); return *this; }
213
215
218 inline const TargetTrackingConfiguration& GetTargetTrackingConfiguration() const { return m_targetTrackingConfiguration; }
219 inline bool TargetTrackingConfigurationHasBeenSet() const { return m_targetTrackingConfigurationHasBeenSet; }
220 template<typename TargetTrackingConfigurationT = TargetTrackingConfiguration>
221 void SetTargetTrackingConfiguration(TargetTrackingConfigurationT&& value) { m_targetTrackingConfigurationHasBeenSet = true; m_targetTrackingConfiguration = std::forward<TargetTrackingConfigurationT>(value); }
222 template<typename TargetTrackingConfigurationT = TargetTrackingConfiguration>
223 ScalingPolicy& WithTargetTrackingConfiguration(TargetTrackingConfigurationT&& value) { SetTargetTrackingConfiguration(std::forward<TargetTrackingConfigurationT>(value)); return *this;}
225
227
231 inline bool GetEnabled() const { return m_enabled; }
232 inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; }
233 inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; }
234 inline ScalingPolicy& WithEnabled(bool value) { SetEnabled(value); return *this;}
236
238
241 inline const PredictiveScalingConfiguration& GetPredictiveScalingConfiguration() const { return m_predictiveScalingConfiguration; }
242 inline bool PredictiveScalingConfigurationHasBeenSet() const { return m_predictiveScalingConfigurationHasBeenSet; }
243 template<typename PredictiveScalingConfigurationT = PredictiveScalingConfiguration>
244 void SetPredictiveScalingConfiguration(PredictiveScalingConfigurationT&& value) { m_predictiveScalingConfigurationHasBeenSet = true; m_predictiveScalingConfiguration = std::forward<PredictiveScalingConfigurationT>(value); }
245 template<typename PredictiveScalingConfigurationT = PredictiveScalingConfiguration>
246 ScalingPolicy& WithPredictiveScalingConfiguration(PredictiveScalingConfigurationT&& value) { SetPredictiveScalingConfiguration(std::forward<PredictiveScalingConfigurationT>(value)); return *this;}
248 private:
249
250 Aws::String m_autoScalingGroupName;
251 bool m_autoScalingGroupNameHasBeenSet = false;
252
253 Aws::String m_policyName;
254 bool m_policyNameHasBeenSet = false;
255
256 Aws::String m_policyARN;
257 bool m_policyARNHasBeenSet = false;
258
259 Aws::String m_policyType;
260 bool m_policyTypeHasBeenSet = false;
261
262 Aws::String m_adjustmentType;
263 bool m_adjustmentTypeHasBeenSet = false;
264
265 int m_minAdjustmentStep{0};
266 bool m_minAdjustmentStepHasBeenSet = false;
267
268 int m_minAdjustmentMagnitude{0};
269 bool m_minAdjustmentMagnitudeHasBeenSet = false;
270
271 int m_scalingAdjustment{0};
272 bool m_scalingAdjustmentHasBeenSet = false;
273
274 int m_cooldown{0};
275 bool m_cooldownHasBeenSet = false;
276
277 Aws::Vector<StepAdjustment> m_stepAdjustments;
278 bool m_stepAdjustmentsHasBeenSet = false;
279
280 Aws::String m_metricAggregationType;
281 bool m_metricAggregationTypeHasBeenSet = false;
282
283 int m_estimatedInstanceWarmup{0};
284 bool m_estimatedInstanceWarmupHasBeenSet = false;
285
286 Aws::Vector<Alarm> m_alarms;
287 bool m_alarmsHasBeenSet = false;
288
289 TargetTrackingConfiguration m_targetTrackingConfiguration;
290 bool m_targetTrackingConfigurationHasBeenSet = false;
291
292 bool m_enabled{false};
293 bool m_enabledHasBeenSet = false;
294
295 PredictiveScalingConfiguration m_predictiveScalingConfiguration;
296 bool m_predictiveScalingConfigurationHasBeenSet = false;
297 };
298
299} // namespace Model
300} // namespace AutoScaling
301} // namespace Aws
const Aws::Vector< Alarm > & GetAlarms() const
void SetAdjustmentType(AdjustmentTypeT &&value)
ScalingPolicy & WithEnabled(bool value)
void SetStepAdjustments(StepAdjustmentsT &&value)
void SetPolicyType(PolicyTypeT &&value)
const PredictiveScalingConfiguration & GetPredictiveScalingConfiguration() const
const Aws::String & GetPolicyName() const
AWS_AUTOSCALING_API ScalingPolicy()=default
ScalingPolicy & WithScalingAdjustment(int value)
ScalingPolicy & WithEstimatedInstanceWarmup(int value)
AWS_AUTOSCALING_API void OutputToStream(Aws::OStream &oStream, const char *location) const
AWS_AUTOSCALING_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
AWS_AUTOSCALING_API ScalingPolicy & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
ScalingPolicy & WithMinAdjustmentStep(int value)
void SetAutoScalingGroupName(AutoScalingGroupNameT &&value)
const Aws::String & GetPolicyARN() const
const Aws::Vector< StepAdjustment > & GetStepAdjustments() const
ScalingPolicy & WithPredictiveScalingConfiguration(PredictiveScalingConfigurationT &&value)
ScalingPolicy & WithAdjustmentType(AdjustmentTypeT &&value)
ScalingPolicy & AddAlarms(AlarmsT &&value)
ScalingPolicy & WithPolicyType(PolicyTypeT &&value)
ScalingPolicy & WithPolicyARN(PolicyARNT &&value)
void SetPolicyARN(PolicyARNT &&value)
ScalingPolicy & WithMetricAggregationType(MetricAggregationTypeT &&value)
ScalingPolicy & WithMinAdjustmentMagnitude(int value)
const Aws::String & GetPolicyType() const
ScalingPolicy & WithCooldown(int value)
const Aws::String & GetMetricAggregationType() const
ScalingPolicy & WithAlarms(AlarmsT &&value)
AWS_AUTOSCALING_API ScalingPolicy(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetPredictiveScalingConfiguration(PredictiveScalingConfigurationT &&value)
ScalingPolicy & AddStepAdjustments(StepAdjustmentsT &&value)
ScalingPolicy & WithTargetTrackingConfiguration(TargetTrackingConfigurationT &&value)
const Aws::String & GetAutoScalingGroupName() const
ScalingPolicy & WithPolicyName(PolicyNameT &&value)
void SetPolicyName(PolicyNameT &&value)
void SetMetricAggregationType(MetricAggregationTypeT &&value)
const Aws::String & GetAdjustmentType() const
ScalingPolicy & WithStepAdjustments(StepAdjustmentsT &&value)
void SetTargetTrackingConfiguration(TargetTrackingConfigurationT &&value)
const TargetTrackingConfiguration & GetTargetTrackingConfiguration() const
ScalingPolicy & WithAutoScalingGroupName(AutoScalingGroupNameT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream