AWS SDK for C++

AWS SDK for C++ Version 1.11.785

Loading...
Searching...
No Matches
PutScalingPolicyRequest.h
1
6#pragma once
7#include <aws/autoscaling/AutoScalingRequest.h>
8#include <aws/autoscaling/AutoScaling_EXPORTS.h>
9#include <aws/autoscaling/model/PredictiveScalingConfiguration.h>
10#include <aws/autoscaling/model/StepAdjustment.h>
11#include <aws/autoscaling/model/TargetTrackingConfiguration.h>
12#include <aws/core/utils/memory/stl/AWSString.h>
13#include <aws/core/utils/memory/stl/AWSVector.h>
14
15#include <utility>
16
17namespace Aws {
18namespace AutoScaling {
19namespace Model {
20
24 public:
25 AWS_AUTOSCALING_API PutScalingPolicyRequest() = default;
26
27 // Service request name is the Operation name which will send this request out,
28 // each operation should has unique request name, so that we can get operation's name from this request.
29 // Note: this is not true for response, multiple operations may have the same response name,
30 // so we can not get operation's name from response.
31 inline virtual const char* GetServiceRequestName() const override { return "PutScalingPolicy"; }
32
33 AWS_AUTOSCALING_API Aws::String SerializePayload() const override;
34
35 protected:
36 AWS_AUTOSCALING_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
37
38 public:
40
43 inline const Aws::String& GetAutoScalingGroupName() const { return m_autoScalingGroupName; }
44 inline bool AutoScalingGroupNameHasBeenSet() const { return m_autoScalingGroupNameHasBeenSet; }
45 template <typename AutoScalingGroupNameT = Aws::String>
46 void SetAutoScalingGroupName(AutoScalingGroupNameT&& value) {
47 m_autoScalingGroupNameHasBeenSet = true;
48 m_autoScalingGroupName = std::forward<AutoScalingGroupNameT>(value);
49 }
50 template <typename AutoScalingGroupNameT = Aws::String>
51 PutScalingPolicyRequest& WithAutoScalingGroupName(AutoScalingGroupNameT&& value) {
52 SetAutoScalingGroupName(std::forward<AutoScalingGroupNameT>(value));
53 return *this;
54 }
56
58
61 inline const Aws::String& GetPolicyName() const { return m_policyName; }
62 inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; }
63 template <typename PolicyNameT = Aws::String>
64 void SetPolicyName(PolicyNameT&& value) {
65 m_policyNameHasBeenSet = true;
66 m_policyName = std::forward<PolicyNameT>(value);
67 }
68 template <typename PolicyNameT = Aws::String>
70 SetPolicyName(std::forward<PolicyNameT>(value));
71 return *this;
72 }
74
76
82 inline const Aws::String& GetPolicyType() const { return m_policyType; }
83 inline bool PolicyTypeHasBeenSet() const { return m_policyTypeHasBeenSet; }
84 template <typename PolicyTypeT = Aws::String>
85 void SetPolicyType(PolicyTypeT&& value) {
86 m_policyTypeHasBeenSet = true;
87 m_policyType = std::forward<PolicyTypeT>(value);
88 }
89 template <typename PolicyTypeT = Aws::String>
91 SetPolicyType(std::forward<PolicyTypeT>(value));
92 return *this;
93 }
95
97
106 inline const Aws::String& GetAdjustmentType() const { return m_adjustmentType; }
107 inline bool AdjustmentTypeHasBeenSet() const { return m_adjustmentTypeHasBeenSet; }
108 template <typename AdjustmentTypeT = Aws::String>
109 void SetAdjustmentType(AdjustmentTypeT&& value) {
110 m_adjustmentTypeHasBeenSet = true;
111 m_adjustmentType = std::forward<AdjustmentTypeT>(value);
112 }
113 template <typename AdjustmentTypeT = Aws::String>
114 PutScalingPolicyRequest& WithAdjustmentType(AdjustmentTypeT&& value) {
115 SetAdjustmentType(std::forward<AdjustmentTypeT>(value));
116 return *this;
117 }
119
121
125 inline int GetMinAdjustmentStep() const { return m_minAdjustmentStep; }
126 inline bool MinAdjustmentStepHasBeenSet() const { return m_minAdjustmentStepHasBeenSet; }
127 inline void SetMinAdjustmentStep(int value) {
128 m_minAdjustmentStepHasBeenSet = true;
129 m_minAdjustmentStep = value;
130 }
133 return *this;
134 }
136
138
154 inline int GetMinAdjustmentMagnitude() const { return m_minAdjustmentMagnitude; }
155 inline bool MinAdjustmentMagnitudeHasBeenSet() const { return m_minAdjustmentMagnitudeHasBeenSet; }
156 inline void SetMinAdjustmentMagnitude(int value) {
157 m_minAdjustmentMagnitudeHasBeenSet = true;
158 m_minAdjustmentMagnitude = value;
159 }
162 return *this;
163 }
165
167
174 inline int GetScalingAdjustment() const { return m_scalingAdjustment; }
175 inline bool ScalingAdjustmentHasBeenSet() const { return m_scalingAdjustmentHasBeenSet; }
176 inline void SetScalingAdjustment(int value) {
177 m_scalingAdjustmentHasBeenSet = true;
178 m_scalingAdjustment = value;
179 }
182 return *this;
183 }
185
187
196 inline int GetCooldown() const { return m_cooldown; }
197 inline bool CooldownHasBeenSet() const { return m_cooldownHasBeenSet; }
198 inline void SetCooldown(int value) {
199 m_cooldownHasBeenSet = true;
200 m_cooldown = value;
201 }
203 SetCooldown(value);
204 return *this;
205 }
207
209
215 inline const Aws::String& GetMetricAggregationType() const { return m_metricAggregationType; }
216 inline bool MetricAggregationTypeHasBeenSet() const { return m_metricAggregationTypeHasBeenSet; }
217 template <typename MetricAggregationTypeT = Aws::String>
218 void SetMetricAggregationType(MetricAggregationTypeT&& value) {
219 m_metricAggregationTypeHasBeenSet = true;
220 m_metricAggregationType = std::forward<MetricAggregationTypeT>(value);
221 }
222 template <typename MetricAggregationTypeT = Aws::String>
223 PutScalingPolicyRequest& WithMetricAggregationType(MetricAggregationTypeT&& value) {
224 SetMetricAggregationType(std::forward<MetricAggregationTypeT>(value));
225 return *this;
226 }
228
230
235 inline const Aws::Vector<StepAdjustment>& GetStepAdjustments() const { return m_stepAdjustments; }
236 inline bool StepAdjustmentsHasBeenSet() const { return m_stepAdjustmentsHasBeenSet; }
237 template <typename StepAdjustmentsT = Aws::Vector<StepAdjustment>>
238 void SetStepAdjustments(StepAdjustmentsT&& value) {
239 m_stepAdjustmentsHasBeenSet = true;
240 m_stepAdjustments = std::forward<StepAdjustmentsT>(value);
241 }
242 template <typename StepAdjustmentsT = Aws::Vector<StepAdjustment>>
243 PutScalingPolicyRequest& WithStepAdjustments(StepAdjustmentsT&& value) {
244 SetStepAdjustments(std::forward<StepAdjustmentsT>(value));
245 return *this;
246 }
247 template <typename StepAdjustmentsT = StepAdjustment>
248 PutScalingPolicyRequest& AddStepAdjustments(StepAdjustmentsT&& value) {
249 m_stepAdjustmentsHasBeenSet = true;
250 m_stepAdjustments.emplace_back(std::forward<StepAdjustmentsT>(value));
251 return *this;
252 }
254
256
268 inline int GetEstimatedInstanceWarmup() const { return m_estimatedInstanceWarmup; }
269 inline bool EstimatedInstanceWarmupHasBeenSet() const { return m_estimatedInstanceWarmupHasBeenSet; }
270 inline void SetEstimatedInstanceWarmup(int value) {
271 m_estimatedInstanceWarmupHasBeenSet = true;
272 m_estimatedInstanceWarmup = value;
273 }
276 return *this;
277 }
279
281
295 inline const TargetTrackingConfiguration& GetTargetTrackingConfiguration() const { return m_targetTrackingConfiguration; }
296 inline bool TargetTrackingConfigurationHasBeenSet() const { return m_targetTrackingConfigurationHasBeenSet; }
297 template <typename TargetTrackingConfigurationT = TargetTrackingConfiguration>
298 void SetTargetTrackingConfiguration(TargetTrackingConfigurationT&& value) {
299 m_targetTrackingConfigurationHasBeenSet = true;
300 m_targetTrackingConfiguration = std::forward<TargetTrackingConfigurationT>(value);
301 }
302 template <typename TargetTrackingConfigurationT = TargetTrackingConfiguration>
303 PutScalingPolicyRequest& WithTargetTrackingConfiguration(TargetTrackingConfigurationT&& value) {
304 SetTargetTrackingConfiguration(std::forward<TargetTrackingConfigurationT>(value));
305 return *this;
306 }
308
310
317 inline bool GetEnabled() const { return m_enabled; }
318 inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; }
319 inline void SetEnabled(bool value) {
320 m_enabledHasBeenSet = true;
321 m_enabled = value;
322 }
324 SetEnabled(value);
325 return *this;
326 }
328
330
338 inline const PredictiveScalingConfiguration& GetPredictiveScalingConfiguration() const { return m_predictiveScalingConfiguration; }
339 inline bool PredictiveScalingConfigurationHasBeenSet() const { return m_predictiveScalingConfigurationHasBeenSet; }
340 template <typename PredictiveScalingConfigurationT = PredictiveScalingConfiguration>
341 void SetPredictiveScalingConfiguration(PredictiveScalingConfigurationT&& value) {
342 m_predictiveScalingConfigurationHasBeenSet = true;
343 m_predictiveScalingConfiguration = std::forward<PredictiveScalingConfigurationT>(value);
344 }
345 template <typename PredictiveScalingConfigurationT = PredictiveScalingConfiguration>
346 PutScalingPolicyRequest& WithPredictiveScalingConfiguration(PredictiveScalingConfigurationT&& value) {
347 SetPredictiveScalingConfiguration(std::forward<PredictiveScalingConfigurationT>(value));
348 return *this;
349 }
351 private:
352 Aws::String m_autoScalingGroupName;
353
354 Aws::String m_policyName;
355
356 Aws::String m_policyType;
357
358 Aws::String m_adjustmentType;
359
360 int m_minAdjustmentStep{0};
361
362 int m_minAdjustmentMagnitude{0};
363
364 int m_scalingAdjustment{0};
365
366 int m_cooldown{0};
367
368 Aws::String m_metricAggregationType;
369
370 Aws::Vector<StepAdjustment> m_stepAdjustments;
371
372 int m_estimatedInstanceWarmup{0};
373
374 TargetTrackingConfiguration m_targetTrackingConfiguration;
375
376 bool m_enabled{false};
377
378 PredictiveScalingConfiguration m_predictiveScalingConfiguration;
379 bool m_autoScalingGroupNameHasBeenSet = false;
380 bool m_policyNameHasBeenSet = false;
381 bool m_policyTypeHasBeenSet = false;
382 bool m_adjustmentTypeHasBeenSet = false;
383 bool m_minAdjustmentStepHasBeenSet = false;
384 bool m_minAdjustmentMagnitudeHasBeenSet = false;
385 bool m_scalingAdjustmentHasBeenSet = false;
386 bool m_cooldownHasBeenSet = false;
387 bool m_metricAggregationTypeHasBeenSet = false;
388 bool m_stepAdjustmentsHasBeenSet = false;
389 bool m_estimatedInstanceWarmupHasBeenSet = false;
390 bool m_targetTrackingConfigurationHasBeenSet = false;
391 bool m_enabledHasBeenSet = false;
392 bool m_predictiveScalingConfigurationHasBeenSet = false;
393};
394
395} // namespace Model
396} // namespace AutoScaling
397} // namespace Aws
const Aws::Vector< StepAdjustment > & GetStepAdjustments() const
void SetAutoScalingGroupName(AutoScalingGroupNameT &&value)
virtual const char * GetServiceRequestName() const override
void SetMetricAggregationType(MetricAggregationTypeT &&value)
PutScalingPolicyRequest & WithPredictiveScalingConfiguration(PredictiveScalingConfigurationT &&value)
PutScalingPolicyRequest & WithStepAdjustments(StepAdjustmentsT &&value)
PutScalingPolicyRequest & WithMinAdjustmentMagnitude(int value)
PutScalingPolicyRequest & WithMinAdjustmentStep(int value)
PutScalingPolicyRequest & WithPolicyType(PolicyTypeT &&value)
void SetPredictiveScalingConfiguration(PredictiveScalingConfigurationT &&value)
PutScalingPolicyRequest & WithPolicyName(PolicyNameT &&value)
PutScalingPolicyRequest & AddStepAdjustments(StepAdjustmentsT &&value)
AWS_AUTOSCALING_API PutScalingPolicyRequest()=default
PutScalingPolicyRequest & WithScalingAdjustment(int value)
const PredictiveScalingConfiguration & GetPredictiveScalingConfiguration() const
AWS_AUTOSCALING_API Aws::String SerializePayload() const override
PutScalingPolicyRequest & WithEstimatedInstanceWarmup(int value)
PutScalingPolicyRequest & WithEnabled(bool value)
const TargetTrackingConfiguration & GetTargetTrackingConfiguration() const
PutScalingPolicyRequest & WithMetricAggregationType(MetricAggregationTypeT &&value)
void SetTargetTrackingConfiguration(TargetTrackingConfigurationT &&value)
PutScalingPolicyRequest & WithTargetTrackingConfiguration(TargetTrackingConfigurationT &&value)
PutScalingPolicyRequest & WithAdjustmentType(AdjustmentTypeT &&value)
PutScalingPolicyRequest & WithAutoScalingGroupName(AutoScalingGroupNameT &&value)
AWS_AUTOSCALING_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector