AWS SDK for C++

AWS SDK for C++ Version 1.11.762

Loading...
Searching...
No Matches
ScalingInstruction.h
1
6#pragma once
7#include <aws/autoscaling-plans/AutoScalingPlans_EXPORTS.h>
8#include <aws/autoscaling-plans/model/CustomizedLoadMetricSpecification.h>
9#include <aws/autoscaling-plans/model/PredefinedLoadMetricSpecification.h>
10#include <aws/autoscaling-plans/model/PredictiveScalingMaxCapacityBehavior.h>
11#include <aws/autoscaling-plans/model/PredictiveScalingMode.h>
12#include <aws/autoscaling-plans/model/ScalableDimension.h>
13#include <aws/autoscaling-plans/model/ScalingPolicyUpdateBehavior.h>
14#include <aws/autoscaling-plans/model/ServiceNamespace.h>
15#include <aws/autoscaling-plans/model/TargetTrackingConfiguration.h>
16#include <aws/core/utils/memory/stl/AWSString.h>
17#include <aws/core/utils/memory/stl/AWSVector.h>
18
19#include <utility>
20
21namespace Aws {
22namespace Utils {
23namespace Json {
24class JsonValue;
25class JsonView;
26} // namespace Json
27} // namespace Utils
28namespace AutoScalingPlans {
29namespace Model {
30
55 public:
56 AWS_AUTOSCALINGPLANS_API ScalingInstruction() = default;
57 AWS_AUTOSCALINGPLANS_API ScalingInstruction(Aws::Utils::Json::JsonView jsonValue);
58 AWS_AUTOSCALINGPLANS_API ScalingInstruction& operator=(Aws::Utils::Json::JsonView jsonValue);
59 AWS_AUTOSCALINGPLANS_API Aws::Utils::Json::JsonValue Jsonize() const;
60
62
65 inline ServiceNamespace GetServiceNamespace() const { return m_serviceNamespace; }
66 inline bool ServiceNamespaceHasBeenSet() const { return m_serviceNamespaceHasBeenSet; }
68 m_serviceNamespaceHasBeenSet = true;
69 m_serviceNamespace = value;
70 }
73 return *this;
74 }
76
78
97 inline const Aws::String& GetResourceId() const { return m_resourceId; }
98 inline bool ResourceIdHasBeenSet() const { return m_resourceIdHasBeenSet; }
99 template <typename ResourceIdT = Aws::String>
100 void SetResourceId(ResourceIdT&& value) {
101 m_resourceIdHasBeenSet = true;
102 m_resourceId = std::forward<ResourceIdT>(value);
103 }
104 template <typename ResourceIdT = Aws::String>
105 ScalingInstruction& WithResourceId(ResourceIdT&& value) {
106 SetResourceId(std::forward<ResourceIdT>(value));
107 return *this;
108 }
110
112
131 inline ScalableDimension GetScalableDimension() const { return m_scalableDimension; }
132 inline bool ScalableDimensionHasBeenSet() const { return m_scalableDimensionHasBeenSet; }
134 m_scalableDimensionHasBeenSet = true;
135 m_scalableDimension = value;
136 }
139 return *this;
140 }
142
144
147 inline int GetMinCapacity() const { return m_minCapacity; }
148 inline bool MinCapacityHasBeenSet() const { return m_minCapacityHasBeenSet; }
149 inline void SetMinCapacity(int value) {
150 m_minCapacityHasBeenSet = true;
151 m_minCapacity = value;
152 }
154 SetMinCapacity(value);
155 return *this;
156 }
158
160
165 inline int GetMaxCapacity() const { return m_maxCapacity; }
166 inline bool MaxCapacityHasBeenSet() const { return m_maxCapacityHasBeenSet; }
167 inline void SetMaxCapacity(int value) {
168 m_maxCapacityHasBeenSet = true;
169 m_maxCapacity = value;
170 }
172 SetMaxCapacity(value);
173 return *this;
174 }
176
178
182 inline const Aws::Vector<TargetTrackingConfiguration>& GetTargetTrackingConfigurations() const { return m_targetTrackingConfigurations; }
183 inline bool TargetTrackingConfigurationsHasBeenSet() const { return m_targetTrackingConfigurationsHasBeenSet; }
184 template <typename TargetTrackingConfigurationsT = Aws::Vector<TargetTrackingConfiguration>>
185 void SetTargetTrackingConfigurations(TargetTrackingConfigurationsT&& value) {
186 m_targetTrackingConfigurationsHasBeenSet = true;
187 m_targetTrackingConfigurations = std::forward<TargetTrackingConfigurationsT>(value);
188 }
189 template <typename TargetTrackingConfigurationsT = Aws::Vector<TargetTrackingConfiguration>>
190 ScalingInstruction& WithTargetTrackingConfigurations(TargetTrackingConfigurationsT&& value) {
191 SetTargetTrackingConfigurations(std::forward<TargetTrackingConfigurationsT>(value));
192 return *this;
193 }
194 template <typename TargetTrackingConfigurationsT = TargetTrackingConfiguration>
195 ScalingInstruction& AddTargetTrackingConfigurations(TargetTrackingConfigurationsT&& value) {
196 m_targetTrackingConfigurationsHasBeenSet = true;
197 m_targetTrackingConfigurations.emplace_back(std::forward<TargetTrackingConfigurationsT>(value));
198 return *this;
199 }
201
203
209 return m_predefinedLoadMetricSpecification;
210 }
211 inline bool PredefinedLoadMetricSpecificationHasBeenSet() const { return m_predefinedLoadMetricSpecificationHasBeenSet; }
212 template <typename PredefinedLoadMetricSpecificationT = PredefinedLoadMetricSpecification>
213 void SetPredefinedLoadMetricSpecification(PredefinedLoadMetricSpecificationT&& value) {
214 m_predefinedLoadMetricSpecificationHasBeenSet = true;
215 m_predefinedLoadMetricSpecification = std::forward<PredefinedLoadMetricSpecificationT>(value);
216 }
217 template <typename PredefinedLoadMetricSpecificationT = PredefinedLoadMetricSpecification>
218 ScalingInstruction& WithPredefinedLoadMetricSpecification(PredefinedLoadMetricSpecificationT&& value) {
219 SetPredefinedLoadMetricSpecification(std::forward<PredefinedLoadMetricSpecificationT>(value));
220 return *this;
221 }
223
225
231 return m_customizedLoadMetricSpecification;
232 }
233 inline bool CustomizedLoadMetricSpecificationHasBeenSet() const { return m_customizedLoadMetricSpecificationHasBeenSet; }
234 template <typename CustomizedLoadMetricSpecificationT = CustomizedLoadMetricSpecification>
235 void SetCustomizedLoadMetricSpecification(CustomizedLoadMetricSpecificationT&& value) {
236 m_customizedLoadMetricSpecificationHasBeenSet = true;
237 m_customizedLoadMetricSpecification = std::forward<CustomizedLoadMetricSpecificationT>(value);
238 }
239 template <typename CustomizedLoadMetricSpecificationT = CustomizedLoadMetricSpecification>
240 ScalingInstruction& WithCustomizedLoadMetricSpecification(CustomizedLoadMetricSpecificationT&& value) {
241 SetCustomizedLoadMetricSpecification(std::forward<CustomizedLoadMetricSpecificationT>(value));
242 return *this;
243 }
245
247
259 inline int GetScheduledActionBufferTime() const { return m_scheduledActionBufferTime; }
260 inline bool ScheduledActionBufferTimeHasBeenSet() const { return m_scheduledActionBufferTimeHasBeenSet; }
261 inline void SetScheduledActionBufferTime(int value) {
262 m_scheduledActionBufferTimeHasBeenSet = true;
263 m_scheduledActionBufferTime = value;
264 }
267 return *this;
268 }
270
272
290 return m_predictiveScalingMaxCapacityBehavior;
291 }
292 inline bool PredictiveScalingMaxCapacityBehaviorHasBeenSet() const { return m_predictiveScalingMaxCapacityBehaviorHasBeenSet; }
294 m_predictiveScalingMaxCapacityBehaviorHasBeenSet = true;
295 m_predictiveScalingMaxCapacityBehavior = value;
296 }
299 return *this;
300 }
302
304
315 inline int GetPredictiveScalingMaxCapacityBuffer() const { return m_predictiveScalingMaxCapacityBuffer; }
316 inline bool PredictiveScalingMaxCapacityBufferHasBeenSet() const { return m_predictiveScalingMaxCapacityBufferHasBeenSet; }
318 m_predictiveScalingMaxCapacityBufferHasBeenSet = true;
319 m_predictiveScalingMaxCapacityBuffer = value;
320 }
323 return *this;
324 }
326
328
334 inline PredictiveScalingMode GetPredictiveScalingMode() const { return m_predictiveScalingMode; }
335 inline bool PredictiveScalingModeHasBeenSet() const { return m_predictiveScalingModeHasBeenSet; }
337 m_predictiveScalingModeHasBeenSet = true;
338 m_predictiveScalingMode = value;
339 }
342 return *this;
343 }
345
347
357 inline ScalingPolicyUpdateBehavior GetScalingPolicyUpdateBehavior() const { return m_scalingPolicyUpdateBehavior; }
358 inline bool ScalingPolicyUpdateBehaviorHasBeenSet() const { return m_scalingPolicyUpdateBehaviorHasBeenSet; }
360 m_scalingPolicyUpdateBehaviorHasBeenSet = true;
361 m_scalingPolicyUpdateBehavior = value;
362 }
365 return *this;
366 }
368
370
376 inline bool GetDisableDynamicScaling() const { return m_disableDynamicScaling; }
377 inline bool DisableDynamicScalingHasBeenSet() const { return m_disableDynamicScalingHasBeenSet; }
378 inline void SetDisableDynamicScaling(bool value) {
379 m_disableDynamicScalingHasBeenSet = true;
380 m_disableDynamicScaling = value;
381 }
384 return *this;
385 }
387 private:
389
390 Aws::String m_resourceId;
391
393
394 int m_minCapacity{0};
395
396 int m_maxCapacity{0};
397
398 Aws::Vector<TargetTrackingConfiguration> m_targetTrackingConfigurations;
399
400 PredefinedLoadMetricSpecification m_predefinedLoadMetricSpecification;
401
402 CustomizedLoadMetricSpecification m_customizedLoadMetricSpecification;
403
404 int m_scheduledActionBufferTime{0};
405
407
408 int m_predictiveScalingMaxCapacityBuffer{0};
409
411
413
414 bool m_disableDynamicScaling{false};
415 bool m_serviceNamespaceHasBeenSet = false;
416 bool m_resourceIdHasBeenSet = false;
417 bool m_scalableDimensionHasBeenSet = false;
418 bool m_minCapacityHasBeenSet = false;
419 bool m_maxCapacityHasBeenSet = false;
420 bool m_targetTrackingConfigurationsHasBeenSet = false;
421 bool m_predefinedLoadMetricSpecificationHasBeenSet = false;
422 bool m_customizedLoadMetricSpecificationHasBeenSet = false;
423 bool m_scheduledActionBufferTimeHasBeenSet = false;
424 bool m_predictiveScalingMaxCapacityBehaviorHasBeenSet = false;
425 bool m_predictiveScalingMaxCapacityBufferHasBeenSet = false;
426 bool m_predictiveScalingModeHasBeenSet = false;
427 bool m_scalingPolicyUpdateBehaviorHasBeenSet = false;
428 bool m_disableDynamicScalingHasBeenSet = false;
429};
430
431} // namespace Model
432} // namespace AutoScalingPlans
433} // namespace Aws
ScalingInstruction & WithPredictiveScalingMaxCapacityBehavior(PredictiveScalingMaxCapacityBehavior value)
AWS_AUTOSCALINGPLANS_API Aws::Utils::Json::JsonValue Jsonize() const
void SetTargetTrackingConfigurations(TargetTrackingConfigurationsT &&value)
ScalingInstruction & WithDisableDynamicScaling(bool value)
ScalingPolicyUpdateBehavior GetScalingPolicyUpdateBehavior() const
ScalingInstruction & WithPredictiveScalingMode(PredictiveScalingMode value)
const CustomizedLoadMetricSpecification & GetCustomizedLoadMetricSpecification() const
const PredefinedLoadMetricSpecification & GetPredefinedLoadMetricSpecification() const
ScalingInstruction & WithServiceNamespace(ServiceNamespace value)
ScalingInstruction & WithScheduledActionBufferTime(int value)
void SetPredefinedLoadMetricSpecification(PredefinedLoadMetricSpecificationT &&value)
void SetPredictiveScalingMode(PredictiveScalingMode value)
void SetPredictiveScalingMaxCapacityBehavior(PredictiveScalingMaxCapacityBehavior value)
ScalingInstruction & WithPredefinedLoadMetricSpecification(PredefinedLoadMetricSpecificationT &&value)
ScalingInstruction & AddTargetTrackingConfigurations(TargetTrackingConfigurationsT &&value)
void SetScalingPolicyUpdateBehavior(ScalingPolicyUpdateBehavior value)
ScalingInstruction & WithTargetTrackingConfigurations(TargetTrackingConfigurationsT &&value)
const Aws::Vector< TargetTrackingConfiguration > & GetTargetTrackingConfigurations() const
AWS_AUTOSCALINGPLANS_API ScalingInstruction()=default
AWS_AUTOSCALINGPLANS_API ScalingInstruction(Aws::Utils::Json::JsonView jsonValue)
PredictiveScalingMaxCapacityBehavior GetPredictiveScalingMaxCapacityBehavior() const
AWS_AUTOSCALINGPLANS_API ScalingInstruction & operator=(Aws::Utils::Json::JsonView jsonValue)
ScalingInstruction & WithPredictiveScalingMaxCapacityBuffer(int value)
ScalingInstruction & WithScalableDimension(ScalableDimension value)
ScalingInstruction & WithScalingPolicyUpdateBehavior(ScalingPolicyUpdateBehavior value)
ScalingInstruction & WithResourceId(ResourceIdT &&value)
ScalingInstruction & WithCustomizedLoadMetricSpecification(CustomizedLoadMetricSpecificationT &&value)
void SetCustomizedLoadMetricSpecification(CustomizedLoadMetricSpecificationT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue