AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
CreateFleetRequest.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/ec2/EC2Request.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/ec2/model/SpotOptionsRequest.h>
11#include <aws/ec2/model/OnDemandOptionsRequest.h>
12#include <aws/ec2/model/FleetExcessCapacityTerminationPolicy.h>
13#include <aws/core/utils/memory/stl/AWSVector.h>
14#include <aws/ec2/model/TargetCapacitySpecificationRequest.h>
15#include <aws/ec2/model/FleetType.h>
16#include <aws/core/utils/DateTime.h>
17#include <aws/ec2/model/FleetLaunchTemplateConfigRequest.h>
18#include <aws/ec2/model/TagSpecification.h>
19#include <utility>
20
21namespace Aws
22{
23namespace EC2
24{
25namespace Model
26{
27
31 {
32 public:
33 AWS_EC2_API CreateFleetRequest();
34
35 // Service request name is the Operation name which will send this request out,
36 // each operation should has unique request name, so that we can get operation's name from this request.
37 // Note: this is not true for response, multiple operations may have the same response name,
38 // so we can not get operation's name from response.
39 inline virtual const char* GetServiceRequestName() const override { return "CreateFleet"; }
40
41 AWS_EC2_API Aws::String SerializePayload() const override;
42
43 protected:
44 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
45
46 public:
47
49
55 inline bool GetDryRun() const{ return m_dryRun; }
56 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
57 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
58 inline CreateFleetRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
60
62
68 inline const Aws::String& GetClientToken() const{ return m_clientToken; }
69 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
70 inline void SetClientToken(const Aws::String& value) { m_clientTokenHasBeenSet = true; m_clientToken = value; }
71 inline void SetClientToken(Aws::String&& value) { m_clientTokenHasBeenSet = true; m_clientToken = std::move(value); }
72 inline void SetClientToken(const char* value) { m_clientTokenHasBeenSet = true; m_clientToken.assign(value); }
73 inline CreateFleetRequest& WithClientToken(const Aws::String& value) { SetClientToken(value); return *this;}
74 inline CreateFleetRequest& WithClientToken(Aws::String&& value) { SetClientToken(std::move(value)); return *this;}
75 inline CreateFleetRequest& WithClientToken(const char* value) { SetClientToken(value); return *this;}
77
79
82 inline const SpotOptionsRequest& GetSpotOptions() const{ return m_spotOptions; }
83 inline bool SpotOptionsHasBeenSet() const { return m_spotOptionsHasBeenSet; }
84 inline void SetSpotOptions(const SpotOptionsRequest& value) { m_spotOptionsHasBeenSet = true; m_spotOptions = value; }
85 inline void SetSpotOptions(SpotOptionsRequest&& value) { m_spotOptionsHasBeenSet = true; m_spotOptions = std::move(value); }
86 inline CreateFleetRequest& WithSpotOptions(const SpotOptionsRequest& value) { SetSpotOptions(value); return *this;}
87 inline CreateFleetRequest& WithSpotOptions(SpotOptionsRequest&& value) { SetSpotOptions(std::move(value)); return *this;}
89
91
94 inline const OnDemandOptionsRequest& GetOnDemandOptions() const{ return m_onDemandOptions; }
95 inline bool OnDemandOptionsHasBeenSet() const { return m_onDemandOptionsHasBeenSet; }
96 inline void SetOnDemandOptions(const OnDemandOptionsRequest& value) { m_onDemandOptionsHasBeenSet = true; m_onDemandOptions = value; }
97 inline void SetOnDemandOptions(OnDemandOptionsRequest&& value) { m_onDemandOptionsHasBeenSet = true; m_onDemandOptions = std::move(value); }
99 inline CreateFleetRequest& WithOnDemandOptions(OnDemandOptionsRequest&& value) { SetOnDemandOptions(std::move(value)); return *this;}
101
103
108 inline const FleetExcessCapacityTerminationPolicy& GetExcessCapacityTerminationPolicy() const{ return m_excessCapacityTerminationPolicy; }
109 inline bool ExcessCapacityTerminationPolicyHasBeenSet() const { return m_excessCapacityTerminationPolicyHasBeenSet; }
110 inline void SetExcessCapacityTerminationPolicy(const FleetExcessCapacityTerminationPolicy& value) { m_excessCapacityTerminationPolicyHasBeenSet = true; m_excessCapacityTerminationPolicy = value; }
111 inline void SetExcessCapacityTerminationPolicy(FleetExcessCapacityTerminationPolicy&& value) { m_excessCapacityTerminationPolicyHasBeenSet = true; m_excessCapacityTerminationPolicy = std::move(value); }
115
117
120 inline const Aws::Vector<FleetLaunchTemplateConfigRequest>& GetLaunchTemplateConfigs() const{ return m_launchTemplateConfigs; }
121 inline bool LaunchTemplateConfigsHasBeenSet() const { return m_launchTemplateConfigsHasBeenSet; }
122 inline void SetLaunchTemplateConfigs(const Aws::Vector<FleetLaunchTemplateConfigRequest>& value) { m_launchTemplateConfigsHasBeenSet = true; m_launchTemplateConfigs = value; }
123 inline void SetLaunchTemplateConfigs(Aws::Vector<FleetLaunchTemplateConfigRequest>&& value) { m_launchTemplateConfigsHasBeenSet = true; m_launchTemplateConfigs = std::move(value); }
126 inline CreateFleetRequest& AddLaunchTemplateConfigs(const FleetLaunchTemplateConfigRequest& value) { m_launchTemplateConfigsHasBeenSet = true; m_launchTemplateConfigs.push_back(value); return *this; }
127 inline CreateFleetRequest& AddLaunchTemplateConfigs(FleetLaunchTemplateConfigRequest&& value) { m_launchTemplateConfigsHasBeenSet = true; m_launchTemplateConfigs.push_back(std::move(value)); return *this; }
129
131
134 inline const TargetCapacitySpecificationRequest& GetTargetCapacitySpecification() const{ return m_targetCapacitySpecification; }
135 inline bool TargetCapacitySpecificationHasBeenSet() const { return m_targetCapacitySpecificationHasBeenSet; }
136 inline void SetTargetCapacitySpecification(const TargetCapacitySpecificationRequest& value) { m_targetCapacitySpecificationHasBeenSet = true; m_targetCapacitySpecification = value; }
137 inline void SetTargetCapacitySpecification(TargetCapacitySpecificationRequest&& value) { m_targetCapacitySpecificationHasBeenSet = true; m_targetCapacitySpecification = std::move(value); }
141
143
147 inline bool GetTerminateInstancesWithExpiration() const{ return m_terminateInstancesWithExpiration; }
148 inline bool TerminateInstancesWithExpirationHasBeenSet() const { return m_terminateInstancesWithExpirationHasBeenSet; }
149 inline void SetTerminateInstancesWithExpiration(bool value) { m_terminateInstancesWithExpirationHasBeenSet = true; m_terminateInstancesWithExpiration = value; }
152
154
169 inline const FleetType& GetType() const{ return m_type; }
170 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
171 inline void SetType(const FleetType& value) { m_typeHasBeenSet = true; m_type = value; }
172 inline void SetType(FleetType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); }
173 inline CreateFleetRequest& WithType(const FleetType& value) { SetType(value); return *this;}
174 inline CreateFleetRequest& WithType(FleetType&& value) { SetType(std::move(value)); return *this;}
176
178
183 inline const Aws::Utils::DateTime& GetValidFrom() const{ return m_validFrom; }
184 inline bool ValidFromHasBeenSet() const { return m_validFromHasBeenSet; }
185 inline void SetValidFrom(const Aws::Utils::DateTime& value) { m_validFromHasBeenSet = true; m_validFrom = value; }
186 inline void SetValidFrom(Aws::Utils::DateTime&& value) { m_validFromHasBeenSet = true; m_validFrom = std::move(value); }
187 inline CreateFleetRequest& WithValidFrom(const Aws::Utils::DateTime& value) { SetValidFrom(value); return *this;}
188 inline CreateFleetRequest& WithValidFrom(Aws::Utils::DateTime&& value) { SetValidFrom(std::move(value)); return *this;}
190
192
198 inline const Aws::Utils::DateTime& GetValidUntil() const{ return m_validUntil; }
199 inline bool ValidUntilHasBeenSet() const { return m_validUntilHasBeenSet; }
200 inline void SetValidUntil(const Aws::Utils::DateTime& value) { m_validUntilHasBeenSet = true; m_validUntil = value; }
201 inline void SetValidUntil(Aws::Utils::DateTime&& value) { m_validUntilHasBeenSet = true; m_validUntil = std::move(value); }
202 inline CreateFleetRequest& WithValidUntil(const Aws::Utils::DateTime& value) { SetValidUntil(value); return *this;}
203 inline CreateFleetRequest& WithValidUntil(Aws::Utils::DateTime&& value) { SetValidUntil(std::move(value)); return *this;}
205
207
214 inline bool GetReplaceUnhealthyInstances() const{ return m_replaceUnhealthyInstances; }
215 inline bool ReplaceUnhealthyInstancesHasBeenSet() const { return m_replaceUnhealthyInstancesHasBeenSet; }
216 inline void SetReplaceUnhealthyInstances(bool value) { m_replaceUnhealthyInstancesHasBeenSet = true; m_replaceUnhealthyInstances = value; }
219
221
234 inline const Aws::Vector<TagSpecification>& GetTagSpecifications() const{ return m_tagSpecifications; }
235 inline bool TagSpecificationsHasBeenSet() const { return m_tagSpecificationsHasBeenSet; }
236 inline void SetTagSpecifications(const Aws::Vector<TagSpecification>& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = value; }
237 inline void SetTagSpecifications(Aws::Vector<TagSpecification>&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications = std::move(value); }
240 inline CreateFleetRequest& AddTagSpecifications(const TagSpecification& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(value); return *this; }
241 inline CreateFleetRequest& AddTagSpecifications(TagSpecification&& value) { m_tagSpecificationsHasBeenSet = true; m_tagSpecifications.push_back(std::move(value)); return *this; }
243
245
248 inline const Aws::String& GetContext() const{ return m_context; }
249 inline bool ContextHasBeenSet() const { return m_contextHasBeenSet; }
250 inline void SetContext(const Aws::String& value) { m_contextHasBeenSet = true; m_context = value; }
251 inline void SetContext(Aws::String&& value) { m_contextHasBeenSet = true; m_context = std::move(value); }
252 inline void SetContext(const char* value) { m_contextHasBeenSet = true; m_context.assign(value); }
253 inline CreateFleetRequest& WithContext(const Aws::String& value) { SetContext(value); return *this;}
254 inline CreateFleetRequest& WithContext(Aws::String&& value) { SetContext(std::move(value)); return *this;}
255 inline CreateFleetRequest& WithContext(const char* value) { SetContext(value); return *this;}
257 private:
258
259 bool m_dryRun;
260 bool m_dryRunHasBeenSet = false;
261
262 Aws::String m_clientToken;
263 bool m_clientTokenHasBeenSet = false;
264
265 SpotOptionsRequest m_spotOptions;
266 bool m_spotOptionsHasBeenSet = false;
267
268 OnDemandOptionsRequest m_onDemandOptions;
269 bool m_onDemandOptionsHasBeenSet = false;
270
271 FleetExcessCapacityTerminationPolicy m_excessCapacityTerminationPolicy;
272 bool m_excessCapacityTerminationPolicyHasBeenSet = false;
273
274 Aws::Vector<FleetLaunchTemplateConfigRequest> m_launchTemplateConfigs;
275 bool m_launchTemplateConfigsHasBeenSet = false;
276
277 TargetCapacitySpecificationRequest m_targetCapacitySpecification;
278 bool m_targetCapacitySpecificationHasBeenSet = false;
279
280 bool m_terminateInstancesWithExpiration;
281 bool m_terminateInstancesWithExpirationHasBeenSet = false;
282
283 FleetType m_type;
284 bool m_typeHasBeenSet = false;
285
286 Aws::Utils::DateTime m_validFrom;
287 bool m_validFromHasBeenSet = false;
288
289 Aws::Utils::DateTime m_validUntil;
290 bool m_validUntilHasBeenSet = false;
291
292 bool m_replaceUnhealthyInstances;
293 bool m_replaceUnhealthyInstancesHasBeenSet = false;
294
295 Aws::Vector<TagSpecification> m_tagSpecifications;
296 bool m_tagSpecificationsHasBeenSet = false;
297
298 Aws::String m_context;
299 bool m_contextHasBeenSet = false;
300 };
301
302} // namespace Model
303} // namespace EC2
304} // namespace Aws
const Aws::Utils::DateTime & GetValidFrom() const
const Aws::String & GetContext() const
CreateFleetRequest & WithExcessCapacityTerminationPolicy(const FleetExcessCapacityTerminationPolicy &value)
void SetSpotOptions(SpotOptionsRequest &&value)
void SetTargetCapacitySpecification(TargetCapacitySpecificationRequest &&value)
const Aws::String & GetClientToken() const
CreateFleetRequest & WithOnDemandOptions(OnDemandOptionsRequest &&value)
virtual const char * GetServiceRequestName() const override
const FleetExcessCapacityTerminationPolicy & GetExcessCapacityTerminationPolicy() const
CreateFleetRequest & WithValidFrom(Aws::Utils::DateTime &&value)
CreateFleetRequest & AddLaunchTemplateConfigs(FleetLaunchTemplateConfigRequest &&value)
CreateFleetRequest & WithValidUntil(const Aws::Utils::DateTime &value)
void SetLaunchTemplateConfigs(Aws::Vector< FleetLaunchTemplateConfigRequest > &&value)
void SetValidFrom(Aws::Utils::DateTime &&value)
void SetValidFrom(const Aws::Utils::DateTime &value)
CreateFleetRequest & WithSpotOptions(const SpotOptionsRequest &value)
CreateFleetRequest & AddTagSpecifications(const TagSpecification &value)
void SetValidUntil(const Aws::Utils::DateTime &value)
CreateFleetRequest & AddTagSpecifications(TagSpecification &&value)
void SetTagSpecifications(const Aws::Vector< TagSpecification > &value)
CreateFleetRequest & WithContext(const char *value)
CreateFleetRequest & WithOnDemandOptions(const OnDemandOptionsRequest &value)
CreateFleetRequest & WithExcessCapacityTerminationPolicy(FleetExcessCapacityTerminationPolicy &&value)
CreateFleetRequest & WithType(FleetType &&value)
void SetExcessCapacityTerminationPolicy(FleetExcessCapacityTerminationPolicy &&value)
CreateFleetRequest & WithSpotOptions(SpotOptionsRequest &&value)
const Aws::Vector< FleetLaunchTemplateConfigRequest > & GetLaunchTemplateConfigs() const
const TargetCapacitySpecificationRequest & GetTargetCapacitySpecification() const
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
void SetContext(const Aws::String &value)
CreateFleetRequest & WithDryRun(bool value)
CreateFleetRequest & WithTargetCapacitySpecification(const TargetCapacitySpecificationRequest &value)
CreateFleetRequest & WithTargetCapacitySpecification(TargetCapacitySpecificationRequest &&value)
CreateFleetRequest & WithContext(const Aws::String &value)
const SpotOptionsRequest & GetSpotOptions() const
CreateFleetRequest & AddLaunchTemplateConfigs(const FleetLaunchTemplateConfigRequest &value)
CreateFleetRequest & WithReplaceUnhealthyInstances(bool value)
CreateFleetRequest & WithType(const FleetType &value)
CreateFleetRequest & WithValidFrom(const Aws::Utils::DateTime &value)
void SetOnDemandOptions(OnDemandOptionsRequest &&value)
CreateFleetRequest & WithClientToken(const char *value)
CreateFleetRequest & WithLaunchTemplateConfigs(const Aws::Vector< FleetLaunchTemplateConfigRequest > &value)
void SetTagSpecifications(Aws::Vector< TagSpecification > &&value)
void SetTargetCapacitySpecification(const TargetCapacitySpecificationRequest &value)
void SetClientToken(const Aws::String &value)
CreateFleetRequest & WithContext(Aws::String &&value)
void SetSpotOptions(const SpotOptionsRequest &value)
CreateFleetRequest & WithValidUntil(Aws::Utils::DateTime &&value)
void SetExcessCapacityTerminationPolicy(const FleetExcessCapacityTerminationPolicy &value)
AWS_EC2_API Aws::String SerializePayload() const override
void SetValidUntil(Aws::Utils::DateTime &&value)
void SetClientToken(Aws::String &&value)
CreateFleetRequest & WithClientToken(Aws::String &&value)
const Aws::Vector< TagSpecification > & GetTagSpecifications() const
CreateFleetRequest & WithTagSpecifications(Aws::Vector< TagSpecification > &&value)
void SetType(const FleetType &value)
const Aws::Utils::DateTime & GetValidUntil() const
CreateFleetRequest & WithTerminateInstancesWithExpiration(bool value)
CreateFleetRequest & WithTagSpecifications(const Aws::Vector< TagSpecification > &value)
void SetLaunchTemplateConfigs(const Aws::Vector< FleetLaunchTemplateConfigRequest > &value)
const OnDemandOptionsRequest & GetOnDemandOptions() const
CreateFleetRequest & WithClientToken(const Aws::String &value)
CreateFleetRequest & WithLaunchTemplateConfigs(Aws::Vector< FleetLaunchTemplateConfigRequest > &&value)
void SetOnDemandOptions(const OnDemandOptionsRequest &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector