AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
SpotOptionsRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/ec2/EC2_EXPORTS.h>
10#include <aws/ec2/model/FleetSpotMaintenanceStrategiesRequest.h>
11#include <aws/ec2/model/SpotAllocationStrategy.h>
12#include <aws/ec2/model/SpotInstanceInterruptionBehavior.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Xml {
19class XmlNode;
20} // namespace Xml
21} // namespace Utils
22namespace EC2 {
23namespace Model {
24
32 public:
33 AWS_EC2_API SpotOptionsRequest() = default;
34 AWS_EC2_API SpotOptionsRequest(const Aws::Utils::Xml::XmlNode& xmlNode);
36
37 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
38 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
39
41
81 inline SpotAllocationStrategy GetAllocationStrategy() const { return m_allocationStrategy; }
82 inline bool AllocationStrategyHasBeenSet() const { return m_allocationStrategyHasBeenSet; }
84 m_allocationStrategyHasBeenSet = true;
85 m_allocationStrategy = value;
86 }
89 return *this;
90 }
92
94
98 inline const FleetSpotMaintenanceStrategiesRequest& GetMaintenanceStrategies() const { return m_maintenanceStrategies; }
99 inline bool MaintenanceStrategiesHasBeenSet() const { return m_maintenanceStrategiesHasBeenSet; }
100 template <typename MaintenanceStrategiesT = FleetSpotMaintenanceStrategiesRequest>
101 void SetMaintenanceStrategies(MaintenanceStrategiesT&& value) {
102 m_maintenanceStrategiesHasBeenSet = true;
103 m_maintenanceStrategies = std::forward<MaintenanceStrategiesT>(value);
104 }
105 template <typename MaintenanceStrategiesT = FleetSpotMaintenanceStrategiesRequest>
106 SpotOptionsRequest& WithMaintenanceStrategies(MaintenanceStrategiesT&& value) {
107 SetMaintenanceStrategies(std::forward<MaintenanceStrategiesT>(value));
108 return *this;
109 }
111
113
117 inline SpotInstanceInterruptionBehavior GetInstanceInterruptionBehavior() const { return m_instanceInterruptionBehavior; }
118 inline bool InstanceInterruptionBehaviorHasBeenSet() const { return m_instanceInterruptionBehaviorHasBeenSet; }
120 m_instanceInterruptionBehaviorHasBeenSet = true;
121 m_instanceInterruptionBehavior = value;
122 }
125 return *this;
126 }
128
130
144 inline int GetInstancePoolsToUseCount() const { return m_instancePoolsToUseCount; }
145 inline bool InstancePoolsToUseCountHasBeenSet() const { return m_instancePoolsToUseCountHasBeenSet; }
146 inline void SetInstancePoolsToUseCount(int value) {
147 m_instancePoolsToUseCountHasBeenSet = true;
148 m_instancePoolsToUseCount = value;
149 }
152 return *this;
153 }
155
157
162 inline bool GetSingleInstanceType() const { return m_singleInstanceType; }
163 inline bool SingleInstanceTypeHasBeenSet() const { return m_singleInstanceTypeHasBeenSet; }
164 inline void SetSingleInstanceType(bool value) {
165 m_singleInstanceTypeHasBeenSet = true;
166 m_singleInstanceType = value;
167 }
170 return *this;
171 }
173
175
180 inline bool GetSingleAvailabilityZone() const { return m_singleAvailabilityZone; }
181 inline bool SingleAvailabilityZoneHasBeenSet() const { return m_singleAvailabilityZoneHasBeenSet; }
182 inline void SetSingleAvailabilityZone(bool value) {
183 m_singleAvailabilityZoneHasBeenSet = true;
184 m_singleAvailabilityZone = value;
185 }
188 return *this;
189 }
191
193
200 inline int GetMinTargetCapacity() const { return m_minTargetCapacity; }
201 inline bool MinTargetCapacityHasBeenSet() const { return m_minTargetCapacityHasBeenSet; }
202 inline void SetMinTargetCapacity(int value) {
203 m_minTargetCapacityHasBeenSet = true;
204 m_minTargetCapacity = value;
205 }
208 return *this;
209 }
211
213
228 inline const Aws::String& GetMaxTotalPrice() const { return m_maxTotalPrice; }
229 inline bool MaxTotalPriceHasBeenSet() const { return m_maxTotalPriceHasBeenSet; }
230 template <typename MaxTotalPriceT = Aws::String>
231 void SetMaxTotalPrice(MaxTotalPriceT&& value) {
232 m_maxTotalPriceHasBeenSet = true;
233 m_maxTotalPrice = std::forward<MaxTotalPriceT>(value);
234 }
235 template <typename MaxTotalPriceT = Aws::String>
236 SpotOptionsRequest& WithMaxTotalPrice(MaxTotalPriceT&& value) {
237 SetMaxTotalPrice(std::forward<MaxTotalPriceT>(value));
238 return *this;
239 }
241 private:
243
244 FleetSpotMaintenanceStrategiesRequest m_maintenanceStrategies;
245
247
248 int m_instancePoolsToUseCount{0};
249
250 bool m_singleInstanceType{false};
251
252 bool m_singleAvailabilityZone{false};
253
254 int m_minTargetCapacity{0};
255
256 Aws::String m_maxTotalPrice;
257 bool m_allocationStrategyHasBeenSet = false;
258 bool m_maintenanceStrategiesHasBeenSet = false;
259 bool m_instanceInterruptionBehaviorHasBeenSet = false;
260 bool m_instancePoolsToUseCountHasBeenSet = false;
261 bool m_singleInstanceTypeHasBeenSet = false;
262 bool m_singleAvailabilityZoneHasBeenSet = false;
263 bool m_minTargetCapacityHasBeenSet = false;
264 bool m_maxTotalPriceHasBeenSet = false;
265};
266
267} // namespace Model
268} // namespace EC2
269} // namespace Aws
SpotOptionsRequest & WithMaxTotalPrice(MaxTotalPriceT &&value)
void SetMaintenanceStrategies(MaintenanceStrategiesT &&value)
SpotOptionsRequest & WithAllocationStrategy(SpotAllocationStrategy value)
SpotInstanceInterruptionBehavior GetInstanceInterruptionBehavior() const
AWS_EC2_API SpotOptionsRequest & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
SpotOptionsRequest & WithSingleInstanceType(bool value)
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
void SetMaxTotalPrice(MaxTotalPriceT &&value)
SpotAllocationStrategy GetAllocationStrategy() const
void SetAllocationStrategy(SpotAllocationStrategy value)
SpotOptionsRequest & WithMaintenanceStrategies(MaintenanceStrategiesT &&value)
AWS_EC2_API SpotOptionsRequest(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetMaxTotalPrice() const
SpotOptionsRequest & WithMinTargetCapacity(int value)
SpotOptionsRequest & WithInstanceInterruptionBehavior(SpotInstanceInterruptionBehavior value)
SpotOptionsRequest & WithInstancePoolsToUseCount(int value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
AWS_EC2_API SpotOptionsRequest()=default
const FleetSpotMaintenanceStrategiesRequest & GetMaintenanceStrategies() const
SpotOptionsRequest & WithSingleAvailabilityZone(bool value)
void SetInstanceInterruptionBehavior(SpotInstanceInterruptionBehavior value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::basic_ostream< char, std::char_traits< char > > OStream