AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
RequestSpotInstancesRequest.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/ec2/EC2Request.h>
9#include <aws/ec2/model/RequestSpotLaunchSpecification.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/ec2/model/InstanceInterruptionBehavior.h>
12#include <aws/core/utils/memory/stl/AWSString.h>
13#include <aws/ec2/model/SpotInstanceType.h>
14#include <aws/core/utils/DateTime.h>
15#include <aws/ec2/model/TagSpecification.h>
16#include <utility>
17
18namespace Aws
19{
20namespace EC2
21{
22namespace Model
23{
24
32 {
33 public:
34 AWS_EC2_API RequestSpotInstancesRequest() = default;
35
36 // Service request name is the Operation name which will send this request out,
37 // each operation should has unique request name, so that we can get operation's name from this request.
38 // Note: this is not true for response, multiple operations may have the same response name,
39 // so we can not get operation's name from response.
40 inline virtual const char* GetServiceRequestName() const override { return "RequestSpotInstances"; }
41
42 AWS_EC2_API Aws::String SerializePayload() const override;
43
44 protected:
45 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
46
47 public:
48
50
53 inline const RequestSpotLaunchSpecification& GetLaunchSpecification() const { return m_launchSpecification; }
54 inline bool LaunchSpecificationHasBeenSet() const { return m_launchSpecificationHasBeenSet; }
55 template<typename LaunchSpecificationT = RequestSpotLaunchSpecification>
56 void SetLaunchSpecification(LaunchSpecificationT&& value) { m_launchSpecificationHasBeenSet = true; m_launchSpecification = std::forward<LaunchSpecificationT>(value); }
57 template<typename LaunchSpecificationT = RequestSpotLaunchSpecification>
58 RequestSpotInstancesRequest& WithLaunchSpecification(LaunchSpecificationT&& value) { SetLaunchSpecification(std::forward<LaunchSpecificationT>(value)); return *this;}
60
62
70 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const { return m_tagSpecifications; }
71 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
72 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
73 void SetTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::forward<TagSpecificationsT>(value); }
74 template<typename TagSpecificationsT = Aws::Vector<TagSpecification>>
75 RequestSpotInstancesRequest& WithTagSpecifications(TagSpecificationsT&& value) { SetTagSpecifications(std::forward<TagSpecificationsT>(value)); return *this;}
76 template<typename TagSpecificationsT = TagSpecification>
77 RequestSpotInstancesRequest& AddTagSpecifications(TagSpecificationsT&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.emplace_back(std::forward<TagSpecificationsT>(value)); return *this; }
79
81
85 inline InstanceInterruptionBehavior GetInstanceInterruptionBehavior() const { return m_instanceInterruptionBehavior; }
86 inline bool InstanceInterruptionBehaviorHasBeenSet() const { return m_instanceInterruptionBehaviorHasBeenSet; }
87 inline void SetInstanceInterruptionBehavior(InstanceInterruptionBehavior value) { m_instanceInterruptionBehaviorHasBeenSet = true; m_instanceInterruptionBehavior = value; }
90
92
98 inline bool GetDryRun() const { return m_dryRun; }
99 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
100 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
101 inline RequestSpotInstancesRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
103
105
113 inline const Aws::String& GetSpotPrice() const { return m_spotPrice; }
114 inline bool SpotPriceHasBeenSet() const { return m_spotPriceHasBeenSet; }
115 template<typename SpotPriceT = Aws::String>
116 void SetSpotPrice(SpotPriceT&& value) { m_spotPriceHasBeenSet = true; m_spotPrice = std::forward<SpotPriceT>(value); }
117 template<typename SpotPriceT = Aws::String>
118 RequestSpotInstancesRequest& WithSpotPrice(SpotPriceT&& value) { SetSpotPrice(std::forward<SpotPriceT>(value)); return *this;}
120
122
129 inline const Aws::String& GetClientToken() const { return m_clientToken; }
130 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
131 template<typename ClientTokenT = Aws::String>
132 void SetClientToken(ClientTokenT&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::forward<ClientTokenT>(value); }
133 template<typename ClientTokenT = Aws::String>
134 RequestSpotInstancesRequest& WithClientToken(ClientTokenT&& value) { SetClientToken(std::forward<ClientTokenT>(value)); return *this;}
136
138
141 inline int GetInstanceCount() const { return m_instanceCount; }
142 inline bool InstanceCountHasBeenSet() const { return m_instanceCountHasBeenSet; }
143 inline void SetInstanceCount(int value) { m_instanceCountHasBeenSet = true; m_instanceCount = value; }
144 inline RequestSpotInstancesRequest& WithInstanceCount(int value) { SetInstanceCount(value); return *this;}
146
148
151 inline SpotInstanceType GetType() const { return m_type; }
152 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
153 inline void SetType(SpotInstanceType value) { m_typeHasBeenSet = true; m_type = value; }
154 inline RequestSpotInstancesRequest& WithType(SpotInstanceType value) { SetType(value); return *this;}
156
158
167 inline const Aws::Utils::DateTime& GetValidFrom() const { return m_validFrom; }
168 inline bool ValidFromHasBeenSet() const { return m_validFromHasBeenSet; }
169 template<typename ValidFromT = Aws::Utils::DateTime>
170 void SetValidFrom(ValidFromT&& value) { m_validFromHasBeenSet = true; m_validFrom = std::forward<ValidFromT>(value); }
171 template<typename ValidFromT = Aws::Utils::DateTime>
172 RequestSpotInstancesRequest& WithValidFrom(ValidFromT&& value) { SetValidFrom(std::forward<ValidFromT>(value)); return *this;}
174
176
186 inline const Aws::Utils::DateTime& GetValidUntil() const { return m_validUntil; }
187 inline bool ValidUntilHasBeenSet() const { return m_validUntilHasBeenSet; }
188 template<typename ValidUntilT = Aws::Utils::DateTime>
189 void SetValidUntil(ValidUntilT&& value) { m_validUntilHasBeenSet = true; m_validUntil = std::forward<ValidUntilT>(value); }
190 template<typename ValidUntilT = Aws::Utils::DateTime>
191 RequestSpotInstancesRequest& WithValidUntil(ValidUntilT&& value) { SetValidUntil(std::forward<ValidUntilT>(value)); return *this;}
193
195
200 inline const Aws::String& GetLaunchGroup() const { return m_launchGroup; }
201 inline bool LaunchGroupHasBeenSet() const { return m_launchGroupHasBeenSet; }
202 template<typename LaunchGroupT = Aws::String>
203 void SetLaunchGroup(LaunchGroupT&& value) { m_launchGroupHasBeenSet = true; m_launchGroup = std::forward<LaunchGroupT>(value); }
204 template<typename LaunchGroupT = Aws::String>
205 RequestSpotInstancesRequest& WithLaunchGroup(LaunchGroupT&& value) { SetLaunchGroup(std::forward<LaunchGroupT>(value)); return *this;}
207
209
227 inline const Aws::String& GetAvailabilityZoneGroup() const { return m_availabilityZoneGroup; }
228 inline bool AvailabilityZoneGroupHasBeenSet() const { return m_availabilityZoneGroupHasBeenSet; }
229 template<typename AvailabilityZoneGroupT = Aws::String>
230 void SetAvailabilityZoneGroup(AvailabilityZoneGroupT&& value) { m_availabilityZoneGroupHasBeenSet = true; m_availabilityZoneGroup = std::forward<AvailabilityZoneGroupT>(value); }
231 template<typename AvailabilityZoneGroupT = Aws::String>
232 RequestSpotInstancesRequest& WithAvailabilityZoneGroup(AvailabilityZoneGroupT&& value) { SetAvailabilityZoneGroup(std::forward<AvailabilityZoneGroupT>(value)); return *this;}
234
236
239 inline int GetBlockDurationMinutes() const { return m_blockDurationMinutes; }
240 inline bool BlockDurationMinutesHasBeenSet() const { return m_blockDurationMinutesHasBeenSet; }
241 inline void SetBlockDurationMinutes(int value) { m_blockDurationMinutesHasBeenSet = true; m_blockDurationMinutes = value; }
244 private:
245
246 RequestSpotLaunchSpecification m_launchSpecification;
247 bool m_launchSpecificationHasBeenSet = false;
248
249 Aws::Vector<TagSpecification> m_tagSpecifications;
250 bool m_tagSpecificationsHasBeenSet = false;
251
253 bool m_instanceInterruptionBehaviorHasBeenSet = false;
254
255 bool m_dryRun{false};
256 bool m_dryRunHasBeenSet = false;
257
258 Aws::String m_spotPrice;
259 bool m_spotPriceHasBeenSet = false;
260
261 Aws::String m_clientToken;
262 bool m_clientTokenHasBeenSet = false;
263
264 int m_instanceCount{0};
265 bool m_instanceCountHasBeenSet = false;
266
268 bool m_typeHasBeenSet = false;
269
270 Aws::Utils::DateTime m_validFrom{};
271 bool m_validFromHasBeenSet = false;
272
273 Aws::Utils::DateTime m_validUntil{};
274 bool m_validUntilHasBeenSet = false;
275
276 Aws::String m_launchGroup;
277 bool m_launchGroupHasBeenSet = false;
278
279 Aws::String m_availabilityZoneGroup;
280 bool m_availabilityZoneGroupHasBeenSet = false;
281
282 int m_blockDurationMinutes{0};
283 bool m_blockDurationMinutesHasBeenSet = false;
284 };
285
286} // namespace Model
287} // namespace EC2
288} // 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