AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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:
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 inline void SetLaunchSpecification(const RequestSpotLaunchSpecification& value) { m_launchSpecificationHasBeenSet = true; m_launchSpecification = value; }
56 inline void SetLaunchSpecification(RequestSpotLaunchSpecification&& value) { m_launchSpecificationHasBeenSet = true; m_launchSpecification = std::move(value); }
60
62
70 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const{ return m_tagSpecifications; }
71 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
72 inline void SetTagSpecifications(const Aws::Vector<TagSpecification>& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; }
73 inline void SetTagSpecifications(Aws::Vector<TagSpecification>&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); }
76 inline RequestSpotInstancesRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; }
77 inline RequestSpotInstancesRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; }
79
81
85 inline const InstanceInterruptionBehavior& GetInstanceInterruptionBehavior() const{ return m_instanceInterruptionBehavior; }
86 inline bool InstanceInterruptionBehaviorHasBeenSet() const { return m_instanceInterruptionBehaviorHasBeenSet; }
87 inline void SetInstanceInterruptionBehavior(const InstanceInterruptionBehavior& value) { m_instanceInterruptionBehaviorHasBeenSet = true; m_instanceInterruptionBehavior = value; }
88 inline void SetInstanceInterruptionBehavior(InstanceInterruptionBehavior&& value) { m_instanceInterruptionBehaviorHasBeenSet = true; m_instanceInterruptionBehavior = std::move(value); }
92
94
100 inline bool GetDryRun() const{ return m_dryRun; }
101 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
102 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
103 inline RequestSpotInstancesRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
105
107
115 inline const Aws::String& GetSpotPrice() const{ return m_spotPrice; }
116 inline bool SpotPriceHasBeenSet() const { return m_spotPriceHasBeenSet; }
117 inline void SetSpotPrice(const Aws::String& value) { m_spotPriceHasBeenSet = true; m_spotPrice = value; }
118 inline void SetSpotPrice(Aws::String&& value) { m_spotPriceHasBeenSet = true; m_spotPrice = std::move(value); }
119 inline void SetSpotPrice(const char* value) { m_spotPriceHasBeenSet = true; m_spotPrice.assign(value); }
120 inline RequestSpotInstancesRequest& WithSpotPrice(const Aws::String& value) { SetSpotPrice(value); return *this;}
121 inline RequestSpotInstancesRequest& WithSpotPrice(Aws::String&& value) { SetSpotPrice(std::move(value)); return *this;}
122 inline RequestSpotInstancesRequest& WithSpotPrice(const char* value) { SetSpotPrice(value); return *this;}
124
126
133 inline const Aws::String& GetClientToken() const{ return m_clientToken; }
134 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
135 inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; }
136 inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); }
137 inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); }
138 inline RequestSpotInstancesRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;}
139 inline RequestSpotInstancesRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;}
140 inline RequestSpotInstancesRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;}
142
144
147 inline int GetInstanceCount() const{ return m_instanceCount; }
148 inline bool InstanceCountHasBeenSet() const { return m_instanceCountHasBeenSet; }
149 inline void SetInstanceCount(int value) { m_instanceCountHasBeenSet = true; m_instanceCount = value; }
150 inline RequestSpotInstancesRequest& WithInstanceCount(int value) { SetInstanceCount(value); return *this;}
152
154
157 inline const SpotInstanceType& GetType() const{ return m_type; }
158 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
159 inline void SetType(const SpotInstanceType& value) { m_typeHasBeenSet = true; m_type = value; }
160 inline void SetType(SpotInstanceType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); }
161 inline RequestSpotInstancesRequest& WithType(const SpotInstanceType& value) { SetType(value); return *this;}
162 inline RequestSpotInstancesRequest& WithType(SpotInstanceType&& value) { SetType(std::move(value)); return *this;}
164
166
175 inline const Aws::Utils::DateTime& GetValidFrom() const{ return m_validFrom; }
176 inline bool ValidFromHasBeenSet() const { return m_validFromHasBeenSet; }
177 inline void SetValidFrom(const Aws::Utils::DateTime& value) { m_validFromHasBeenSet = true; m_validFrom = value; }
178 inline void SetValidFrom(Aws::Utils::DateTime&& value) { m_validFromHasBeenSet = true; m_validFrom = std::move(value); }
179 inline RequestSpotInstancesRequest& WithValidFrom(const Aws::Utils::DateTime& value) { SetValidFrom(value); return *this;}
180 inline RequestSpotInstancesRequest& WithValidFrom(Aws::Utils::DateTime&& value) { SetValidFrom(std::move(value)); return *this;}
182
184
194 inline const Aws::Utils::DateTime& GetValidUntil() const{ return m_validUntil; }
195 inline bool ValidUntilHasBeenSet() const { return m_validUntilHasBeenSet; }
196 inline void SetValidUntil(const Aws::Utils::DateTime& value) { m_validUntilHasBeenSet = true; m_validUntil = value; }
197 inline void SetValidUntil(Aws::Utils::DateTime&& value) { m_validUntilHasBeenSet = true; m_validUntil = std::move(value); }
199 inline RequestSpotInstancesRequest& WithValidUntil(Aws::Utils::DateTime&& value) { SetValidUntil(std::move(value)); return *this;}
201
203
208 inline const Aws::String& GetLaunchGroup() const{ return m_launchGroup; }
209 inline bool LaunchGroupHasBeenSet() const { return m_launchGroupHasBeenSet; }
210 inline void SetLaunchGroup(const Aws::String& value) { m_launchGroupHasBeenSet = true; m_launchGroup = value; }
211 inline void SetLaunchGroup(Aws::String&& value) { m_launchGroupHasBeenSet = true; m_launchGroup = std::move(value); }
212 inline void SetLaunchGroup(const char* value) { m_launchGroupHasBeenSet = true; m_launchGroup.assign(value); }
213 inline RequestSpotInstancesRequest& WithLaunchGroup(const Aws::String& value) { SetLaunchGroup(value); return *this;}
214 inline RequestSpotInstancesRequest& WithLaunchGroup(Aws::String&& value) { SetLaunchGroup(std::move(value)); return *this;}
215 inline RequestSpotInstancesRequest& WithLaunchGroup(const char* value) { SetLaunchGroup(value); return *this;}
217
219
237 inline const Aws::String& GetAvailabilityZoneGroup() const{ return m_availabilityZoneGroup; }
238 inline bool AvailabilityZoneGroupHasBeenSet() const { return m_availabilityZoneGroupHasBeenSet; }
239 inline void SetAvailabilityZoneGroup(const Aws::String& value) { m_availabilityZoneGroupHasBeenSet = true; m_availabilityZoneGroup = value; }
240 inline void SetAvailabilityZoneGroup(Aws::String&& value) { m_availabilityZoneGroupHasBeenSet = true; m_availabilityZoneGroup = std::move(value); }
241 inline void SetAvailabilityZoneGroup(const char* value) { m_availabilityZoneGroupHasBeenSet = true; m_availabilityZoneGroup.assign(value); }
244 inline RequestSpotInstancesRequest& WithAvailabilityZoneGroup(const char* value) { SetAvailabilityZoneGroup(value); return *this;}
246
248
251 inline int GetBlockDurationMinutes() const{ return m_blockDurationMinutes; }
252 inline bool BlockDurationMinutesHasBeenSet() const { return m_blockDurationMinutesHasBeenSet; }
253 inline void SetBlockDurationMinutes(int value) { m_blockDurationMinutesHasBeenSet = true; m_blockDurationMinutes = value; }
256 private:
257
258 RequestSpotLaunchSpecification m_launchSpecification;
259 bool m_launchSpecificationHasBeenSet = false;
260
261 Aws::Vector<TagSpecification> m_tagSpecifications;
262 bool m_tagSpecificationsHasBeenSet = false;
263
264 InstanceInterruptionBehavior m_instanceInterruptionBehavior;
265 bool m_instanceInterruptionBehaviorHasBeenSet = false;
266
267 bool m_dryRun;
268 bool m_dryRunHasBeenSet = false;
269
270 Aws::String m_spotPrice;
271 bool m_spotPriceHasBeenSet = false;
272
273 Aws::String m_clientToken;
274 bool m_clientTokenHasBeenSet = false;
275
276 int m_instanceCount;
277 bool m_instanceCountHasBeenSet = false;
278
279 SpotInstanceType m_type;
280 bool m_typeHasBeenSet = false;
281
282 Aws::Utils::DateTime m_validFrom;
283 bool m_validFromHasBeenSet = false;
284
285 Aws::Utils::DateTime m_validUntil;
286 bool m_validUntilHasBeenSet = false;
287
288 Aws::String m_launchGroup;
289 bool m_launchGroupHasBeenSet = false;
290
291 Aws::String m_availabilityZoneGroup;
292 bool m_availabilityZoneGroupHasBeenSet = false;
293
294 int m_blockDurationMinutes;
295 bool m_blockDurationMinutesHasBeenSet = false;
296 };
297
298} // namespace Model
299} // namespace EC2
300} // namespace Aws
const InstanceInterruptionBehavior & GetInstanceInterruptionBehavior() const
RequestSpotInstancesRequest & WithValidFrom(Aws::Utils::DateTime &&value)
RequestSpotInstancesRequest & WithValidFrom(const Aws::Utils::DateTime &value)
RequestSpotInstancesRequest & WithAvailabilityZoneGroup(Aws::String &&value)
virtual const char * GetServiceRequestName() const override
RequestSpotInstancesRequest & WithInstanceInterruptionBehavior(InstanceInterruptionBehavior &&value)
void SetTagSpecifications(Aws::Vector< TagSpecification > &&value)
RequestSpotInstancesRequest & WithSpotPrice(Aws::String &&value)
void SetValidUntil(const Aws::Utils::DateTime &value)
RequestSpotInstancesRequest & WithClientToken(const char *value)
RequestSpotInstancesRequest & WithLaunchSpecification(RequestSpotLaunchSpecification &&value)
RequestSpotInstancesRequest & WithValidUntil(const Aws::Utils::DateTime &value)
RequestSpotInstancesRequest & AddTagSpecifications(TagSpecification &&value)
RequestSpotInstancesRequest & WithClientToken(const Aws::String &value)
RequestSpotInstancesRequest & WithType(const SpotInstanceType &value)
RequestSpotInstancesRequest & WithLaunchGroup(const Aws::String &value)
RequestSpotInstancesRequest & WithLaunchGroup(Aws::String &&value)
void SetInstanceInterruptionBehavior(const InstanceInterruptionBehavior &value)
AWS_EC2_API Aws::String SerializePayload() const override
RequestSpotInstancesRequest & WithAvailabilityZoneGroup(const char *value)
RequestSpotInstancesRequest & WithSpotPrice(const char *value)
RequestSpotInstancesRequest & WithInstanceCount(int value)
RequestSpotInstancesRequest & WithLaunchSpecification(const RequestSpotLaunchSpecification &value)
const RequestSpotLaunchSpecification & GetLaunchSpecification() const
void SetLaunchSpecification(const RequestSpotLaunchSpecification &value)
RequestSpotInstancesRequest & WithTagSpecifications(Aws::Vector< TagSpecification > &&value)
RequestSpotInstancesRequest & WithInstanceInterruptionBehavior(const InstanceInterruptionBehavior &value)
RequestSpotInstancesRequest & WithAvailabilityZoneGroup(const Aws::String &value)
RequestSpotInstancesRequest & WithDryRun(bool value)
RequestSpotInstancesRequest & WithBlockDurationMinutes(int value)
RequestSpotInstancesRequest & WithLaunchGroup(const char *value)
RequestSpotInstancesRequest & WithTagSpecifications(const Aws::Vector< TagSpecification > &value)
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
void SetTagSpecifications(const Aws::Vector< TagSpecification > &value)
RequestSpotInstancesRequest & WithClientToken(Aws::String &&value)
RequestSpotInstancesRequest & AddTagSpecifications(const TagSpecification &value)
void SetLaunchSpecification(RequestSpotLaunchSpecification &&value)
void SetValidFrom(const Aws::Utils::DateTime &value)
RequestSpotInstancesRequest & WithType(SpotInstanceType &&value)
void SetInstanceInterruptionBehavior(InstanceInterruptionBehavior &&value)
RequestSpotInstancesRequest & WithSpotPrice(const Aws::String &value)
RequestSpotInstancesRequest & WithValidUntil(Aws::Utils::DateTime &&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