AWS SDK for C++  0.14.3
AWS SDK for C++
ScalingPolicy.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
22 
23 namespace Aws
24 {
25 namespace Utils
26 {
27 namespace Xml
28 {
29  class XmlNode;
30 } // namespace Xml
31 } // namespace Utils
32 namespace AutoScaling
33 {
34 namespace Model
35 {
36 
41  {
42  public:
43  ScalingPolicy();
45  ScalingPolicy& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
46 
47  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
48  void OutputToStream(Aws::OStream& oStream, const char* location) const;
49 
53  inline const Aws::String& GetAutoScalingGroupName() const{ return m_autoScalingGroupName; }
54 
58  inline void SetAutoScalingGroupName(const Aws::String& value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName = value; }
59 
63  inline void SetAutoScalingGroupName(Aws::String&& value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName = value; }
64 
68  inline void SetAutoScalingGroupName(const char* value) { m_autoScalingGroupNameHasBeenSet = true; m_autoScalingGroupName.assign(value); }
69 
73  inline ScalingPolicy& WithAutoScalingGroupName(const Aws::String& value) { SetAutoScalingGroupName(value); return *this;}
74 
78  inline ScalingPolicy& WithAutoScalingGroupName(Aws::String&& value) { SetAutoScalingGroupName(value); return *this;}
79 
83  inline ScalingPolicy& WithAutoScalingGroupName(const char* value) { SetAutoScalingGroupName(value); return *this;}
84 
88  inline const Aws::String& GetPolicyName() const{ return m_policyName; }
89 
93  inline void SetPolicyName(const Aws::String& value) { m_policyNameHasBeenSet = true; m_policyName = value; }
94 
98  inline void SetPolicyName(Aws::String&& value) { m_policyNameHasBeenSet = true; m_policyName = value; }
99 
103  inline void SetPolicyName(const char* value) { m_policyNameHasBeenSet = true; m_policyName.assign(value); }
104 
108  inline ScalingPolicy& WithPolicyName(const Aws::String& value) { SetPolicyName(value); return *this;}
109 
113  inline ScalingPolicy& WithPolicyName(Aws::String&& value) { SetPolicyName(value); return *this;}
114 
118  inline ScalingPolicy& WithPolicyName(const char* value) { SetPolicyName(value); return *this;}
119 
123  inline const Aws::String& GetPolicyARN() const{ return m_policyARN; }
124 
128  inline void SetPolicyARN(const Aws::String& value) { m_policyARNHasBeenSet = true; m_policyARN = value; }
129 
133  inline void SetPolicyARN(Aws::String&& value) { m_policyARNHasBeenSet = true; m_policyARN = value; }
134 
138  inline void SetPolicyARN(const char* value) { m_policyARNHasBeenSet = true; m_policyARN.assign(value); }
139 
143  inline ScalingPolicy& WithPolicyARN(const Aws::String& value) { SetPolicyARN(value); return *this;}
144 
148  inline ScalingPolicy& WithPolicyARN(Aws::String&& value) { SetPolicyARN(value); return *this;}
149 
153  inline ScalingPolicy& WithPolicyARN(const char* value) { SetPolicyARN(value); return *this;}
154 
159  inline const Aws::String& GetPolicyType() const{ return m_policyType; }
160 
165  inline void SetPolicyType(const Aws::String& value) { m_policyTypeHasBeenSet = true; m_policyType = value; }
166 
171  inline void SetPolicyType(Aws::String&& value) { m_policyTypeHasBeenSet = true; m_policyType = value; }
172 
177  inline void SetPolicyType(const char* value) { m_policyTypeHasBeenSet = true; m_policyType.assign(value); }
178 
183  inline ScalingPolicy& WithPolicyType(const Aws::String& value) { SetPolicyType(value); return *this;}
184 
189  inline ScalingPolicy& WithPolicyType(Aws::String&& value) { SetPolicyType(value); return *this;}
190 
195  inline ScalingPolicy& WithPolicyType(const char* value) { SetPolicyType(value); return *this;}
196 
202  inline const Aws::String& GetAdjustmentType() const{ return m_adjustmentType; }
203 
209  inline void SetAdjustmentType(const Aws::String& value) { m_adjustmentTypeHasBeenSet = true; m_adjustmentType = value; }
210 
216  inline void SetAdjustmentType(Aws::String&& value) { m_adjustmentTypeHasBeenSet = true; m_adjustmentType = value; }
217 
223  inline void SetAdjustmentType(const char* value) { m_adjustmentTypeHasBeenSet = true; m_adjustmentType.assign(value); }
224 
230  inline ScalingPolicy& WithAdjustmentType(const Aws::String& value) { SetAdjustmentType(value); return *this;}
231 
237  inline ScalingPolicy& WithAdjustmentType(Aws::String&& value) { SetAdjustmentType(value); return *this;}
238 
244  inline ScalingPolicy& WithAdjustmentType(const char* value) { SetAdjustmentType(value); return *this;}
245 
250  inline int GetMinAdjustmentStep() const{ return m_minAdjustmentStep; }
251 
256  inline void SetMinAdjustmentStep(int value) { m_minAdjustmentStepHasBeenSet = true; m_minAdjustmentStep = value; }
257 
262  inline ScalingPolicy& WithMinAdjustmentStep(int value) { SetMinAdjustmentStep(value); return *this;}
263 
271  inline int GetMinAdjustmentMagnitude() const{ return m_minAdjustmentMagnitude; }
272 
280  inline void SetMinAdjustmentMagnitude(int value) { m_minAdjustmentMagnitudeHasBeenSet = true; m_minAdjustmentMagnitude = value; }
281 
289  inline ScalingPolicy& WithMinAdjustmentMagnitude(int value) { SetMinAdjustmentMagnitude(value); return *this;}
290 
296  inline int GetScalingAdjustment() const{ return m_scalingAdjustment; }
297 
303  inline void SetScalingAdjustment(int value) { m_scalingAdjustmentHasBeenSet = true; m_scalingAdjustment = value; }
304 
310  inline ScalingPolicy& WithScalingAdjustment(int value) { SetScalingAdjustment(value); return *this;}
311 
316  inline int GetCooldown() const{ return m_cooldown; }
317 
322  inline void SetCooldown(int value) { m_cooldownHasBeenSet = true; m_cooldown = value; }
323 
328  inline ScalingPolicy& WithCooldown(int value) { SetCooldown(value); return *this;}
329 
334  inline const Aws::Vector<StepAdjustment>& GetStepAdjustments() const{ return m_stepAdjustments; }
335 
340  inline void SetStepAdjustments(const Aws::Vector<StepAdjustment>& value) { m_stepAdjustmentsHasBeenSet = true; m_stepAdjustments = value; }
341 
346  inline void SetStepAdjustments(Aws::Vector<StepAdjustment>&& value) { m_stepAdjustmentsHasBeenSet = true; m_stepAdjustments = value; }
347 
352  inline ScalingPolicy& WithStepAdjustments(const Aws::Vector<StepAdjustment>& value) { SetStepAdjustments(value); return *this;}
353 
358  inline ScalingPolicy& WithStepAdjustments(Aws::Vector<StepAdjustment>&& value) { SetStepAdjustments(value); return *this;}
359 
364  inline ScalingPolicy& AddStepAdjustments(const StepAdjustment& value) { m_stepAdjustmentsHasBeenSet = true; m_stepAdjustments.push_back(value); return *this; }
365 
370  inline ScalingPolicy& AddStepAdjustments(StepAdjustment&& value) { m_stepAdjustmentsHasBeenSet = true; m_stepAdjustments.push_back(value); return *this; }
371 
376  inline const Aws::String& GetMetricAggregationType() const{ return m_metricAggregationType; }
377 
382  inline void SetMetricAggregationType(const Aws::String& value) { m_metricAggregationTypeHasBeenSet = true; m_metricAggregationType = value; }
383 
388  inline void SetMetricAggregationType(Aws::String&& value) { m_metricAggregationTypeHasBeenSet = true; m_metricAggregationType = value; }
389 
394  inline void SetMetricAggregationType(const char* value) { m_metricAggregationTypeHasBeenSet = true; m_metricAggregationType.assign(value); }
395 
400  inline ScalingPolicy& WithMetricAggregationType(const Aws::String& value) { SetMetricAggregationType(value); return *this;}
401 
406  inline ScalingPolicy& WithMetricAggregationType(Aws::String&& value) { SetMetricAggregationType(value); return *this;}
407 
412  inline ScalingPolicy& WithMetricAggregationType(const char* value) { SetMetricAggregationType(value); return *this;}
413 
418  inline int GetEstimatedInstanceWarmup() const{ return m_estimatedInstanceWarmup; }
419 
424  inline void SetEstimatedInstanceWarmup(int value) { m_estimatedInstanceWarmupHasBeenSet = true; m_estimatedInstanceWarmup = value; }
425 
430  inline ScalingPolicy& WithEstimatedInstanceWarmup(int value) { SetEstimatedInstanceWarmup(value); return *this;}
431 
435  inline const Aws::Vector<Alarm>& GetAlarms() const{ return m_alarms; }
436 
440  inline void SetAlarms(const Aws::Vector<Alarm>& value) { m_alarmsHasBeenSet = true; m_alarms = value; }
441 
445  inline void SetAlarms(Aws::Vector<Alarm>&& value) { m_alarmsHasBeenSet = true; m_alarms = value; }
446 
450  inline ScalingPolicy& WithAlarms(const Aws::Vector<Alarm>& value) { SetAlarms(value); return *this;}
451 
455  inline ScalingPolicy& WithAlarms(Aws::Vector<Alarm>&& value) { SetAlarms(value); return *this;}
456 
460  inline ScalingPolicy& AddAlarms(const Alarm& value) { m_alarmsHasBeenSet = true; m_alarms.push_back(value); return *this; }
461 
465  inline ScalingPolicy& AddAlarms(Alarm&& value) { m_alarmsHasBeenSet = true; m_alarms.push_back(value); return *this; }
466 
467  private:
468  Aws::String m_autoScalingGroupName;
469  bool m_autoScalingGroupNameHasBeenSet;
470  Aws::String m_policyName;
471  bool m_policyNameHasBeenSet;
472  Aws::String m_policyARN;
473  bool m_policyARNHasBeenSet;
474  Aws::String m_policyType;
475  bool m_policyTypeHasBeenSet;
476  Aws::String m_adjustmentType;
477  bool m_adjustmentTypeHasBeenSet;
478  int m_minAdjustmentStep;
479  bool m_minAdjustmentStepHasBeenSet;
480  int m_minAdjustmentMagnitude;
481  bool m_minAdjustmentMagnitudeHasBeenSet;
482  int m_scalingAdjustment;
483  bool m_scalingAdjustmentHasBeenSet;
484  int m_cooldown;
485  bool m_cooldownHasBeenSet;
486  Aws::Vector<StepAdjustment> m_stepAdjustments;
487  bool m_stepAdjustmentsHasBeenSet;
488  Aws::String m_metricAggregationType;
489  bool m_metricAggregationTypeHasBeenSet;
490  int m_estimatedInstanceWarmup;
491  bool m_estimatedInstanceWarmupHasBeenSet;
492  Aws::Vector<Alarm> m_alarms;
493  bool m_alarmsHasBeenSet;
494  };
495 
496 } // namespace Model
497 } // namespace AutoScaling
498 } // namespace Aws
void SetPolicyARN(const char *value)
ScalingPolicy & WithScalingAdjustment(int value)
ScalingPolicy & WithPolicyName(const char *value)
ScalingPolicy & WithAdjustmentType(Aws::String &&value)
void SetAdjustmentType(Aws::String &&value)
ScalingPolicy & WithPolicyType(const char *value)
void SetPolicyType(const char *value)
ScalingPolicy & WithMinAdjustmentStep(int value)
ScalingPolicy & WithCooldown(int value)
const Aws::String & GetAutoScalingGroupName() const
Definition: ScalingPolicy.h:53
ScalingPolicy & WithAlarms(const Aws::Vector< Alarm > &value)
ScalingPolicy & WithAutoScalingGroupName(const Aws::String &value)
Definition: ScalingPolicy.h:73
const Aws::String & GetPolicyARN() const
ScalingPolicy & WithPolicyARN(const char *value)
void SetMetricAggregationType(Aws::String &&value)
ScalingPolicy & WithMetricAggregationType(Aws::String &&value)
void SetMetricAggregationType(const Aws::String &value)
ScalingPolicy & WithMetricAggregationType(const Aws::String &value)
void SetStepAdjustments(const Aws::Vector< StepAdjustment > &value)
const Aws::String & GetAdjustmentType() const
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
ScalingPolicy & WithMetricAggregationType(const char *value)
ScalingPolicy & WithStepAdjustments(Aws::Vector< StepAdjustment > &&value)
void SetStepAdjustments(Aws::Vector< StepAdjustment > &&value)
ScalingPolicy & WithAdjustmentType(const Aws::String &value)
void SetAdjustmentType(const char *value)
void SetAutoScalingGroupName(const Aws::String &value)
Definition: ScalingPolicy.h:58
ScalingPolicy & WithStepAdjustments(const Aws::Vector< StepAdjustment > &value)
const Aws::Vector< Alarm > & GetAlarms() const
ScalingPolicy & WithAdjustmentType(const char *value)
ScalingPolicy & AddStepAdjustments(const StepAdjustment &value)
ScalingPolicy & WithAutoScalingGroupName(Aws::String &&value)
Definition: ScalingPolicy.h:78
void SetMetricAggregationType(const char *value)
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:31
void SetPolicyName(Aws::String &&value)
Definition: ScalingPolicy.h:98
void SetPolicyType(const Aws::String &value)
void SetAlarms(const Aws::Vector< Alarm > &value)
ScalingPolicy & WithAlarms(Aws::Vector< Alarm > &&value)
ScalingPolicy & WithPolicyType(Aws::String &&value)
ScalingPolicy & WithAutoScalingGroupName(const char *value)
Definition: ScalingPolicy.h:83
const Aws::String & GetMetricAggregationType() const
void SetPolicyName(const char *value)
ScalingPolicy & WithEstimatedInstanceWarmup(int value)
const Aws::String & GetPolicyType() const
const Aws::String & GetPolicyName() const
Definition: ScalingPolicy.h:88
ScalingPolicy & WithPolicyName(const Aws::String &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetPolicyARN(Aws::String &&value)
void SetPolicyName(const Aws::String &value)
Definition: ScalingPolicy.h:93
void SetAlarms(Aws::Vector< Alarm > &&value)
ScalingPolicy & WithPolicyType(const Aws::String &value)
ScalingPolicy & AddStepAdjustments(StepAdjustment &&value)
ScalingPolicy & AddAlarms(Alarm &&value)
void SetAdjustmentType(const Aws::String &value)
void SetAutoScalingGroupName(Aws::String &&value)
Definition: ScalingPolicy.h:63
void SetPolicyARN(const Aws::String &value)
ScalingPolicy & WithMinAdjustmentMagnitude(int value)
ScalingPolicy & WithPolicyARN(const Aws::String &value)
ScalingPolicy & WithPolicyARN(Aws::String &&value)
#define AWS_AUTOSCALING_API
void SetAutoScalingGroupName(const char *value)
Definition: ScalingPolicy.h:68
ScalingPolicy & AddAlarms(const Alarm &value)
ScalingPolicy & WithPolicyName(Aws::String &&value)
const Aws::Vector< StepAdjustment > & GetStepAdjustments() const
void SetPolicyType(Aws::String &&value)
JSON (JavaScript Object Notation).