AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
PutScalingPolicyRequest.h
1
6#pragma once
7#include <aws/autoscaling/AutoScaling_EXPORTS.h>
8#include <aws/autoscaling/AutoScalingRequest.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 <utility>
15
16namespace Aws
17{
18namespace AutoScaling
19{
20namespace Model
21{
22
26 {
27 public:
28 AWS_AUTOSCALING_API PutScalingPolicyRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "PutScalingPolicy"; }
35
36 AWS_AUTOSCALING_API Aws::String SerializePayload() const override;
37
38 protected:
39 AWS_AUTOSCALING_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
40
41 public:
42
44
47 inline const Aws::String& GetAutoScalingGroupName() const { return m_autoScalingGroupName; }
48 inline bool AutoScalingGroupNameHasBeenSet() const { return m_autoScalingGroupNameHasBeenSet; }
49 template<typename AutoScalingGroupNameT = Aws::String>
50 void SetAutoScalingGroupName(AutoScalingGroupNameT&& value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName = std::forward<AutoScalingGroupNameT>(value); }
51 template<typename AutoScalingGroupNameT = Aws::String>
52 PutScalingPolicyRequest& WithAutoScalingGroupName(AutoScalingGroupNameT&& value) { SetAutoScalingGroupName(std::forward<AutoScalingGroupNameT>(value)); return *this;}
54
56
59 inline const Aws::String& GetPolicyName() const { return m_policyName; }
60 inline bool PolicyNameHasBeenSet() const { return m_policyNameHasBeenSet; }
61 template<typename PolicyNameT = Aws::String>
62 void SetPolicyName(PolicyNameT&& value) { m_policyNameHasBeenSet = true; m_policyName = std::forward<PolicyNameT>(value); }
63 template<typename PolicyNameT = Aws::String>
64 PutScalingPolicyRequest& WithPolicyName(PolicyNameT&& value) { SetPolicyName(std::forward<PolicyNameT>(value)); return *this;}
66
68
74 inline const Aws::String& GetPolicyType() const { return m_policyType; }
75 inline bool PolicyTypeHasBeenSet() const { return m_policyTypeHasBeenSet; }
76 template<typename PolicyTypeT = Aws::String>
77 void SetPolicyType(PolicyTypeT&& value) { m_policyTypeHasBeenSet = true; m_policyType = std::forward<PolicyTypeT>(value); }
78 template<typename PolicyTypeT = Aws::String>
79 PutScalingPolicyRequest& WithPolicyType(PolicyTypeT&& value) { SetPolicyType(std::forward<PolicyTypeT>(value)); return *this;}
81
83
92 inline const Aws::String& GetAdjustmentType() const { return m_adjustmentType; }
93 inline bool AdjustmentTypeHasBeenSet() const { return m_adjustmentTypeHasBeenSet; }
94 template<typename AdjustmentTypeT = Aws::String>
95 void SetAdjustmentType(AdjustmentTypeT&& value) { m_adjustmentTypeHasBeenSet = true; m_adjustmentType = std::forward<AdjustmentTypeT>(value); }
96 template<typename AdjustmentTypeT = Aws::String>
97 PutScalingPolicyRequest& WithAdjustmentType(AdjustmentTypeT&& value) { SetAdjustmentType(std::forward<AdjustmentTypeT>(value)); return *this;}
99
101
105 inline int GetMinAdjustmentStep() const { return m_minAdjustmentStep; }
106 inline bool MinAdjustmentStepHasBeenSet() const { return m_minAdjustmentStepHasBeenSet; }
107 inline void SetMinAdjustmentStep(int value) { m_minAdjustmentStepHasBeenSet = true; m_minAdjustmentStep = value; }
108 inline PutScalingPolicyRequest& WithMinAdjustmentStep(int value) { SetMinAdjustmentStep(value); return *this;}
110
112
128 inline int GetMinAdjustmentMagnitude() const { return m_minAdjustmentMagnitude; }
129 inline bool MinAdjustmentMagnitudeHasBeenSet() const { return m_minAdjustmentMagnitudeHasBeenSet; }
130 inline void SetMinAdjustmentMagnitude(int value) { m_minAdjustmentMagnitudeHasBeenSet = true; m_minAdjustmentMagnitude = value; }
133
135
142 inline int GetScalingAdjustment() const { return m_scalingAdjustment; }
143 inline bool ScalingAdjustmentHasBeenSet() const { return m_scalingAdjustmentHasBeenSet; }
144 inline void SetScalingAdjustment(int value) { m_scalingAdjustmentHasBeenSet = true; m_scalingAdjustment = value; }
145 inline PutScalingPolicyRequest& WithScalingAdjustment(int value) { SetScalingAdjustment(value); return *this;}
147
149
158 inline int GetCooldown() const { return m_cooldown; }
159 inline bool CooldownHasBeenSet() const { return m_cooldownHasBeenSet; }
160 inline void SetCooldown(int value) { m_cooldownHasBeenSet = true; m_cooldown = value; }
161 inline PutScalingPolicyRequest& WithCooldown(int value) { SetCooldown(value); return *this;}
163
165
171 inline const Aws::String& GetMetricAggregationType() const { return m_metricAggregationType; }
172 inline bool MetricAggregationTypeHasBeenSet() const { return m_metricAggregationTypeHasBeenSet; }
173 template<typename MetricAggregationTypeT = Aws::String>
174 void SetMetricAggregationType(MetricAggregationTypeT&& value) { m_metricAggregationTypeHasBeenSet = true; m_metricAggregationType = std::forward<MetricAggregationTypeT>(value); }
175 template<typename MetricAggregationTypeT = Aws::String>
176 PutScalingPolicyRequest& WithMetricAggregationType(MetricAggregationTypeT&& value) { SetMetricAggregationType(std::forward<MetricAggregationTypeT>(value)); return *this;}
178
180
185 inline const Aws::Vector<StepAdjustment>& GetStepAdjustments() const { return m_stepAdjustments; }
186 inline bool StepAdjustmentsHasBeenSet() const { return m_stepAdjustmentsHasBeenSet; }
187 template<typename StepAdjustmentsT = Aws::Vector<StepAdjustment>>
188 void SetStepAdjustments(StepAdjustmentsT&& value) { m_stepAdjustmentsHasBeenSet = true; m_stepAdjustments = std::forward<StepAdjustmentsT>(value); }
189 template<typename StepAdjustmentsT = Aws::Vector<StepAdjustment>>
190 PutScalingPolicyRequest& WithStepAdjustments(StepAdjustmentsT&& value) { SetStepAdjustments(std::forward<StepAdjustmentsT>(value)); return *this;}
191 template<typename StepAdjustmentsT = StepAdjustment>
192 PutScalingPolicyRequest& AddStepAdjustments(StepAdjustmentsT&& value) { m_stepAdjustmentsHasBeenSet = true; m_stepAdjustments.emplace_back(std::forward<StepAdjustmentsT>(value)); return *this; }
194
196
208 inline int GetEstimatedInstanceWarmup() const { return m_estimatedInstanceWarmup; }
209 inline bool EstimatedInstanceWarmupHasBeenSet() const { return m_estimatedInstanceWarmupHasBeenSet; }
210 inline void SetEstimatedInstanceWarmup(int value) { m_estimatedInstanceWarmupHasBeenSet = true; m_estimatedInstanceWarmup = value; }
213
215
229 inline const TargetTrackingConfiguration& GetTargetTrackingConfiguration() const { return m_targetTrackingConfiguration; }
230 inline bool TargetTrackingConfigurationHasBeenSet() const { return m_targetTrackingConfigurationHasBeenSet; }
231 template<typename TargetTrackingConfigurationT = TargetTrackingConfiguration>
232 void SetTargetTrackingConfiguration(TargetTrackingConfigurationT&& value) { m_targetTrackingConfigurationHasBeenSet = true; m_targetTrackingConfiguration = std::forward<TargetTrackingConfigurationT>(value); }
233 template<typename TargetTrackingConfigurationT = TargetTrackingConfiguration>
234 PutScalingPolicyRequest& WithTargetTrackingConfiguration(TargetTrackingConfigurationT&& value) { SetTargetTrackingConfiguration(std::forward<TargetTrackingConfigurationT>(value)); return *this;}
236
238
245 inline bool GetEnabled() const { return m_enabled; }
246 inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; }
247 inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; }
248 inline PutScalingPolicyRequest& WithEnabled(bool value) { SetEnabled(value); return *this;}
250
252
260 inline const PredictiveScalingConfiguration& GetPredictiveScalingConfiguration() const { return m_predictiveScalingConfiguration; }
261 inline bool PredictiveScalingConfigurationHasBeenSet() const { return m_predictiveScalingConfigurationHasBeenSet; }
262 template<typename PredictiveScalingConfigurationT = PredictiveScalingConfiguration>
263 void SetPredictiveScalingConfiguration(PredictiveScalingConfigurationT&& value) { m_predictiveScalingConfigurationHasBeenSet = true; m_predictiveScalingConfiguration = std::forward<PredictiveScalingConfigurationT>(value); }
264 template<typename PredictiveScalingConfigurationT = PredictiveScalingConfiguration>
265 PutScalingPolicyRequest& WithPredictiveScalingConfiguration(PredictiveScalingConfigurationT&& value) { SetPredictiveScalingConfiguration(std::forward<PredictiveScalingConfigurationT>(value)); return *this;}
267 private:
268
269 Aws::String m_autoScalingGroupName;
270 bool m_autoScalingGroupNameHasBeenSet = false;
271
272 Aws::String m_policyName;
273 bool m_policyNameHasBeenSet = false;
274
275 Aws::String m_policyType;
276 bool m_policyTypeHasBeenSet = false;
277
278 Aws::String m_adjustmentType;
279 bool m_adjustmentTypeHasBeenSet = false;
280
281 int m_minAdjustmentStep{0};
282 bool m_minAdjustmentStepHasBeenSet = false;
283
284 int m_minAdjustmentMagnitude{0};
285 bool m_minAdjustmentMagnitudeHasBeenSet = false;
286
287 int m_scalingAdjustment{0};
288 bool m_scalingAdjustmentHasBeenSet = false;
289
290 int m_cooldown{0};
291 bool m_cooldownHasBeenSet = false;
292
293 Aws::String m_metricAggregationType;
294 bool m_metricAggregationTypeHasBeenSet = false;
295
296 Aws::Vector<StepAdjustment> m_stepAdjustments;
297 bool m_stepAdjustmentsHasBeenSet = false;
298
299 int m_estimatedInstanceWarmup{0};
300 bool m_estimatedInstanceWarmupHasBeenSet = false;
301
302 TargetTrackingConfiguration m_targetTrackingConfiguration;
303 bool m_targetTrackingConfigurationHasBeenSet = false;
304
305 bool m_enabled{false};
306 bool m_enabledHasBeenSet = false;
307
308 PredictiveScalingConfiguration m_predictiveScalingConfiguration;
309 bool m_predictiveScalingConfigurationHasBeenSet = false;
310 };
311
312} // namespace Model
313} // namespace AutoScaling
314} // 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