AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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();
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 inline void SetAutoScalingGroupName(const Aws::String& value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName = value; }
54 inline void SetAutoScalingGroupName(Aws::String&& value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName = std::move(value); }
55 inline void SetAutoScalingGroupName(const char* value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName.assign(value); }
56 inline ScalingPolicy& WithAutoScalingGroupName(const Aws::String& value) { SetAutoScalingGroupName(value); return *this;}
57 inline ScalingPolicy& WithAutoScalingGroupName(Aws::String&& value) { SetAutoScalingGroupName(std::move(value)); return *this;}
58 inline ScalingPolicy& WithAutoScalingGroupName(const char* value) { SetAutoScalingGroupName(value); return *this;}
60
62
65 inline const Aws::String& GetPolicyName() const{ return m_policyName; }
66 inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; }
67 inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; }
68 inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = std::move(value); }
69 inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); }
70 inline ScalingPolicy& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;}
71 inline ScalingPolicy& WithPolicyName(Aws::String&& value) { SetPolicyName(std::move(value)); return *this;}
72 inline ScalingPolicy& WithPolicyName(const char* value) { SetPolicyName(value); return *this;}
74
76
79 inline const Aws::String& GetPolicyARN() const{ return m_policyARN; }
80 inline bool PolicyARNHasBeenSet() const { return m_policyARNHasBeenSet; }
81 inline void SetPolicyARN(const Aws::String& value) { m_policyARNHasBeenSet = true; m_policyARN = value; }
82 inline void SetPolicyARN(Aws::String&& value) { m_policyARNHasBeenSet = true; m_policyARN = std::move(value); }
83 inline void SetPolicyARN(const char* value) { m_policyARNHasBeenSet = true; m_policyARN.assign(value); }
84 inline ScalingPolicy& WithPolicyARN(const Aws::String& value) { SetPolicyARN(value); return *this;}
85 inline ScalingPolicy& WithPolicyARN(Aws::String&& value) { SetPolicyARN(std::move(value)); return *this;}
86 inline ScalingPolicy& WithPolicyARN(const char* value) { SetPolicyARN(value); return *this;}
88
90
101 inline const Aws::String& GetPolicyType() const{ return m_policyType; }
102 inline bool PolicyTypeHasBeenSet() const { return m_policyTypeHasBeenSet; }
103 inline void SetPolicyType(const Aws::String& value) { m_policyTypeHasBeenSet = true; m_policyType = value; }
104 inline void SetPolicyType(Aws::String&& value) { m_policyTypeHasBeenSet = true; m_policyType = std::move(value); }
105 inline void SetPolicyType(const char* value) { m_policyTypeHasBeenSet = true; m_policyType.assign(value); }
106 inline ScalingPolicy& WithPolicyType(const Aws::String& value) { SetPolicyType(value); return *this;}
107 inline ScalingPolicy& WithPolicyType(Aws::String&& value) { SetPolicyType(std::move(value)); return *this;}
108 inline ScalingPolicy& WithPolicyType(const char* value) { SetPolicyType(value); return *this;}
110
112
117 inline const Aws::String& GetAdjustmentType() const{ return m_adjustmentType; }
118 inline bool AdjustmentTypeHasBeenSet() const { return m_adjustmentTypeHasBeenSet; }
119 inline void SetAdjustmentType(const Aws::String& value) { m_adjustmentTypeHasBeenSet = true; m_adjustmentType = value; }
120 inline void SetAdjustmentType(Aws::String&& value) { m_adjustmentTypeHasBeenSet = true; m_adjustmentType = std::move(value); }
121 inline void SetAdjustmentType(const char* value) { m_adjustmentTypeHasBeenSet = true; m_adjustmentType.assign(value); }
122 inline ScalingPolicy& WithAdjustmentType(const Aws::String& value) { SetAdjustmentType(value); return *this;}
123 inline ScalingPolicy& WithAdjustmentType(Aws::String&& value) { SetAdjustmentType(std::move(value)); return *this;}
124 inline ScalingPolicy& WithAdjustmentType(const char* value) { SetAdjustmentType(value); return *this;}
126
128
132 inline int GetMinAdjustmentStep() const{ return m_minAdjustmentStep; }
133 inline bool MinAdjustmentStepHasBeenSet() const { return m_minAdjustmentStepHasBeenSet; }
134 inline void SetMinAdjustmentStep(int value) { m_minAdjustmentStepHasBeenSet = true; m_minAdjustmentStep = value; }
135 inline ScalingPolicy& WithMinAdjustmentStep(int value) { SetMinAdjustmentStep(value); return *this;}
137
139
143 inline int GetMinAdjustmentMagnitude() const{ return m_minAdjustmentMagnitude; }
144 inline bool MinAdjustmentMagnitudeHasBeenSet() const { return m_minAdjustmentMagnitudeHasBeenSet; }
145 inline void SetMinAdjustmentMagnitude(int value) { m_minAdjustmentMagnitudeHasBeenSet = true; m_minAdjustmentMagnitude = value; }
146 inline ScalingPolicy& WithMinAdjustmentMagnitude(int value) { SetMinAdjustmentMagnitude(value); return *this;}
148
150
155 inline int GetScalingAdjustment() const{ return m_scalingAdjustment; }
156 inline bool ScalingAdjustmentHasBeenSet() const { return m_scalingAdjustmentHasBeenSet; }
157 inline void SetScalingAdjustment(int value) { m_scalingAdjustmentHasBeenSet = true; m_scalingAdjustment = value; }
158 inline ScalingPolicy& WithScalingAdjustment(int value) { SetScalingAdjustment(value); return *this;}
160
162
165 inline int GetCooldown() const{ return m_cooldown; }
166 inline bool CooldownHasBeenSet() const { return m_cooldownHasBeenSet; }
167 inline void SetCooldown(int value) { m_cooldownHasBeenSet = true; m_cooldown = value; }
168 inline ScalingPolicy& WithCooldown(int value) { SetCooldown(value); return *this;}
170
172
176 inline const Aws::Vector<StepAdjustment>& GetStepAdjustments() const{ return m_stepAdjustments; }
177 inline bool StepAdjustmentsHasBeenSet() const { return m_stepAdjustmentsHasBeenSet; }
178 inline void SetStepAdjustments(const Aws::Vector<StepAdjustment>& value) { m_stepAdjustmentsHasBeenSet = true; m_stepAdjustments = value; }
179 inline void SetStepAdjustments(Aws::Vector<StepAdjustment>&& value) { m_stepAdjustmentsHasBeenSet = true; m_stepAdjustments = std::move(value); }
181 inline ScalingPolicy& WithStepAdjustments(Aws::Vector<StepAdjustment>&& value) { SetStepAdjustments(std::move(value)); return *this;}
182 inline ScalingPolicy& AddStepAdjustments(const StepAdjustment& value) { m_stepAdjustmentsHasBeenSet = true; m_stepAdjustments.push_back(value); return *this; }
183 inline ScalingPolicy& AddStepAdjustments(StepAdjustment&& value) { m_stepAdjustmentsHasBeenSet = true; m_stepAdjustments.push_back(std::move(value)); return *this; }
185
187
191 inline const Aws::String& GetMetricAggregationType() const{ return m_metricAggregationType; }
192 inline bool MetricAggregationTypeHasBeenSet() const { return m_metricAggregationTypeHasBeenSet; }
193 inline void SetMetricAggregationType(const Aws::String& value) { m_metricAggregationTypeHasBeenSet = true; m_metricAggregationType = value; }
194 inline void SetMetricAggregationType(Aws::String&& value) { m_metricAggregationTypeHasBeenSet = true; m_metricAggregationType = std::move(value); }
195 inline void SetMetricAggregationType(const char* value) { m_metricAggregationTypeHasBeenSet = true; m_metricAggregationType.assign(value); }
197 inline ScalingPolicy& WithMetricAggregationType(Aws::String&& value) { SetMetricAggregationType(std::move(value)); return *this;}
198 inline ScalingPolicy& WithMetricAggregationType(const char* value) { SetMetricAggregationType(value); return *this;}
200
202
206 inline int GetEstimatedInstanceWarmup() const{ return m_estimatedInstanceWarmup; }
207 inline bool EstimatedInstanceWarmupHasBeenSet() const { return m_estimatedInstanceWarmupHasBeenSet; }
208 inline void SetEstimatedInstanceWarmup(int value) { m_estimatedInstanceWarmupHasBeenSet = true; m_estimatedInstanceWarmup = value; }
209 inline ScalingPolicy& WithEstimatedInstanceWarmup(int value) { SetEstimatedInstanceWarmup(value); return *this;}
211
213
216 inline const Aws::Vector<Alarm>& GetAlarms() const{ return m_alarms; }
217 inline bool AlarmsHasBeenSet() const { return m_alarmsHasBeenSet; }
218 inline void SetAlarms(const Aws::Vector<Alarm>& value) { m_alarmsHasBeenSet = true; m_alarms = value; }
219 inline void SetAlarms(Aws::Vector<Alarm>&& value) { m_alarmsHasBeenSet = true; m_alarms = std::move(value); }
220 inline ScalingPolicy& WithAlarms(const Aws::Vector<Alarm>& value) { SetAlarms(value); return *this;}
221 inline ScalingPolicy& WithAlarms(Aws::Vector<Alarm>&& value) { SetAlarms(std::move(value)); return *this;}
222 inline ScalingPolicy& AddAlarms(const Alarm& value) { m_alarmsHasBeenSet = true; m_alarms.push_back(value); return *this; }
223 inline ScalingPolicy& AddAlarms(Alarm&& value) { m_alarmsHasBeenSet = true; m_alarms.push_back(std::move(value)); return *this; }
225
227
230 inline const TargetTrackingConfiguration& GetTargetTrackingConfiguration() const{ return m_targetTrackingConfiguration; }
231 inline bool TargetTrackingConfigurationHasBeenSet() const { return m_targetTrackingConfigurationHasBeenSet; }
232 inline void SetTargetTrackingConfiguration(const TargetTrackingConfiguration& value) { m_targetTrackingConfigurationHasBeenSet = true; m_targetTrackingConfiguration = value; }
233 inline void SetTargetTrackingConfiguration(TargetTrackingConfiguration&& value) { m_targetTrackingConfigurationHasBeenSet = true; m_targetTrackingConfiguration = std::move(value); }
237
239
243 inline bool GetEnabled() const{ return m_enabled; }
244 inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; }
245 inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; }
246 inline ScalingPolicy& WithEnabled(bool value) { SetEnabled(value); return *this;}
248
250
253 inline const PredictiveScalingConfiguration& GetPredictiveScalingConfiguration() const{ return m_predictiveScalingConfiguration; }
254 inline bool PredictiveScalingConfigurationHasBeenSet() const { return m_predictiveScalingConfigurationHasBeenSet; }
255 inline void SetPredictiveScalingConfiguration(const PredictiveScalingConfiguration& value) { m_predictiveScalingConfigurationHasBeenSet = true; m_predictiveScalingConfiguration = value; }
256 inline void SetPredictiveScalingConfiguration(PredictiveScalingConfiguration&& value) { m_predictiveScalingConfigurationHasBeenSet = true; m_predictiveScalingConfiguration = std::move(value); }
260 private:
261
262 Aws::String m_autoScalingGroupName;
263 bool m_autoScalingGroupNameHasBeenSet = false;
264
265 Aws::String m_policyName;
266 bool m_policyNameHasBeenSet = false;
267
268 Aws::String m_policyARN;
269 bool m_policyARNHasBeenSet = false;
270
271 Aws::String m_policyType;
272 bool m_policyTypeHasBeenSet = false;
273
274 Aws::String m_adjustmentType;
275 bool m_adjustmentTypeHasBeenSet = false;
276
277 int m_minAdjustmentStep;
278 bool m_minAdjustmentStepHasBeenSet = false;
279
280 int m_minAdjustmentMagnitude;
281 bool m_minAdjustmentMagnitudeHasBeenSet = false;
282
283 int m_scalingAdjustment;
284 bool m_scalingAdjustmentHasBeenSet = false;
285
286 int m_cooldown;
287 bool m_cooldownHasBeenSet = false;
288
289 Aws::Vector<StepAdjustment> m_stepAdjustments;
290 bool m_stepAdjustmentsHasBeenSet = false;
291
292 Aws::String m_metricAggregationType;
293 bool m_metricAggregationTypeHasBeenSet = false;
294
295 int m_estimatedInstanceWarmup;
296 bool m_estimatedInstanceWarmupHasBeenSet = false;
297
298 Aws::Vector<Alarm> m_alarms;
299 bool m_alarmsHasBeenSet = false;
300
301 TargetTrackingConfiguration m_targetTrackingConfiguration;
302 bool m_targetTrackingConfigurationHasBeenSet = false;
303
304 bool m_enabled;
305 bool m_enabledHasBeenSet = false;
306
307 PredictiveScalingConfiguration m_predictiveScalingConfiguration;
308 bool m_predictiveScalingConfigurationHasBeenSet = false;
309 };
310
311} // namespace Model
312} // namespace AutoScaling
313} // namespace Aws
const Aws::Vector< Alarm > & GetAlarms() const
ScalingPolicy & WithAdjustmentType(Aws::String &&value)
void SetTargetTrackingConfiguration(TargetTrackingConfiguration &&value)
ScalingPolicy & WithPolicyName(const char *value)
ScalingPolicy & WithPolicyType(const char *value)
void SetPolicyARN(Aws::String &&value)
ScalingPolicy & WithPolicyARN(const char *value)
void SetTargetTrackingConfiguration(const TargetTrackingConfiguration &value)
ScalingPolicy & WithAdjustmentType(const char *value)
ScalingPolicy & WithEnabled(bool value)
ScalingPolicy & WithMetricAggregationType(const Aws::String &value)
void SetPolicyARN(const Aws::String &value)
ScalingPolicy & WithAutoScalingGroupName(Aws::String &&value)
const PredictiveScalingConfiguration & GetPredictiveScalingConfiguration() const
const Aws::String & GetPolicyName() const
ScalingPolicy & WithStepAdjustments(Aws::Vector< StepAdjustment > &&value)
ScalingPolicy & AddAlarms(const Alarm &value)
ScalingPolicy & WithMetricAggregationType(const char *value)
void SetAutoScalingGroupName(const Aws::String &value)
void SetPolicyType(Aws::String &&value)
ScalingPolicy & WithScalingAdjustment(int value)
void SetMetricAggregationType(const char *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
void SetAdjustmentType(Aws::String &&value)
AWS_AUTOSCALING_API ScalingPolicy & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
ScalingPolicy & WithPolicyType(Aws::String &&value)
ScalingPolicy & WithMinAdjustmentStep(int value)
ScalingPolicy & WithAlarms(const Aws::Vector< Alarm > &value)
ScalingPolicy & WithAdjustmentType(const Aws::String &value)
void SetMetricAggregationType(const Aws::String &value)
const Aws::String & GetPolicyARN() const
ScalingPolicy & WithPredictiveScalingConfiguration(const PredictiveScalingConfiguration &value)
void SetStepAdjustments(Aws::Vector< StepAdjustment > &&value)
const Aws::Vector< StepAdjustment > & GetStepAdjustments() const
ScalingPolicy & WithTargetTrackingConfiguration(const TargetTrackingConfiguration &value)
ScalingPolicy & WithAlarms(Aws::Vector< Alarm > &&value)
ScalingPolicy & AddStepAdjustments(const StepAdjustment &value)
void SetAutoScalingGroupName(const char *value)
void SetPolicyName(const char *value)
ScalingPolicy & WithPolicyARN(const Aws::String &value)
void SetPolicyName(Aws::String &&value)
ScalingPolicy & WithAutoScalingGroupName(const Aws::String &value)
void SetPolicyName(const Aws::String &value)
ScalingPolicy & WithMinAdjustmentMagnitude(int value)
const Aws::String & GetPolicyType() const
ScalingPolicy & WithTargetTrackingConfiguration(TargetTrackingConfiguration &&value)
ScalingPolicy & WithCooldown(int value)
void SetAlarms(Aws::Vector< Alarm > &&value)
ScalingPolicy & WithPolicyName(Aws::String &&value)
const Aws::String & GetMetricAggregationType() const
ScalingPolicy & WithAutoScalingGroupName(const char *value)
void SetPolicyType(const Aws::String &value)
void SetStepAdjustments(const Aws::Vector< StepAdjustment > &value)
AWS_AUTOSCALING_API ScalingPolicy(const Aws::Utils::Xml::XmlNode &xmlNode)
ScalingPolicy & WithMetricAggregationType(Aws::String &&value)
void SetAdjustmentType(const Aws::String &value)
void SetPredictiveScalingConfiguration(const PredictiveScalingConfiguration &value)
void SetPolicyARN(const char *value)
void SetPredictiveScalingConfiguration(PredictiveScalingConfiguration &&value)
ScalingPolicy & WithPolicyARN(Aws::String &&value)
void SetMetricAggregationType(Aws::String &&value)
const Aws::String & GetAutoScalingGroupName() const
ScalingPolicy & WithPredictiveScalingConfiguration(PredictiveScalingConfiguration &&value)
ScalingPolicy & AddStepAdjustments(StepAdjustment &&value)
void SetAlarms(const Aws::Vector< Alarm > &value)
void SetAutoScalingGroupName(Aws::String &&value)
ScalingPolicy & AddAlarms(Alarm &&value)
const Aws::String & GetAdjustmentType() const
ScalingPolicy & WithPolicyType(const Aws::String &value)
ScalingPolicy & WithStepAdjustments(const Aws::Vector< StepAdjustment > &value)
void SetPolicyType(const char *value)
ScalingPolicy & WithPolicyName(const Aws::String &value)
const TargetTrackingConfiguration & GetTargetTrackingConfiguration() const
void SetAdjustmentType(const char *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