AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
RequestSpotInstancesRequest.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/ec2/EC2Request.h>
11#include <aws/ec2/EC2_EXPORTS.h>
12#include <aws/ec2/model/InstanceInterruptionBehavior.h>
13#include <aws/ec2/model/RequestSpotLaunchSpecification.h>
14#include <aws/ec2/model/SpotInstanceType.h>
15#include <aws/ec2/model/TagSpecification.h>
16
17#include <utility>
18
19namespace Aws {
20namespace EC2 {
21namespace Model {
22
30 public:
31 AWS_EC2_API RequestSpotInstancesRequest() = default;
32
33 // Service request name is the Operation name which will send this request out,
34 // each operation should has unique request name, so that we can get operation's name from this request.
35 // Note: this is not true for response, multiple operations may have the same response name,
36 // so we can not get operation's name from response.
37 inline virtual const char* GetServiceRequestName() const override { return "RequestSpotInstances"; }
38
39 AWS_EC2_API Aws::String SerializePayload() const override;
40
41 protected:
42 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
43
44 public:
46
49 inline const RequestSpotLaunchSpecification& GetLaunchSpecification() const { return m_launchSpecification; }
50 inline bool LaunchSpecificationHasBeenSet() const { return m_launchSpecificationHasBeenSet; }
51 template <typename LaunchSpecificationT = RequestSpotLaunchSpecification>
52 void SetLaunchSpecification(LaunchSpecificationT&& value) {
53 m_launchSpecificationHasBeenSet = true;
54 m_launchSpecification = std::forward<LaunchSpecificationT>(value);
55 }
56 template <typename LaunchSpecificationT = RequestSpotLaunchSpecification>
58 SetLaunchSpecification(std::forward<LaunchSpecificationT>(value));
59 return *this;
60 }
62
64
72 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
73 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
74 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
75 void SetTagSpecifications(TagSpecificationsT&& value) {
76 m_tagSpecificationsHasBeenSet = true;
77 m_tagSpecifications = std::forward<TagSpecificationsT>(value);
78 }
79 template <typename TagSpecificationsT = Aws::Vector<TagSpecification>>
81 SetTagSpecifications(std::forward<TagSpecificationsT>(value));
82 return *this;
83 }
84 template <typename TagSpecificationsT = TagSpecification>
86 m_tagSpecificationsHasBeenSet = true;
87 m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value));
88 return *this;
89 }
91
93
97 inline InstanceInterruptionBehavior GetInstanceInterruptionBehavior() const { return m_instanceInterruptionBehavior; }
98 inline bool InstanceInterruptionBehaviorHasBeenSet() const { return m_instanceInterruptionBehaviorHasBeenSet; }
100 m_instanceInterruptionBehaviorHasBeenSet = true;
101 m_instanceInterruptionBehavior = value;
102 }
105 return *this;
106 }
108
110
116 inline bool GetDryRun() const { return m_dryRun; }
117 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
118 inline void SetDryRun(bool value) {
119 m_dryRunHasBeenSet = true;
120 m_dryRun = value;
121 }
123 SetDryRun(value);
124 return *this;
125 }
127
129
137 inline const Aws::String& GetSpotPrice() const { return m_spotPrice; }
138 inline bool SpotPriceHasBeenSet() const { return m_spotPriceHasBeenSet; }
139 template <typename SpotPriceT = Aws::String>
140 void SetSpotPrice(SpotPriceT&& value) {
141 m_spotPriceHasBeenSet = true;
142 m_spotPrice = std::forward<SpotPriceT>(value);
143 }
144 template <typename SpotPriceT = Aws::String>
146 SetSpotPrice(std::forward<SpotPriceT>(value));
147 return *this;
148 }
150
152
159 inline const Aws::String& GetClientToken() const { return m_clientToken; }
160 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
161 template <typename ClientTokenT = Aws::String>
162 void SetClientToken(ClientTokenT&& value) {
163 m_clientTokenHasBeenSet = true;
164 m_clientToken = std::forward<ClientTokenT>(value);
165 }
166 template <typename ClientTokenT = Aws::String>
168 SetClientToken(std::forward<ClientTokenT>(value));
169 return *this;
170 }
172
174
177 inline int GetInstanceCount() const { return m_instanceCount; }
178 inline bool InstanceCountHasBeenSet() const { return m_instanceCountHasBeenSet; }
179 inline void SetInstanceCount(int value) {
180 m_instanceCountHasBeenSet = true;
181 m_instanceCount = value;
182 }
184 SetInstanceCount(value);
185 return *this;
186 }
188
190
193 inline SpotInstanceType GetType() const { return m_type; }
194 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
195 inline void SetType(SpotInstanceType value) {
196 m_typeHasBeenSet = true;
197 m_type = value;
198 }
200 SetType(value);
201 return *this;
202 }
204
206
215 inline const Aws::Utils::DateTime& GetValidFrom() const { return m_validFrom; }
216 inline bool ValidFromHasBeenSet() const { return m_validFromHasBeenSet; }
217 template <typename ValidFromT = Aws::Utils::DateTime>
218 void SetValidFrom(ValidFromT&& value) {
219 m_validFromHasBeenSet = true;
220 m_validFrom = std::forward<ValidFromT>(value);
221 }
222 template <typename ValidFromT = Aws::Utils::DateTime>
224 SetValidFrom(std::forward<ValidFromT>(value));
225 return *this;
226 }
228
230
240 inline const Aws::Utils::DateTime& GetValidUntil() const { return m_validUntil; }
241 inline bool ValidUntilHasBeenSet() const { return m_validUntilHasBeenSet; }
242 template <typename ValidUntilT = Aws::Utils::DateTime>
243 void SetValidUntil(ValidUntilT&& value) {
244 m_validUntilHasBeenSet = true;
245 m_validUntil = std::forward<ValidUntilT>(value);
246 }
247 template <typename ValidUntilT = Aws::Utils::DateTime>
249 SetValidUntil(std::forward<ValidUntilT>(value));
250 return *this;
251 }
253
255
260 inline const Aws::String& GetLaunchGroup() const { return m_launchGroup; }
261 inline bool LaunchGroupHasBeenSet() const { return m_launchGroupHasBeenSet; }
262 template <typename LaunchGroupT = Aws::String>
263 void SetLaunchGroup(LaunchGroupT&& value) {
264 m_launchGroupHasBeenSet = true;
265 m_launchGroup = std::forward<LaunchGroupT>(value);
266 }
267 template <typename LaunchGroupT = Aws::String>
269 SetLaunchGroup(std::forward<LaunchGroupT>(value));
270 return *this;
271 }
273
275
293 inline const Aws::String& GetAvailabilityZoneGroup() const { return m_availabilityZoneGroup; }
294 inline bool AvailabilityZoneGroupHasBeenSet() const { return m_availabilityZoneGroupHasBeenSet; }
295 template <typename AvailabilityZoneGroupT = Aws::String>
296 void SetAvailabilityZoneGroup(AvailabilityZoneGroupT&& value) {
297 m_availabilityZoneGroupHasBeenSet = true;
298 m_availabilityZoneGroup = std::forward<AvailabilityZoneGroupT>(value);
299 }
300 template <typename AvailabilityZoneGroupT = Aws::String>
302 SetAvailabilityZoneGroup(std::forward<AvailabilityZoneGroupT>(value));
303 return *this;
304 }
306
308
311 inline int GetBlockDurationMinutes() const { return m_blockDurationMinutes; }
312 inline bool BlockDurationMinutesHasBeenSet() const { return m_blockDurationMinutesHasBeenSet; }
313 inline void SetBlockDurationMinutes(int value) {
314 m_blockDurationMinutesHasBeenSet = true;
315 m_blockDurationMinutes = value;
316 }
319 return *this;
320 }
322 private:
323 RequestSpotLaunchSpecification m_launchSpecification;
324
325 Aws::Vector<TagSpecification> m_tagSpecifications;
326
328
329 bool m_dryRun{false};
330
331 Aws::String m_spotPrice;
332
333 Aws::String m_clientToken;
334
335 int m_instanceCount{0};
336
338
339 Aws::Utils::DateTime m_validFrom{};
340
341 Aws::Utils::DateTime m_validUntil{};
342
343 Aws::String m_launchGroup;
344
345 Aws::String m_availabilityZoneGroup;
346
347 int m_blockDurationMinutes{0};
348 bool m_launchSpecificationHasBeenSet = false;
349 bool m_tagSpecificationsHasBeenSet = false;
350 bool m_instanceInterruptionBehaviorHasBeenSet = false;
351 bool m_dryRunHasBeenSet = false;
352 bool m_spotPriceHasBeenSet = false;
353 bool m_clientTokenHasBeenSet = false;
354 bool m_instanceCountHasBeenSet = false;
355 bool m_typeHasBeenSet = false;
356 bool m_validFromHasBeenSet = false;
357 bool m_validUntilHasBeenSet = false;
358 bool m_launchGroupHasBeenSet = false;
359 bool m_availabilityZoneGroupHasBeenSet = false;
360 bool m_blockDurationMinutesHasBeenSet = false;
361};
362
363} // namespace Model
364} // namespace EC2
365} // namespace Aws
virtual const char * GetServiceRequestName() const override
void SetLaunchSpecification(LaunchSpecificationT &&value)
RequestSpotInstancesRequest & WithInstanceInterruptionBehavior(InstanceInterruptionBehavior value)
RequestSpotInstancesRequest & WithType(SpotInstanceType value)
AWS_EC2_API RequestSpotInstancesRequest()=default
void SetInstanceInterruptionBehavior(InstanceInterruptionBehavior value)
void SetAvailabilityZoneGroup(AvailabilityZoneGroupT &&value)
RequestSpotInstancesRequest & WithSpotPrice(SpotPriceT &&value)
AWS_EC2_API Aws::String SerializePayload() const override
RequestSpotInstancesRequest & WithLaunchGroup(LaunchGroupT &&value)
RequestSpotInstancesRequest & WithInstanceCount(int value)
const RequestSpotLaunchSpecification & GetLaunchSpecification() const
RequestSpotInstancesRequest & WithClientToken(ClientTokenT &&value)
RequestSpotInstancesRequest & AddTagSpecifications(TagSpecificationsT &&value)
RequestSpotInstancesRequest & WithValidUntil(ValidUntilT &&value)
RequestSpotInstancesRequest & WithDryRun(bool value)
RequestSpotInstancesRequest & WithAvailabilityZoneGroup(AvailabilityZoneGroupT &&value)
RequestSpotInstancesRequest & WithLaunchSpecification(LaunchSpecificationT &&value)
RequestSpotInstancesRequest & WithBlockDurationMinutes(int value)
RequestSpotInstancesRequest & WithValidFrom(ValidFromT &&value)
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
InstanceInterruptionBehavior GetInstanceInterruptionBehavior() const
RequestSpotInstancesRequest & WithTagSpecifications(TagSpecificationsT &&value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector