AWS SDK for C++  1.9.67
AWS SDK for C++
SpotOptionsRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace Utils
18 {
19 namespace Xml
20 {
21  class XmlNode;
22 } // namespace Xml
23 } // namespace Utils
24 namespace EC2
25 {
26 namespace Model
27 {
28 
36  {
37  public:
41 
42  void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
43  void OutputToStream(Aws::OStream& oStream, const char* location) const;
44 
45 
66  inline const SpotAllocationStrategy& GetAllocationStrategy() const{ return m_allocationStrategy; }
67 
88  inline bool AllocationStrategyHasBeenSet() const { return m_allocationStrategyHasBeenSet; }
89 
110  inline void SetAllocationStrategy(const SpotAllocationStrategy& value) { m_allocationStrategyHasBeenSet = true; m_allocationStrategy = value; }
111 
132  inline void SetAllocationStrategy(SpotAllocationStrategy&& value) { m_allocationStrategyHasBeenSet = true; m_allocationStrategy = std::move(value); }
133 
154  inline SpotOptionsRequest& WithAllocationStrategy(const SpotAllocationStrategy& value) { SetAllocationStrategy(value); return *this;}
155 
176  inline SpotOptionsRequest& WithAllocationStrategy(SpotAllocationStrategy&& value) { SetAllocationStrategy(std::move(value)); return *this;}
177 
178 
183  inline const FleetSpotMaintenanceStrategiesRequest& GetMaintenanceStrategies() const{ return m_maintenanceStrategies; }
184 
189  inline bool MaintenanceStrategiesHasBeenSet() const { return m_maintenanceStrategiesHasBeenSet; }
190 
195  inline void SetMaintenanceStrategies(const FleetSpotMaintenanceStrategiesRequest& value) { m_maintenanceStrategiesHasBeenSet = true; m_maintenanceStrategies = value; }
196 
201  inline void SetMaintenanceStrategies(FleetSpotMaintenanceStrategiesRequest&& value) { m_maintenanceStrategiesHasBeenSet = true; m_maintenanceStrategies = std::move(value); }
202 
207  inline SpotOptionsRequest& WithMaintenanceStrategies(const FleetSpotMaintenanceStrategiesRequest& value) { SetMaintenanceStrategies(value); return *this;}
208 
213  inline SpotOptionsRequest& WithMaintenanceStrategies(FleetSpotMaintenanceStrategiesRequest&& value) { SetMaintenanceStrategies(std::move(value)); return *this;}
214 
215 
220  inline const SpotInstanceInterruptionBehavior& GetInstanceInterruptionBehavior() const{ return m_instanceInterruptionBehavior; }
221 
226  inline bool InstanceInterruptionBehaviorHasBeenSet() const { return m_instanceInterruptionBehaviorHasBeenSet; }
227 
232  inline void SetInstanceInterruptionBehavior(const SpotInstanceInterruptionBehavior& value) { m_instanceInterruptionBehaviorHasBeenSet = true; m_instanceInterruptionBehavior = value; }
233 
238  inline void SetInstanceInterruptionBehavior(SpotInstanceInterruptionBehavior&& value) { m_instanceInterruptionBehaviorHasBeenSet = true; m_instanceInterruptionBehavior = std::move(value); }
239 
244  inline SpotOptionsRequest& WithInstanceInterruptionBehavior(const SpotInstanceInterruptionBehavior& value) { SetInstanceInterruptionBehavior(value); return *this;}
245 
250  inline SpotOptionsRequest& WithInstanceInterruptionBehavior(SpotInstanceInterruptionBehavior&& value) { SetInstanceInterruptionBehavior(std::move(value)); return *this;}
251 
252 
267  inline int GetInstancePoolsToUseCount() const{ return m_instancePoolsToUseCount; }
268 
283  inline bool InstancePoolsToUseCountHasBeenSet() const { return m_instancePoolsToUseCountHasBeenSet; }
284 
299  inline void SetInstancePoolsToUseCount(int value) { m_instancePoolsToUseCountHasBeenSet = true; m_instancePoolsToUseCount = value; }
300 
315  inline SpotOptionsRequest& WithInstancePoolsToUseCount(int value) { SetInstancePoolsToUseCount(value); return *this;}
316 
317 
323  inline bool GetSingleInstanceType() const{ return m_singleInstanceType; }
324 
330  inline bool SingleInstanceTypeHasBeenSet() const { return m_singleInstanceTypeHasBeenSet; }
331 
337  inline void SetSingleInstanceType(bool value) { m_singleInstanceTypeHasBeenSet = true; m_singleInstanceType = value; }
338 
344  inline SpotOptionsRequest& WithSingleInstanceType(bool value) { SetSingleInstanceType(value); return *this;}
345 
346 
351  inline bool GetSingleAvailabilityZone() const{ return m_singleAvailabilityZone; }
352 
357  inline bool SingleAvailabilityZoneHasBeenSet() const { return m_singleAvailabilityZoneHasBeenSet; }
358 
363  inline void SetSingleAvailabilityZone(bool value) { m_singleAvailabilityZoneHasBeenSet = true; m_singleAvailabilityZone = value; }
364 
369  inline SpotOptionsRequest& WithSingleAvailabilityZone(bool value) { SetSingleAvailabilityZone(value); return *this;}
370 
371 
376  inline int GetMinTargetCapacity() const{ return m_minTargetCapacity; }
377 
382  inline bool MinTargetCapacityHasBeenSet() const { return m_minTargetCapacityHasBeenSet; }
383 
388  inline void SetMinTargetCapacity(int value) { m_minTargetCapacityHasBeenSet = true; m_minTargetCapacity = value; }
389 
394  inline SpotOptionsRequest& WithMinTargetCapacity(int value) { SetMinTargetCapacity(value); return *this;}
395 
396 
401  inline const Aws::String& GetMaxTotalPrice() const{ return m_maxTotalPrice; }
402 
407  inline bool MaxTotalPriceHasBeenSet() const { return m_maxTotalPriceHasBeenSet; }
408 
413  inline void SetMaxTotalPrice(const Aws::String& value) { m_maxTotalPriceHasBeenSet = true; m_maxTotalPrice = value; }
414 
419  inline void SetMaxTotalPrice(Aws::String&& value) { m_maxTotalPriceHasBeenSet = true; m_maxTotalPrice = std::move(value); }
420 
425  inline void SetMaxTotalPrice(const char* value) { m_maxTotalPriceHasBeenSet = true; m_maxTotalPrice.assign(value); }
426 
431  inline SpotOptionsRequest& WithMaxTotalPrice(const Aws::String& value) { SetMaxTotalPrice(value); return *this;}
432 
437  inline SpotOptionsRequest& WithMaxTotalPrice(Aws::String&& value) { SetMaxTotalPrice(std::move(value)); return *this;}
438 
443  inline SpotOptionsRequest& WithMaxTotalPrice(const char* value) { SetMaxTotalPrice(value); return *this;}
444 
445  private:
446 
447  SpotAllocationStrategy m_allocationStrategy;
448  bool m_allocationStrategyHasBeenSet;
449 
450  FleetSpotMaintenanceStrategiesRequest m_maintenanceStrategies;
451  bool m_maintenanceStrategiesHasBeenSet;
452 
453  SpotInstanceInterruptionBehavior m_instanceInterruptionBehavior;
454  bool m_instanceInterruptionBehaviorHasBeenSet;
455 
456  int m_instancePoolsToUseCount;
457  bool m_instancePoolsToUseCountHasBeenSet;
458 
459  bool m_singleInstanceType;
460  bool m_singleInstanceTypeHasBeenSet;
461 
462  bool m_singleAvailabilityZone;
463  bool m_singleAvailabilityZoneHasBeenSet;
464 
465  int m_minTargetCapacity;
466  bool m_minTargetCapacityHasBeenSet;
467 
468  Aws::String m_maxTotalPrice;
469  bool m_maxTotalPriceHasBeenSet;
470  };
471 
472 } // namespace Model
473 } // namespace EC2
474 } // namespace Aws
Aws::EC2::Model::SpotOptionsRequest::GetMinTargetCapacity
int GetMinTargetCapacity() const
Definition: SpotOptionsRequest.h:376
Aws::EC2::Model::SpotOptionsRequest::GetAllocationStrategy
const SpotAllocationStrategy & GetAllocationStrategy() const
Definition: SpotOptionsRequest.h:66
Aws::EC2::Model::SpotOptionsRequest::GetSingleAvailabilityZone
bool GetSingleAvailabilityZone() const
Definition: SpotOptionsRequest.h:351
Aws::EC2::Model::SpotOptionsRequest::WithAllocationStrategy
SpotOptionsRequest & WithAllocationStrategy(SpotAllocationStrategy &&value)
Definition: SpotOptionsRequest.h:176
Aws::EC2::Model::SpotOptionsRequest::WithAllocationStrategy
SpotOptionsRequest & WithAllocationStrategy(const SpotAllocationStrategy &value)
Definition: SpotOptionsRequest.h:154
Aws::EC2::Model::SpotOptionsRequest::SingleAvailabilityZoneHasBeenSet
bool SingleAvailabilityZoneHasBeenSet() const
Definition: SpotOptionsRequest.h:357
Aws::EC2::Model::SpotOptionsRequest::InstanceInterruptionBehaviorHasBeenSet
bool InstanceInterruptionBehaviorHasBeenSet() const
Definition: SpotOptionsRequest.h:226
Aws::EC2::Model::SpotOptionsRequest::GetInstancePoolsToUseCount
int GetInstancePoolsToUseCount() const
Definition: SpotOptionsRequest.h:267
Aws::EC2::Model::SpotOptionsRequest::SetMinTargetCapacity
void SetMinTargetCapacity(int value)
Definition: SpotOptionsRequest.h:388
Aws::EC2::Model::FleetSpotMaintenanceStrategiesRequest
Definition: FleetSpotMaintenanceStrategiesRequest.h:33
Aws::EC2::Model::SpotOptionsRequest::WithMaintenanceStrategies
SpotOptionsRequest & WithMaintenanceStrategies(const FleetSpotMaintenanceStrategiesRequest &value)
Definition: SpotOptionsRequest.h:207
Aws::EC2::Model::SpotOptionsRequest::SetMaxTotalPrice
void SetMaxTotalPrice(Aws::String &&value)
Definition: SpotOptionsRequest.h:419
Aws::EC2::Model::SpotOptionsRequest::InstancePoolsToUseCountHasBeenSet
bool InstancePoolsToUseCountHasBeenSet() const
Definition: SpotOptionsRequest.h:283
Aws::EC2::Model::SpotOptionsRequest::SetMaxTotalPrice
void SetMaxTotalPrice(const char *value)
Definition: SpotOptionsRequest.h:425
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::EC2::Model::SpotOptionsRequest::SetInstancePoolsToUseCount
void SetInstancePoolsToUseCount(int value)
Definition: SpotOptionsRequest.h:299
Aws::EC2::Model::SpotOptionsRequest::SetInstanceInterruptionBehavior
void SetInstanceInterruptionBehavior(SpotInstanceInterruptionBehavior &&value)
Definition: SpotOptionsRequest.h:238
Aws::EC2::Model::SpotOptionsRequest::WithMaxTotalPrice
SpotOptionsRequest & WithMaxTotalPrice(const Aws::String &value)
Definition: SpotOptionsRequest.h:431
Aws::EC2::Model::SpotOptionsRequest::AllocationStrategyHasBeenSet
bool AllocationStrategyHasBeenSet() const
Definition: SpotOptionsRequest.h:88
Aws::EC2::Model::SpotOptionsRequest::SetAllocationStrategy
void SetAllocationStrategy(SpotAllocationStrategy &&value)
Definition: SpotOptionsRequest.h:132
AWSStreamFwd.h
Aws::EC2::Model::SpotOptionsRequest::GetMaxTotalPrice
const Aws::String & GetMaxTotalPrice() const
Definition: SpotOptionsRequest.h:401
Aws::EC2::Model::SpotInstanceInterruptionBehavior
SpotInstanceInterruptionBehavior
Definition: SpotInstanceInterruptionBehavior.h:17
Aws::EC2::Model::SpotAllocationStrategy
SpotAllocationStrategy
Definition: SpotAllocationStrategy.h:17
Aws::EC2::Model::SpotOptionsRequest::WithMaxTotalPrice
SpotOptionsRequest & WithMaxTotalPrice(Aws::String &&value)
Definition: SpotOptionsRequest.h:437
Aws::EC2::Model::SpotOptionsRequest::SetAllocationStrategy
void SetAllocationStrategy(const SpotAllocationStrategy &value)
Definition: SpotOptionsRequest.h:110
Aws::EC2::Model::SpotOptionsRequest::GetSingleInstanceType
bool GetSingleInstanceType() const
Definition: SpotOptionsRequest.h:323
Aws::OStream
std::basic_ostream< char, std::char_traits< char > > OStream
Definition: AWSStreamFwd.h:21
Aws::EC2::Model::SpotOptionsRequest::WithInstanceInterruptionBehavior
SpotOptionsRequest & WithInstanceInterruptionBehavior(SpotInstanceInterruptionBehavior &&value)
Definition: SpotOptionsRequest.h:250
Aws::EC2::Model::SpotOptionsRequest::SetMaintenanceStrategies
void SetMaintenanceStrategies(FleetSpotMaintenanceStrategiesRequest &&value)
Definition: SpotOptionsRequest.h:201
Aws::EC2::Model::SpotOptionsRequest::MaintenanceStrategiesHasBeenSet
bool MaintenanceStrategiesHasBeenSet() const
Definition: SpotOptionsRequest.h:189
Aws::EC2::Model::SpotOptionsRequest::WithInstanceInterruptionBehavior
SpotOptionsRequest & WithInstanceInterruptionBehavior(const SpotInstanceInterruptionBehavior &value)
Definition: SpotOptionsRequest.h:244
Aws::Utils::Xml::XmlNode
Definition: XmlSerializer.h:53
FleetSpotMaintenanceStrategiesRequest.h
AWSString.h
Aws::EC2::Model::SpotOptionsRequest::SpotOptionsRequest
SpotOptionsRequest()
Aws::EC2::Model::SpotOptionsRequest::GetInstanceInterruptionBehavior
const SpotInstanceInterruptionBehavior & GetInstanceInterruptionBehavior() const
Definition: SpotOptionsRequest.h:220
Aws::EC2::Model::SpotOptionsRequest
Definition: SpotOptionsRequest.h:36
Aws::EC2::Model::SpotOptionsRequest::WithMinTargetCapacity
SpotOptionsRequest & WithMinTargetCapacity(int value)
Definition: SpotOptionsRequest.h:394
Aws::EC2::Model::SpotOptionsRequest::operator=
SpotOptionsRequest & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
Aws::EC2::Model::SpotOptionsRequest::WithMaxTotalPrice
SpotOptionsRequest & WithMaxTotalPrice(const char *value)
Definition: SpotOptionsRequest.h:443
Aws::EC2::Model::SpotOptionsRequest::MaxTotalPriceHasBeenSet
bool MaxTotalPriceHasBeenSet() const
Definition: SpotOptionsRequest.h:407
Aws::EC2::Model::SpotOptionsRequest::SetMaintenanceStrategies
void SetMaintenanceStrategies(const FleetSpotMaintenanceStrategiesRequest &value)
Definition: SpotOptionsRequest.h:195
SpotInstanceInterruptionBehavior.h
Aws::EC2::Model::SpotOptionsRequest::WithSingleAvailabilityZone
SpotOptionsRequest & WithSingleAvailabilityZone(bool value)
Definition: SpotOptionsRequest.h:369
Aws::EC2::Model::SpotOptionsRequest::WithMaintenanceStrategies
SpotOptionsRequest & WithMaintenanceStrategies(FleetSpotMaintenanceStrategiesRequest &&value)
Definition: SpotOptionsRequest.h:213
Aws
Definition: AccessManagementClient.h:15
Aws::EC2::Model::SpotOptionsRequest::OutputToStream
void OutputToStream(Aws::OStream &oStream, const char *location) const
Aws::EC2::Model::SpotOptionsRequest::SetSingleInstanceType
void SetSingleInstanceType(bool value)
Definition: SpotOptionsRequest.h:337
Aws::EC2::Model::SpotOptionsRequest::SpotOptionsRequest
SpotOptionsRequest(const Aws::Utils::Xml::XmlNode &xmlNode)
Aws::EC2::Model::SpotOptionsRequest::SetSingleAvailabilityZone
void SetSingleAvailabilityZone(bool value)
Definition: SpotOptionsRequest.h:363
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
index
int index
Definition: cJSON.h:181
Aws::EC2::Model::SpotOptionsRequest::GetMaintenanceStrategies
const FleetSpotMaintenanceStrategiesRequest & GetMaintenanceStrategies() const
Definition: SpotOptionsRequest.h:183
Aws::EC2::Model::SpotOptionsRequest::MinTargetCapacityHasBeenSet
bool MinTargetCapacityHasBeenSet() const
Definition: SpotOptionsRequest.h:382
Aws::EC2::Model::SpotOptionsRequest::SetMaxTotalPrice
void SetMaxTotalPrice(const Aws::String &value)
Definition: SpotOptionsRequest.h:413
Aws::EC2::Model::SpotOptionsRequest::WithInstancePoolsToUseCount
SpotOptionsRequest & WithInstancePoolsToUseCount(int value)
Definition: SpotOptionsRequest.h:315
SpotAllocationStrategy.h
EC2_EXPORTS.h
Aws::EC2::Model::SpotOptionsRequest::SetInstanceInterruptionBehavior
void SetInstanceInterruptionBehavior(const SpotInstanceInterruptionBehavior &value)
Definition: SpotOptionsRequest.h:232
Aws::EC2::Model::SpotOptionsRequest::OutputToStream
void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
Aws::EC2::Model::SpotOptionsRequest::WithSingleInstanceType
SpotOptionsRequest & WithSingleInstanceType(bool value)
Definition: SpotOptionsRequest.h:344
Aws::EC2::Model::SpotOptionsRequest::SingleInstanceTypeHasBeenSet
bool SingleInstanceTypeHasBeenSet() const
Definition: SpotOptionsRequest.h:330