AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
SpotOptions.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/ec2/model/SpotAllocationStrategy.h>
10#include <aws/ec2/model/FleetSpotMaintenanceStrategies.h>
11#include <aws/ec2/model/SpotInstanceInterruptionBehavior.h>
12#include <aws/core/utils/memory/stl/AWSString.h>
13#include <utility>
14
15namespace Aws
16{
17namespace Utils
18{
19namespace Xml
20{
21 class XmlNode;
22} // namespace Xml
23} // namespace Utils
24namespace EC2
25{
26namespace Model
27{
28
36 {
37 public:
38 AWS_EC2_API SpotOptions();
39 AWS_EC2_API SpotOptions(const Aws::Utils::Xml::XmlNode& xmlNode);
40 AWS_EC2_API SpotOptions& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
41
42 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
43 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
44
45
47
87 inline const SpotAllocationStrategy& GetAllocationStrategy() const{ return m_allocationStrategy; }
88 inline bool AllocationStrategyHasBeenSet() const { return m_allocationStrategyHasBeenSet; }
89 inline void SetAllocationStrategy(const SpotAllocationStrategy& value) { m_allocationStrategyHasBeenSet = true; m_allocationStrategy = value; }
90 inline void SetAllocationStrategy(SpotAllocationStrategy&& value) { m_allocationStrategyHasBeenSet = true; m_allocationStrategy = std::move(value); }
92 inline SpotOptions& WithAllocationStrategy(SpotAllocationStrategy&& value) { SetAllocationStrategy(std::move(value)); return *this;}
94
96
100 inline const FleetSpotMaintenanceStrategies& GetMaintenanceStrategies() const{ return m_maintenanceStrategies; }
101 inline bool MaintenanceStrategiesHasBeenSet() const { return m_maintenanceStrategiesHasBeenSet; }
102 inline void SetMaintenanceStrategies(const FleetSpotMaintenanceStrategies& value) { m_maintenanceStrategiesHasBeenSet = true; m_maintenanceStrategies = value; }
103 inline void SetMaintenanceStrategies(FleetSpotMaintenanceStrategies&& value) { m_maintenanceStrategiesHasBeenSet = true; m_maintenanceStrategies = std::move(value); }
107
109
113 inline const SpotInstanceInterruptionBehavior& GetInstanceInterruptionBehavior() const{ return m_instanceInterruptionBehavior; }
114 inline bool InstanceInterruptionBehaviorHasBeenSet() const { return m_instanceInterruptionBehaviorHasBeenSet; }
115 inline void SetInstanceInterruptionBehavior(const SpotInstanceInterruptionBehavior& value) { m_instanceInterruptionBehaviorHasBeenSet = true; m_instanceInterruptionBehavior = value; }
116 inline void SetInstanceInterruptionBehavior(SpotInstanceInterruptionBehavior&& value) { m_instanceInterruptionBehaviorHasBeenSet = true; m_instanceInterruptionBehavior = std::move(value); }
120
122
136 inline int GetInstancePoolsToUseCount() const{ return m_instancePoolsToUseCount; }
137 inline bool InstancePoolsToUseCountHasBeenSet() const { return m_instancePoolsToUseCountHasBeenSet; }
138 inline void SetInstancePoolsToUseCount(int value) { m_instancePoolsToUseCountHasBeenSet = true; m_instancePoolsToUseCount = value; }
139 inline SpotOptions& WithInstancePoolsToUseCount(int value) { SetInstancePoolsToUseCount(value); return *this;}
141
143
148 inline bool GetSingleInstanceType() const{ return m_singleInstanceType; }
149 inline bool SingleInstanceTypeHasBeenSet() const { return m_singleInstanceTypeHasBeenSet; }
150 inline void SetSingleInstanceType(bool value) { m_singleInstanceTypeHasBeenSet = true; m_singleInstanceType = value; }
151 inline SpotOptions& WithSingleInstanceType(bool value) { SetSingleInstanceType(value); return *this;}
153
155
160 inline bool GetSingleAvailabilityZone() const{ return m_singleAvailabilityZone; }
161 inline bool SingleAvailabilityZoneHasBeenSet() const { return m_singleAvailabilityZoneHasBeenSet; }
162 inline void SetSingleAvailabilityZone(bool value) { m_singleAvailabilityZoneHasBeenSet = true; m_singleAvailabilityZone = value; }
163 inline SpotOptions& WithSingleAvailabilityZone(bool value) { SetSingleAvailabilityZone(value); return *this;}
165
167
174 inline int GetMinTargetCapacity() const{ return m_minTargetCapacity; }
175 inline bool MinTargetCapacityHasBeenSet() const { return m_minTargetCapacityHasBeenSet; }
176 inline void SetMinTargetCapacity(int value) { m_minTargetCapacityHasBeenSet = true; m_minTargetCapacity = value; }
177 inline SpotOptions& WithMinTargetCapacity(int value) { SetMinTargetCapacity(value); return *this;}
179
181
196 inline const Aws::String& GetMaxTotalPrice() const{ return m_maxTotalPrice; }
197 inline bool MaxTotalPriceHasBeenSet() const { return m_maxTotalPriceHasBeenSet; }
198 inline void SetMaxTotalPrice(const Aws::String& value) { m_maxTotalPriceHasBeenSet = true; m_maxTotalPrice = value; }
199 inline void SetMaxTotalPrice(Aws::String&& value) { m_maxTotalPriceHasBeenSet = true; m_maxTotalPrice = std::move(value); }
200 inline void SetMaxTotalPrice(const char* value) { m_maxTotalPriceHasBeenSet = true; m_maxTotalPrice.assign(value); }
201 inline SpotOptions& WithMaxTotalPrice(const Aws::String& value) { SetMaxTotalPrice(value); return *this;}
202 inline SpotOptions& WithMaxTotalPrice(Aws::String&& value) { SetMaxTotalPrice(std::move(value)); return *this;}
203 inline SpotOptions& WithMaxTotalPrice(const char* value) { SetMaxTotalPrice(value); return *this;}
205 private:
206
207 SpotAllocationStrategy m_allocationStrategy;
208 bool m_allocationStrategyHasBeenSet = false;
209
210 FleetSpotMaintenanceStrategies m_maintenanceStrategies;
211 bool m_maintenanceStrategiesHasBeenSet = false;
212
213 SpotInstanceInterruptionBehavior m_instanceInterruptionBehavior;
214 bool m_instanceInterruptionBehaviorHasBeenSet = false;
215
216 int m_instancePoolsToUseCount;
217 bool m_instancePoolsToUseCountHasBeenSet = false;
218
219 bool m_singleInstanceType;
220 bool m_singleInstanceTypeHasBeenSet = false;
221
222 bool m_singleAvailabilityZone;
223 bool m_singleAvailabilityZoneHasBeenSet = false;
224
225 int m_minTargetCapacity;
226 bool m_minTargetCapacityHasBeenSet = false;
227
228 Aws::String m_maxTotalPrice;
229 bool m_maxTotalPriceHasBeenSet = false;
230 };
231
232} // namespace Model
233} // namespace EC2
234} // namespace Aws
SpotOptions & WithAllocationStrategy(SpotAllocationStrategy &&value)
Definition SpotOptions.h:92
bool MaintenanceStrategiesHasBeenSet() const
SpotOptions & WithInstanceInterruptionBehavior(SpotInstanceInterruptionBehavior &&value)
void SetSingleInstanceType(bool value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
SpotOptions & WithAllocationStrategy(const SpotAllocationStrategy &value)
Definition SpotOptions.h:91
SpotOptions & WithMaintenanceStrategies(const FleetSpotMaintenanceStrategies &value)
void SetAllocationStrategy(SpotAllocationStrategy &&value)
Definition SpotOptions.h:90
void SetMaxTotalPrice(Aws::String &&value)
AWS_EC2_API SpotOptions & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetMaintenanceStrategies(FleetSpotMaintenanceStrategies &&value)
SpotOptions & WithInstanceInterruptionBehavior(const SpotInstanceInterruptionBehavior &value)
bool MinTargetCapacityHasBeenSet() const
void SetInstanceInterruptionBehavior(const SpotInstanceInterruptionBehavior &value)
const FleetSpotMaintenanceStrategies & GetMaintenanceStrategies() const
bool SingleAvailabilityZoneHasBeenSet() const
bool AllocationStrategyHasBeenSet() const
Definition SpotOptions.h:88
bool InstanceInterruptionBehaviorHasBeenSet() const
const SpotInstanceInterruptionBehavior & GetInstanceInterruptionBehavior() const
bool GetSingleAvailabilityZone() const
AWS_EC2_API SpotOptions(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetMaxTotalPrice(const char *value)
void SetMinTargetCapacity(int value)
bool MaxTotalPriceHasBeenSet() const
SpotOptions & WithMaxTotalPrice(Aws::String &&value)
void SetMaxTotalPrice(const Aws::String &value)
SpotOptions & WithInstancePoolsToUseCount(int value)
void SetInstancePoolsToUseCount(int value)
void SetMaintenanceStrategies(const FleetSpotMaintenanceStrategies &value)
void SetSingleAvailabilityZone(bool value)
void SetInstanceInterruptionBehavior(SpotInstanceInterruptionBehavior &&value)
const SpotAllocationStrategy & GetAllocationStrategy() const
Definition SpotOptions.h:87
SpotOptions & WithSingleAvailabilityZone(bool value)
const Aws::String & GetMaxTotalPrice() const
SpotOptions & WithMaxTotalPrice(const Aws::String &value)
SpotOptions & WithSingleInstanceType(bool value)
int GetInstancePoolsToUseCount() const
bool InstancePoolsToUseCountHasBeenSet() const
SpotOptions & WithMaintenanceStrategies(FleetSpotMaintenanceStrategies &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
bool SingleInstanceTypeHasBeenSet() const
SpotOptions & WithMaxTotalPrice(const char *value)
void SetAllocationStrategy(const SpotAllocationStrategy &value)
Definition SpotOptions.h:89
SpotOptions & WithMinTargetCapacity(int value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::basic_ostream< char, std::char_traits< char > > OStream