AWS SDK for C++

AWS SDK for C++ Version 1.11.743

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
237 inline PurchaseOption GetPurchaseOption() const { return m_purchaseOption; }
238 inline bool PurchaseOptionHasBeenSet() const { return m_purchaseOptionHasBeenSet; }
240 m_purchaseOptionHasBeenSet = true;
241 m_purchaseOption = value;
242 }
244 SetPurchaseOption(value);
245 return *this;
246 }
248
250
251 inline const CustomLaunchTemplate& GetCustomLaunchTemplate() const { return m_customLaunchTemplate; }
252 inline bool CustomLaunchTemplateHasBeenSet() const { return m_customLaunchTemplateHasBeenSet; }
253 template <typename CustomLaunchTemplateT = CustomLaunchTemplate>
254 void SetCustomLaunchTemplate(CustomLaunchTemplateT&& value) {
255 m_customLaunchTemplateHasBeenSet = true;
256 m_customLaunchTemplate = std::forward<CustomLaunchTemplateT>(value);
257 }
258 template <typename CustomLaunchTemplateT = CustomLaunchTemplate>
259 ComputeNodeGroup& WithCustomLaunchTemplate(CustomLaunchTemplateT&& value) {
260 SetCustomLaunchTemplate(std::forward<CustomLaunchTemplateT>(value));
261 return *this;
262 }
264
266
275 inline const Aws::String& GetIamInstanceProfileArn() const { return m_iamInstanceProfileArn; }
276 inline bool IamInstanceProfileArnHasBeenSet() const { return m_iamInstanceProfileArnHasBeenSet; }
277 template <typename IamInstanceProfileArnT = Aws::String>
278 void SetIamInstanceProfileArn(IamInstanceProfileArnT&& value) {
279 m_iamInstanceProfileArnHasBeenSet = true;
280 m_iamInstanceProfileArn = std::forward<IamInstanceProfileArnT>(value);
281 }
282 template <typename IamInstanceProfileArnT = Aws::String>
283 ComputeNodeGroup& WithIamInstanceProfileArn(IamInstanceProfileArnT&& value) {
284 SetIamInstanceProfileArn(std::forward<IamInstanceProfileArnT>(value));
285 return *this;
286 }
288
290
291 inline const ScalingConfiguration& GetScalingConfiguration() const { return m_scalingConfiguration; }
292 inline bool ScalingConfigurationHasBeenSet() const { return m_scalingConfigurationHasBeenSet; }
293 template <typename ScalingConfigurationT = ScalingConfiguration>
294 void SetScalingConfiguration(ScalingConfigurationT&& value) {
295 m_scalingConfigurationHasBeenSet = true;
296 m_scalingConfiguration = std::forward<ScalingConfigurationT>(value);
297 }
298 template <typename ScalingConfigurationT = ScalingConfiguration>
299 ComputeNodeGroup& WithScalingConfiguration(ScalingConfigurationT&& value) {
300 SetScalingConfiguration(std::forward<ScalingConfigurationT>(value));
301 return *this;
302 }
304
306
310 inline const Aws::Vector<InstanceConfig>& GetInstanceConfigs() const { return m_instanceConfigs; }
311 inline bool InstanceConfigsHasBeenSet() const { return m_instanceConfigsHasBeenSet; }
312 template <typename InstanceConfigsT = Aws::Vector<InstanceConfig>>
313 void SetInstanceConfigs(InstanceConfigsT&& value) {
314 m_instanceConfigsHasBeenSet = true;
315 m_instanceConfigs = std::forward<InstanceConfigsT>(value);
316 }
317 template <typename InstanceConfigsT = Aws::Vector<InstanceConfig>>
318 ComputeNodeGroup& WithInstanceConfigs(InstanceConfigsT&& value) {
319 SetInstanceConfigs(std::forward<InstanceConfigsT>(value));
320 return *this;
321 }
322 template <typename InstanceConfigsT = InstanceConfig>
323 ComputeNodeGroup& AddInstanceConfigs(InstanceConfigsT&& value) {
324 m_instanceConfigsHasBeenSet = true;
325 m_instanceConfigs.emplace_back(std::forward<InstanceConfigsT>(value));
326 return *this;
327 }
329
331
332 inline const SpotOptions& GetSpotOptions() const { return m_spotOptions; }
333 inline bool SpotOptionsHasBeenSet() const { return m_spotOptionsHasBeenSet; }
334 template <typename SpotOptionsT = SpotOptions>
335 void SetSpotOptions(SpotOptionsT&& value) {
336 m_spotOptionsHasBeenSet = true;
337 m_spotOptions = std::forward<SpotOptionsT>(value);
338 }
339 template <typename SpotOptionsT = SpotOptions>
340 ComputeNodeGroup& WithSpotOptions(SpotOptionsT&& value) {
341 SetSpotOptions(std::forward<SpotOptionsT>(value));
342 return *this;
343 }
345
347
348 inline const ComputeNodeGroupSlurmConfiguration& GetSlurmConfiguration() const { return m_slurmConfiguration; }
349 inline bool SlurmConfigurationHasBeenSet() const { return m_slurmConfigurationHasBeenSet; }
350 template <typename SlurmConfigurationT = ComputeNodeGroupSlurmConfiguration>
351 void SetSlurmConfiguration(SlurmConfigurationT&& value) {
352 m_slurmConfigurationHasBeenSet = true;
353 m_slurmConfiguration = std::forward<SlurmConfigurationT>(value);
354 }
355 template <typename SlurmConfigurationT = ComputeNodeGroupSlurmConfiguration>
356 ComputeNodeGroup& WithSlurmConfiguration(SlurmConfigurationT&& value) {
357 SetSlurmConfiguration(std::forward<SlurmConfigurationT>(value));
358 return *this;
359 }
361
363
366 inline const Aws::Vector<ErrorInfo>& GetErrorInfo() const { return m_errorInfo; }
367 inline bool ErrorInfoHasBeenSet() const { return m_errorInfoHasBeenSet; }
368 template <typename ErrorInfoT = Aws::Vector<ErrorInfo>>
369 void SetErrorInfo(ErrorInfoT&& value) {
370 m_errorInfoHasBeenSet = true;
371 m_errorInfo = std::forward<ErrorInfoT>(value);
372 }
373 template <typename ErrorInfoT = Aws::Vector<ErrorInfo>>
374 ComputeNodeGroup& WithErrorInfo(ErrorInfoT&& value) {
375 SetErrorInfo(std::forward<ErrorInfoT>(value));
376 return *this;
377 }
378 template <typename ErrorInfoT = ErrorInfo>
379 ComputeNodeGroup& AddErrorInfo(ErrorInfoT&& value) {
380 m_errorInfoHasBeenSet = true;
381 m_errorInfo.emplace_back(std::forward<ErrorInfoT>(value));
382 return *this;
383 }
385 private:
386 Aws::String m_name;
387
388 Aws::String m_id;
389
390 Aws::String m_arn;
391
392 Aws::String m_clusterId;
393
394 Aws::Utils::DateTime m_createdAt{};
395
396 Aws::Utils::DateTime m_modifiedAt{};
397
399
400 Aws::String m_amiId;
401
402 Aws::Vector<Aws::String> m_subnetIds;
403
404 PurchaseOption m_purchaseOption{PurchaseOption::NOT_SET};
405
406 CustomLaunchTemplate m_customLaunchTemplate;
407
408 Aws::String m_iamInstanceProfileArn;
409
410 ScalingConfiguration m_scalingConfiguration;
411
412 Aws::Vector<InstanceConfig> m_instanceConfigs;
413
414 SpotOptions m_spotOptions;
415
416 ComputeNodeGroupSlurmConfiguration m_slurmConfiguration;
417
418 Aws::Vector<ErrorInfo> m_errorInfo;
419 bool m_nameHasBeenSet = false;
420 bool m_idHasBeenSet = false;
421 bool m_arnHasBeenSet = false;
422 bool m_clusterIdHasBeenSet = false;
423 bool m_createdAtHasBeenSet = false;
424 bool m_modifiedAtHasBeenSet = false;
425 bool m_statusHasBeenSet = false;
426 bool m_amiIdHasBeenSet = false;
427 bool m_subnetIdsHasBeenSet = false;
428 bool m_purchaseOptionHasBeenSet = false;
429 bool m_customLaunchTemplateHasBeenSet = false;
430 bool m_iamInstanceProfileArnHasBeenSet = false;
431 bool m_scalingConfigurationHasBeenSet = false;
432 bool m_instanceConfigsHasBeenSet = false;
433 bool m_spotOptionsHasBeenSet = false;
434 bool m_slurmConfigurationHasBeenSet = false;
435 bool m_errorInfoHasBeenSet = false;
436};
437
438} // namespace Model
439} // namespace PCS
440} // 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