AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
SpotOptionsRequest.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/FleetSpotMaintenanceStrategiesRequest.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 SpotOptionsRequest();
39 AWS_EC2_API SpotOptionsRequest(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); }
94
96
100 inline const FleetSpotMaintenanceStrategiesRequest& GetMaintenanceStrategies() const{ return m_maintenanceStrategies; }
101 inline bool MaintenanceStrategiesHasBeenSet() const { return m_maintenanceStrategiesHasBeenSet; }
102 inline void SetMaintenanceStrategies(const FleetSpotMaintenanceStrategiesRequest& value) { m_maintenanceStrategiesHasBeenSet = true; m_maintenanceStrategies = value; }
103 inline void SetMaintenanceStrategies(FleetSpotMaintenanceStrategiesRequest&& 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; }
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 SpotOptionsRequest& 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; }
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 SpotOptionsRequest& 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 SpotOptionsRequest& WithMaxTotalPrice(const Aws::String& value) { SetMaxTotalPrice(value); return *this;}
202 inline SpotOptionsRequest& WithMaxTotalPrice(Aws::String&& value) { SetMaxTotalPrice(std::move(value)); return *this;}
203 inline SpotOptionsRequest& WithMaxTotalPrice(const char* value) { SetMaxTotalPrice(value); return *this;}
205 private:
206
207 SpotAllocationStrategy m_allocationStrategy;
208 bool m_allocationStrategyHasBeenSet = false;
209
210 FleetSpotMaintenanceStrategiesRequest 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
SpotOptionsRequest & WithInstanceInterruptionBehavior(const SpotInstanceInterruptionBehavior &value)
SpotOptionsRequest & WithMaintenanceStrategies(const FleetSpotMaintenanceStrategiesRequest &value)
void SetMaxTotalPrice(Aws::String &&value)
const 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
SpotOptionsRequest & WithAllocationStrategy(SpotAllocationStrategy &&value)
SpotOptionsRequest & WithAllocationStrategy(const SpotAllocationStrategy &value)
void SetInstanceInterruptionBehavior(const SpotInstanceInterruptionBehavior &value)
void SetMaxTotalPrice(const Aws::String &value)
const SpotAllocationStrategy & GetAllocationStrategy() const
void SetMaintenanceStrategies(const FleetSpotMaintenanceStrategiesRequest &value)
void SetInstanceInterruptionBehavior(SpotInstanceInterruptionBehavior &&value)
void SetAllocationStrategy(SpotAllocationStrategy &&value)
SpotOptionsRequest & WithInstanceInterruptionBehavior(SpotInstanceInterruptionBehavior &&value)
AWS_EC2_API SpotOptionsRequest(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::String & GetMaxTotalPrice() const
SpotOptionsRequest & WithMinTargetCapacity(int value)
SpotOptionsRequest & WithInstancePoolsToUseCount(int value)
void SetMaintenanceStrategies(FleetSpotMaintenanceStrategiesRequest &&value)
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
void SetAllocationStrategy(const SpotAllocationStrategy &value)
SpotOptionsRequest & WithMaintenanceStrategies(FleetSpotMaintenanceStrategiesRequest &&value)
const FleetSpotMaintenanceStrategiesRequest & GetMaintenanceStrategies() const
SpotOptionsRequest & WithMaxTotalPrice(const char *value)
SpotOptionsRequest & WithSingleAvailabilityZone(bool value)
SpotOptionsRequest & WithMaxTotalPrice(Aws::String &&value)
SpotOptionsRequest & WithMaxTotalPrice(const Aws::String &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::basic_ostream< char, std::char_traits< char > > OStream