AWS SDK for C++

AWS SDK for C++ Version 1.11.816

Loading...
Searching...
No Matches
ComputeNodeGroup.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/pcs/PCS_EXPORTS.h>
11#include <aws/pcs/model/ComputeNodeGroupSlurmConfiguration.h>
12#include <aws/pcs/model/ComputeNodeGroupStatus.h>
13#include <aws/pcs/model/CustomLaunchTemplate.h>
14#include <aws/pcs/model/ErrorInfo.h>
15#include <aws/pcs/model/InstanceConfig.h>
16#include <aws/pcs/model/PurchaseOption.h>
17#include <aws/pcs/model/ScalingConfiguration.h>
18#include <aws/pcs/model/SpotOptions.h>
19
20#include <utility>
21
22namespace Aws {
23namespace Utils {
24namespace Json {
25class JsonValue;
26class JsonView;
27} // namespace Json
28} // namespace Utils
29namespace PCS {
30namespace Model {
31
38 public:
39 AWS_PCS_API ComputeNodeGroup() = default;
43
45
48 inline const Aws::String& GetName() const { return m_name; }
49 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
50 template <typename NameT = Aws::String>
51 void SetName(NameT&& value) {
52 m_nameHasBeenSet = true;
53 m_name = std::forward<NameT>(value);
54 }
55 template <typename NameT = Aws::String>
56 ComputeNodeGroup& WithName(NameT&& value) {
57 SetName(std::forward<NameT>(value));
58 return *this;
59 }
61
63
66 inline const Aws::String& GetId() const { return m_id; }
67 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
68 template <typename IdT = Aws::String>
69 void SetId(IdT&& value) {
70 m_idHasBeenSet = true;
71 m_id = std::forward<IdT>(value);
72 }
73 template <typename IdT = Aws::String>
74 ComputeNodeGroup& WithId(IdT&& value) {
75 SetId(std::forward<IdT>(value));
76 return *this;
77 }
79
81
84 inline const Aws::String& GetArn() const { return m_arn; }
85 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
86 template <typename ArnT = Aws::String>
87 void SetArn(ArnT&& value) {
88 m_arnHasBeenSet = true;
89 m_arn = std::forward<ArnT>(value);
90 }
91 template <typename ArnT = Aws::String>
92 ComputeNodeGroup& WithArn(ArnT&& value) {
93 SetArn(std::forward<ArnT>(value));
94 return *this;
95 }
97
99
102 inline const Aws::String& GetClusterId() const { return m_clusterId; }
103 inline bool ClusterIdHasBeenSet() const { return m_clusterIdHasBeenSet; }
104 template <typename ClusterIdT = Aws::String>
105 void SetClusterId(ClusterIdT&& value) {
106 m_clusterIdHasBeenSet = true;
107 m_clusterId = std::forward<ClusterIdT>(value);
108 }
109 template <typename ClusterIdT = Aws::String>
110 ComputeNodeGroup& WithClusterId(ClusterIdT&& value) {
111 SetClusterId(std::forward<ClusterIdT>(value));
112 return *this;
113 }
115
117
120 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
121 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
122 template <typename CreatedAtT = Aws::Utils::DateTime>
123 void SetCreatedAt(CreatedAtT&& value) {
124 m_createdAtHasBeenSet = true;
125 m_createdAt = std::forward<CreatedAtT>(value);
126 }
127 template <typename CreatedAtT = Aws::Utils::DateTime>
128 ComputeNodeGroup& WithCreatedAt(CreatedAtT&& value) {
129 SetCreatedAt(std::forward<CreatedAtT>(value));
130 return *this;
131 }
133
135
138 inline const Aws::Utils::DateTime& GetModifiedAt() const { return m_modifiedAt; }
139 inline bool ModifiedAtHasBeenSet() const { return m_modifiedAtHasBeenSet; }
140 template <typename ModifiedAtT = Aws::Utils::DateTime>
141 void SetModifiedAt(ModifiedAtT&& value) {
142 m_modifiedAtHasBeenSet = true;
143 m_modifiedAt = std::forward<ModifiedAtT>(value);
144 }
145 template <typename ModifiedAtT = Aws::Utils::DateTime>
146 ComputeNodeGroup& WithModifiedAt(ModifiedAtT&& value) {
147 SetModifiedAt(std::forward<ModifiedAtT>(value));
148 return *this;
149 }
151
153
167 inline ComputeNodeGroupStatus GetStatus() const { return m_status; }
168 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
170 m_statusHasBeenSet = true;
171 m_status = value;
172 }
174 SetStatus(value);
175 return *this;
176 }
178
180
185 inline const Aws::String& GetAmiId() const { return m_amiId; }
186 inline bool AmiIdHasBeenSet() const { return m_amiIdHasBeenSet; }
187 template <typename AmiIdT = Aws::String>
188 void SetAmiId(AmiIdT&& value) {
189 m_amiIdHasBeenSet = true;
190 m_amiId = std::forward<AmiIdT>(value);
191 }
192 template <typename AmiIdT = Aws::String>
193 ComputeNodeGroup& WithAmiId(AmiIdT&& value) {
194 SetAmiId(std::forward<AmiIdT>(value));
195 return *this;
196 }
198
200
204 inline const Aws::Vector<Aws::String>& GetSubnetIds() const { return m_subnetIds; }
205 inline bool SubnetIdsHasBeenSet() const { return m_subnetIdsHasBeenSet; }
206 template <typename SubnetIdsT = Aws::Vector<Aws::String>>
207 void SetSubnetIds(SubnetIdsT&& value) {
208 m_subnetIdsHasBeenSet = true;
209 m_subnetIds = std::forward<SubnetIdsT>(value);
210 }
211 template <typename SubnetIdsT = Aws::Vector<Aws::String>>
212 ComputeNodeGroup& WithSubnetIds(SubnetIdsT&& value) {
213 SetSubnetIds(std::forward<SubnetIdsT>(value));
214 return *this;
215 }
216 template <typename SubnetIdsT = Aws::String>
217 ComputeNodeGroup& AddSubnetIds(SubnetIdsT&& value) {
218 m_subnetIdsHasBeenSet = true;
219 m_subnetIds.emplace_back(std::forward<SubnetIdsT>(value));
220 return *this;
221 }
223
225
245 inline PurchaseOption GetPurchaseOption() const { return m_purchaseOption; }
246 inline bool PurchaseOptionHasBeenSet() const { return m_purchaseOptionHasBeenSet; }
248 m_purchaseOptionHasBeenSet = true;
249 m_purchaseOption = value;
250 }
252 SetPurchaseOption(value);
253 return *this;
254 }
256
258
259 inline const CustomLaunchTemplate& GetCustomLaunchTemplate() const { return m_customLaunchTemplate; }
260 inline bool CustomLaunchTemplateHasBeenSet() const { return m_customLaunchTemplateHasBeenSet; }
261 template <typename CustomLaunchTemplateT = CustomLaunchTemplate>
262 void SetCustomLaunchTemplate(CustomLaunchTemplateT&& value) {
263 m_customLaunchTemplateHasBeenSet = true;
264 m_customLaunchTemplate = std::forward<CustomLaunchTemplateT>(value);
265 }
266 template <typename CustomLaunchTemplateT = CustomLaunchTemplate>
267 ComputeNodeGroup& WithCustomLaunchTemplate(CustomLaunchTemplateT&& value) {
268 SetCustomLaunchTemplate(std::forward<CustomLaunchTemplateT>(value));
269 return *this;
270 }
272
274
283 inline const Aws::String& GetIamInstanceProfileArn() const { return m_iamInstanceProfileArn; }
284 inline bool IamInstanceProfileArnHasBeenSet() const { return m_iamInstanceProfileArnHasBeenSet; }
285 template <typename IamInstanceProfileArnT = Aws::String>
286 void SetIamInstanceProfileArn(IamInstanceProfileArnT&& value) {
287 m_iamInstanceProfileArnHasBeenSet = true;
288 m_iamInstanceProfileArn = std::forward<IamInstanceProfileArnT>(value);
289 }
290 template <typename IamInstanceProfileArnT = Aws::String>
291 ComputeNodeGroup& WithIamInstanceProfileArn(IamInstanceProfileArnT&& value) {
292 SetIamInstanceProfileArn(std::forward<IamInstanceProfileArnT>(value));
293 return *this;
294 }
296
298
299 inline const ScalingConfiguration& GetScalingConfiguration() const { return m_scalingConfiguration; }
300 inline bool ScalingConfigurationHasBeenSet() const { return m_scalingConfigurationHasBeenSet; }
301 template <typename ScalingConfigurationT = ScalingConfiguration>
302 void SetScalingConfiguration(ScalingConfigurationT&& value) {
303 m_scalingConfigurationHasBeenSet = true;
304 m_scalingConfiguration = std::forward<ScalingConfigurationT>(value);
305 }
306 template <typename ScalingConfigurationT = ScalingConfiguration>
307 ComputeNodeGroup& WithScalingConfiguration(ScalingConfigurationT&& value) {
308 SetScalingConfiguration(std::forward<ScalingConfigurationT>(value));
309 return *this;
310 }
312
314
318 inline const Aws::Vector<InstanceConfig>& GetInstanceConfigs() const { return m_instanceConfigs; }
319 inline bool InstanceConfigsHasBeenSet() const { return m_instanceConfigsHasBeenSet; }
320 template <typename InstanceConfigsT = Aws::Vector<InstanceConfig>>
321 void SetInstanceConfigs(InstanceConfigsT&& value) {
322 m_instanceConfigsHasBeenSet = true;
323 m_instanceConfigs = std::forward<InstanceConfigsT>(value);
324 }
325 template <typename InstanceConfigsT = Aws::Vector<InstanceConfig>>
326 ComputeNodeGroup& WithInstanceConfigs(InstanceConfigsT&& value) {
327 SetInstanceConfigs(std::forward<InstanceConfigsT>(value));
328 return *this;
329 }
330 template <typename InstanceConfigsT = InstanceConfig>
331 ComputeNodeGroup& AddInstanceConfigs(InstanceConfigsT&& value) {
332 m_instanceConfigsHasBeenSet = true;
333 m_instanceConfigs.emplace_back(std::forward<InstanceConfigsT>(value));
334 return *this;
335 }
337
339
340 inline const SpotOptions& GetSpotOptions() const { return m_spotOptions; }
341 inline bool SpotOptionsHasBeenSet() const { return m_spotOptionsHasBeenSet; }
342 template <typename SpotOptionsT = SpotOptions>
343 void SetSpotOptions(SpotOptionsT&& value) {
344 m_spotOptionsHasBeenSet = true;
345 m_spotOptions = std::forward<SpotOptionsT>(value);
346 }
347 template <typename SpotOptionsT = SpotOptions>
348 ComputeNodeGroup& WithSpotOptions(SpotOptionsT&& value) {
349 SetSpotOptions(std::forward<SpotOptionsT>(value));
350 return *this;
351 }
353
355
356 inline const ComputeNodeGroupSlurmConfiguration& GetSlurmConfiguration() const { return m_slurmConfiguration; }
357 inline bool SlurmConfigurationHasBeenSet() const { return m_slurmConfigurationHasBeenSet; }
358 template <typename SlurmConfigurationT = ComputeNodeGroupSlurmConfiguration>
359 void SetSlurmConfiguration(SlurmConfigurationT&& value) {
360 m_slurmConfigurationHasBeenSet = true;
361 m_slurmConfiguration = std::forward<SlurmConfigurationT>(value);
362 }
363 template <typename SlurmConfigurationT = ComputeNodeGroupSlurmConfiguration>
364 ComputeNodeGroup& WithSlurmConfiguration(SlurmConfigurationT&& value) {
365 SetSlurmConfiguration(std::forward<SlurmConfigurationT>(value));
366 return *this;
367 }
369
371
374 inline const Aws::Vector<ErrorInfo>& GetErrorInfo() const { return m_errorInfo; }
375 inline bool ErrorInfoHasBeenSet() const { return m_errorInfoHasBeenSet; }
376 template <typename ErrorInfoT = Aws::Vector<ErrorInfo>>
377 void SetErrorInfo(ErrorInfoT&& value) {
378 m_errorInfoHasBeenSet = true;
379 m_errorInfo = std::forward<ErrorInfoT>(value);
380 }
381 template <typename ErrorInfoT = Aws::Vector<ErrorInfo>>
382 ComputeNodeGroup& WithErrorInfo(ErrorInfoT&& value) {
383 SetErrorInfo(std::forward<ErrorInfoT>(value));
384 return *this;
385 }
386 template <typename ErrorInfoT = ErrorInfo>
387 ComputeNodeGroup& AddErrorInfo(ErrorInfoT&& value) {
388 m_errorInfoHasBeenSet = true;
389 m_errorInfo.emplace_back(std::forward<ErrorInfoT>(value));
390 return *this;
391 }
393 private:
394 Aws::String m_name;
395
396 Aws::String m_id;
397
398 Aws::String m_arn;
399
400 Aws::String m_clusterId;
401
402 Aws::Utils::DateTime m_createdAt{};
403
404 Aws::Utils::DateTime m_modifiedAt{};
405
407
408 Aws::String m_amiId;
409
410 Aws::Vector<Aws::String> m_subnetIds;
411
412 PurchaseOption m_purchaseOption{PurchaseOption::NOT_SET};
413
414 CustomLaunchTemplate m_customLaunchTemplate;
415
416 Aws::String m_iamInstanceProfileArn;
417
418 ScalingConfiguration m_scalingConfiguration;
419
420 Aws::Vector<InstanceConfig> m_instanceConfigs;
421
422 SpotOptions m_spotOptions;
423
424 ComputeNodeGroupSlurmConfiguration m_slurmConfiguration;
425
426 Aws::Vector<ErrorInfo> m_errorInfo;
427 bool m_nameHasBeenSet = false;
428 bool m_idHasBeenSet = false;
429 bool m_arnHasBeenSet = false;
430 bool m_clusterIdHasBeenSet = false;
431 bool m_createdAtHasBeenSet = false;
432 bool m_modifiedAtHasBeenSet = false;
433 bool m_statusHasBeenSet = false;
434 bool m_amiIdHasBeenSet = false;
435 bool m_subnetIdsHasBeenSet = false;
436 bool m_purchaseOptionHasBeenSet = false;
437 bool m_customLaunchTemplateHasBeenSet = false;
438 bool m_iamInstanceProfileArnHasBeenSet = false;
439 bool m_scalingConfigurationHasBeenSet = false;
440 bool m_instanceConfigsHasBeenSet = false;
441 bool m_spotOptionsHasBeenSet = false;
442 bool m_slurmConfigurationHasBeenSet = false;
443 bool m_errorInfoHasBeenSet = false;
444};
445
446} // namespace Model
447} // namespace PCS
448} // namespace Aws
ComputeNodeGroup & AddSubnetIds(SubnetIdsT &&value)
ComputeNodeGroupStatus GetStatus() const
void SetScalingConfiguration(ScalingConfigurationT &&value)
const Aws::Utils::DateTime & GetCreatedAt() const
ComputeNodeGroup & WithPurchaseOption(PurchaseOption value)
const Aws::String & GetIamInstanceProfileArn() const
void SetPurchaseOption(PurchaseOption value)
const ComputeNodeGroupSlurmConfiguration & GetSlurmConfiguration() const
const Aws::Vector< ErrorInfo > & GetErrorInfo() const
const Aws::String & GetId() const
ComputeNodeGroup & WithClusterId(ClusterIdT &&value)
const Aws::String & GetClusterId() const
void SetErrorInfo(ErrorInfoT &&value)
const Aws::Vector< Aws::String > & GetSubnetIds() const
const SpotOptions & GetSpotOptions() const
ComputeNodeGroup & WithCustomLaunchTemplate(CustomLaunchTemplateT &&value)
ComputeNodeGroup & WithAmiId(AmiIdT &&value)
ComputeNodeGroup & WithSpotOptions(SpotOptionsT &&value)
ComputeNodeGroup & WithName(NameT &&value)
AWS_PCS_API ComputeNodeGroup()=default
void SetModifiedAt(ModifiedAtT &&value)
ComputeNodeGroup & WithInstanceConfigs(InstanceConfigsT &&value)
void SetStatus(ComputeNodeGroupStatus value)
ComputeNodeGroup & WithId(IdT &&value)
ComputeNodeGroup & WithModifiedAt(ModifiedAtT &&value)
void SetClusterId(ClusterIdT &&value)
AWS_PCS_API Aws::Utils::Json::JsonValue Jsonize() const
void SetSubnetIds(SubnetIdsT &&value)
void SetCustomLaunchTemplate(CustomLaunchTemplateT &&value)
ComputeNodeGroup & WithIamInstanceProfileArn(IamInstanceProfileArnT &&value)
ComputeNodeGroup & WithArn(ArnT &&value)
ComputeNodeGroup & WithSubnetIds(SubnetIdsT &&value)
const Aws::String & GetAmiId() const
ComputeNodeGroup & WithCreatedAt(CreatedAtT &&value)
const Aws::Utils::DateTime & GetModifiedAt() const
PurchaseOption GetPurchaseOption() const
const Aws::Vector< InstanceConfig > & GetInstanceConfigs() const
ComputeNodeGroup & WithStatus(ComputeNodeGroupStatus value)
void SetSlurmConfiguration(SlurmConfigurationT &&value)
const Aws::String & GetArn() const
ComputeNodeGroup & AddInstanceConfigs(InstanceConfigsT &&value)
ComputeNodeGroup & WithScalingConfiguration(ScalingConfigurationT &&value)
ComputeNodeGroup & WithSlurmConfiguration(SlurmConfigurationT &&value)
const Aws::String & GetName() const
void SetInstanceConfigs(InstanceConfigsT &&value)
void SetCreatedAt(CreatedAtT &&value)
const CustomLaunchTemplate & GetCustomLaunchTemplate() const
void SetSpotOptions(SpotOptionsT &&value)
ComputeNodeGroup & WithErrorInfo(ErrorInfoT &&value)
void SetIamInstanceProfileArn(IamInstanceProfileArnT &&value)
AWS_PCS_API ComputeNodeGroup & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_PCS_API ComputeNodeGroup(Aws::Utils::Json::JsonView jsonValue)
const ScalingConfiguration & GetScalingConfiguration() const
ComputeNodeGroup & AddErrorInfo(ErrorInfoT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue