AWS SDK for C++

AWS SDK for C++ Version 1.11.927

Loading...
Searching...
No Matches
CreateComputeNodeGroupRequest.h
1
6#pragma once
7#include <aws/core/utils/UUID.h>
8#include <aws/core/utils/memory/stl/AWSMap.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/pcs/PCSRequest.h>
12#include <aws/pcs/PCS_EXPORTS.h>
13#include <aws/pcs/model/ComputeNodeGroupSlurmConfigurationRequest.h>
14#include <aws/pcs/model/CustomLaunchTemplate.h>
15#include <aws/pcs/model/InstanceConfig.h>
16#include <aws/pcs/model/LaunchTemplateMode.h>
17#include <aws/pcs/model/NodeLifecycleActionsRequest.h>
18#include <aws/pcs/model/PurchaseOption.h>
19#include <aws/pcs/model/ScalingConfigurationRequest.h>
20#include <aws/pcs/model/SpotOptions.h>
21
22#include <utility>
23
24namespace Aws {
25namespace PCS {
26namespace Model {
27
31 public:
32 AWS_PCS_API CreateComputeNodeGroupRequest() = default;
33
34 // Service request name is the Operation name which will send this request out,
35 // each operation should has unique request name, so that we can get operation's name from this request.
36 // Note: this is not true for response, multiple operations may have the same response name,
37 // so we can not get operation's name from response.
38 inline virtual const char* GetServiceRequestName() const override { return "CreateComputeNodeGroup"; }
39
40 AWS_PCS_API Aws::String SerializePayload() const override;
41
43
45
52 inline const Aws::String& GetAmiId() const { return m_amiId; }
53 inline bool AmiIdHasBeenSet() const { return m_amiIdHasBeenSet; }
54 template <typename AmiIdT = Aws::String>
55 void SetAmiId(AmiIdT&& value) {
56 m_amiIdHasBeenSet = true;
57 m_amiId = std::forward<AmiIdT>(value);
58 }
59 template <typename AmiIdT = Aws::String>
61 SetAmiId(std::forward<AmiIdT>(value));
62 return *this;
63 }
65
67
80 inline const Aws::Vector<Aws::String>& GetSecurityGroupIds() const { return m_securityGroupIds; }
81 inline bool SecurityGroupIdsHasBeenSet() const { return m_securityGroupIdsHasBeenSet; }
82 template <typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
83 void SetSecurityGroupIds(SecurityGroupIdsT&& value) {
84 m_securityGroupIdsHasBeenSet = true;
85 m_securityGroupIds = std::forward<SecurityGroupIdsT>(value);
86 }
87 template <typename SecurityGroupIdsT = Aws::Vector<Aws::String>>
89 SetSecurityGroupIds(std::forward<SecurityGroupIdsT>(value));
90 return *this;
91 }
92 template <typename SecurityGroupIdsT = Aws::String>
94 m_securityGroupIdsHasBeenSet = true;
95 m_securityGroupIds.emplace_back(std::forward<SecurityGroupIdsT>(value));
96 return *this;
97 }
99
101
113 inline const Aws::String& GetSshKeyName() const { return m_sshKeyName; }
114 inline bool SshKeyNameHasBeenSet() const { return m_sshKeyNameHasBeenSet; }
115 template <typename SshKeyNameT = Aws::String>
116 void SetSshKeyName(SshKeyNameT&& value) {
117 m_sshKeyNameHasBeenSet = true;
118 m_sshKeyName = std::forward<SshKeyNameT>(value);
119 }
120 template <typename SshKeyNameT = Aws::String>
122 SetSshKeyName(std::forward<SshKeyNameT>(value));
123 return *this;
124 }
126
128
131 inline const Aws::String& GetClusterIdentifier() const { return m_clusterIdentifier; }
132 inline bool ClusterIdentifierHasBeenSet() const { return m_clusterIdentifierHasBeenSet; }
133 template <typename ClusterIdentifierT = Aws::String>
134 void SetClusterIdentifier(ClusterIdentifierT&& value) {
135 m_clusterIdentifierHasBeenSet = true;
136 m_clusterIdentifier = std::forward<ClusterIdentifierT>(value);
137 }
138 template <typename ClusterIdentifierT = Aws::String>
140 SetClusterIdentifier(std::forward<ClusterIdentifierT>(value));
141 return *this;
142 }
144
146
149 inline const Aws::String& GetComputeNodeGroupName() const { return m_computeNodeGroupName; }
150 inline bool ComputeNodeGroupNameHasBeenSet() const { return m_computeNodeGroupNameHasBeenSet; }
151 template <typename ComputeNodeGroupNameT = Aws::String>
152 void SetComputeNodeGroupName(ComputeNodeGroupNameT&& value) {
153 m_computeNodeGroupNameHasBeenSet = true;
154 m_computeNodeGroupName = std::forward<ComputeNodeGroupNameT>(value);
155 }
156 template <typename ComputeNodeGroupNameT = Aws::String>
158 SetComputeNodeGroupName(std::forward<ComputeNodeGroupNameT>(value));
159 return *this;
160 }
162
164
168 inline const Aws::Vector<Aws::String>& GetSubnetIds() const { return m_subnetIds; }
169 inline bool SubnetIdsHasBeenSet() const { return m_subnetIdsHasBeenSet; }
170 template <typename SubnetIdsT = Aws::Vector<Aws::String>>
171 void SetSubnetIds(SubnetIdsT&& value) {
172 m_subnetIdsHasBeenSet = true;
173 m_subnetIds = std::forward<SubnetIdsT>(value);
174 }
175 template <typename SubnetIdsT = Aws::Vector<Aws::String>>
177 SetSubnetIds(std::forward<SubnetIdsT>(value));
178 return *this;
179 }
180 template <typename SubnetIdsT = Aws::String>
182 m_subnetIdsHasBeenSet = true;
183 m_subnetIds.emplace_back(std::forward<SubnetIdsT>(value));
184 return *this;
185 }
187
189
209 inline PurchaseOption GetPurchaseOption() const { return m_purchaseOption; }
210 inline bool PurchaseOptionHasBeenSet() const { return m_purchaseOptionHasBeenSet; }
212 m_purchaseOptionHasBeenSet = true;
213 m_purchaseOption = value;
214 }
216 SetPurchaseOption(value);
217 return *this;
218 }
220
222
230 inline LaunchTemplateMode GetLaunchTemplateMode() const { return m_launchTemplateMode; }
231 inline bool LaunchTemplateModeHasBeenSet() const { return m_launchTemplateModeHasBeenSet; }
233 m_launchTemplateModeHasBeenSet = true;
234 m_launchTemplateMode = value;
235 }
241
243
249 inline const CustomLaunchTemplate& GetCustomLaunchTemplate() const { return m_customLaunchTemplate; }
250 inline bool CustomLaunchTemplateHasBeenSet() const { return m_customLaunchTemplateHasBeenSet; }
251 template <typename CustomLaunchTemplateT = CustomLaunchTemplate>
252 void SetCustomLaunchTemplate(CustomLaunchTemplateT&& value) {
253 m_customLaunchTemplateHasBeenSet = true;
254 m_customLaunchTemplate = std::forward<CustomLaunchTemplateT>(value);
255 }
256 template <typename CustomLaunchTemplateT = CustomLaunchTemplate>
258 SetCustomLaunchTemplate(std::forward<CustomLaunchTemplateT>(value));
259 return *this;
260 }
262
264
273 inline const Aws::String& GetIamInstanceProfileArn() const { return m_iamInstanceProfileArn; }
274 inline bool IamInstanceProfileArnHasBeenSet() const { return m_iamInstanceProfileArnHasBeenSet; }
275 template <typename IamInstanceProfileArnT = Aws::String>
276 void SetIamInstanceProfileArn(IamInstanceProfileArnT&& value) {
277 m_iamInstanceProfileArnHasBeenSet = true;
278 m_iamInstanceProfileArn = std::forward<IamInstanceProfileArnT>(value);
279 }
280 template <typename IamInstanceProfileArnT = Aws::String>
282 SetIamInstanceProfileArn(std::forward<IamInstanceProfileArnT>(value));
283 return *this;
284 }
286
288
291 inline const ScalingConfigurationRequest& GetScalingConfiguration() const { return m_scalingConfiguration; }
292 inline bool ScalingConfigurationHasBeenSet() const { return m_scalingConfigurationHasBeenSet; }
293 template <typename ScalingConfigurationT = ScalingConfigurationRequest>
294 void SetScalingConfiguration(ScalingConfigurationT&& value) {
295 m_scalingConfigurationHasBeenSet = true;
296 m_scalingConfiguration = std::forward<ScalingConfigurationT>(value);
297 }
298 template <typename ScalingConfigurationT = ScalingConfigurationRequest>
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>>
319 SetInstanceConfigs(std::forward<InstanceConfigsT>(value));
320 return *this;
321 }
322 template <typename InstanceConfigsT = InstanceConfig>
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>
341 SetSpotOptions(std::forward<SpotOptionsT>(value));
342 return *this;
343 }
345
347
350 inline const ComputeNodeGroupSlurmConfigurationRequest& GetSlurmConfiguration() const { return m_slurmConfiguration; }
351 inline bool SlurmConfigurationHasBeenSet() const { return m_slurmConfigurationHasBeenSet; }
352 template <typename SlurmConfigurationT = ComputeNodeGroupSlurmConfigurationRequest>
353 void SetSlurmConfiguration(SlurmConfigurationT&& value) {
354 m_slurmConfigurationHasBeenSet = true;
355 m_slurmConfiguration = std::forward<SlurmConfigurationT>(value);
356 }
357 template <typename SlurmConfigurationT = ComputeNodeGroupSlurmConfigurationRequest>
359 SetSlurmConfiguration(std::forward<SlurmConfigurationT>(value));
360 return *this;
361 }
363
365
371 inline const NodeLifecycleActionsRequest& GetNodeLifecycleActions() const { return m_nodeLifecycleActions; }
372 inline bool NodeLifecycleActionsHasBeenSet() const { return m_nodeLifecycleActionsHasBeenSet; }
373 template <typename NodeLifecycleActionsT = NodeLifecycleActionsRequest>
374 void SetNodeLifecycleActions(NodeLifecycleActionsT&& value) {
375 m_nodeLifecycleActionsHasBeenSet = true;
376 m_nodeLifecycleActions = std::forward<NodeLifecycleActionsT>(value);
377 }
378 template <typename NodeLifecycleActionsT = NodeLifecycleActionsRequest>
380 SetNodeLifecycleActions(std::forward<NodeLifecycleActionsT>(value));
381 return *this;
382 }
384
386
395 inline const Aws::String& GetClientToken() const { return m_clientToken; }
396 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
397 template <typename ClientTokenT = Aws::String>
398 void SetClientToken(ClientTokenT&& value) {
399 m_clientTokenHasBeenSet = true;
400 m_clientToken = std::forward<ClientTokenT>(value);
401 }
402 template <typename ClientTokenT = Aws::String>
404 SetClientToken(std::forward<ClientTokenT>(value));
405 return *this;
406 }
408
410
414 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
415 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
416 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
417 void SetTags(TagsT&& value) {
418 m_tagsHasBeenSet = true;
419 m_tags = std::forward<TagsT>(value);
420 }
421 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
423 SetTags(std::forward<TagsT>(value));
424 return *this;
425 }
426 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
427 CreateComputeNodeGroupRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
428 m_tagsHasBeenSet = true;
429 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
430 return *this;
431 }
433 private:
434 Aws::String m_amiId;
435
436 Aws::Vector<Aws::String> m_securityGroupIds;
437
438 Aws::String m_sshKeyName;
439
440 Aws::String m_clusterIdentifier;
441
442 Aws::String m_computeNodeGroupName;
443
444 Aws::Vector<Aws::String> m_subnetIds;
445
446 PurchaseOption m_purchaseOption{PurchaseOption::NOT_SET};
447
449
450 CustomLaunchTemplate m_customLaunchTemplate;
451
452 Aws::String m_iamInstanceProfileArn;
453
454 ScalingConfigurationRequest m_scalingConfiguration;
455
456 Aws::Vector<InstanceConfig> m_instanceConfigs;
457
458 SpotOptions m_spotOptions;
459
460 ComputeNodeGroupSlurmConfigurationRequest m_slurmConfiguration;
461
462 NodeLifecycleActionsRequest m_nodeLifecycleActions;
463
465
467 bool m_amiIdHasBeenSet = false;
468 bool m_securityGroupIdsHasBeenSet = false;
469 bool m_sshKeyNameHasBeenSet = false;
470 bool m_clusterIdentifierHasBeenSet = false;
471 bool m_computeNodeGroupNameHasBeenSet = false;
472 bool m_subnetIdsHasBeenSet = false;
473 bool m_purchaseOptionHasBeenSet = false;
474 bool m_launchTemplateModeHasBeenSet = false;
475 bool m_customLaunchTemplateHasBeenSet = false;
476 bool m_iamInstanceProfileArnHasBeenSet = false;
477 bool m_scalingConfigurationHasBeenSet = false;
478 bool m_instanceConfigsHasBeenSet = false;
479 bool m_spotOptionsHasBeenSet = false;
480 bool m_slurmConfigurationHasBeenSet = false;
481 bool m_nodeLifecycleActionsHasBeenSet = false;
482 bool m_clientTokenHasBeenSet = true;
483 bool m_tagsHasBeenSet = false;
484};
485
486} // namespace Model
487} // namespace PCS
488} // namespace Aws
void SetIamInstanceProfileArn(IamInstanceProfileArnT &&value)
CreateComputeNodeGroupRequest & WithNodeLifecycleActions(NodeLifecycleActionsT &&value)
const Aws::Vector< Aws::String > & GetSubnetIds() const
CreateComputeNodeGroupRequest & WithCustomLaunchTemplate(CustomLaunchTemplateT &&value)
CreateComputeNodeGroupRequest & WithInstanceConfigs(InstanceConfigsT &&value)
CreateComputeNodeGroupRequest & WithSubnetIds(SubnetIdsT &&value)
CreateComputeNodeGroupRequest & WithSecurityGroupIds(SecurityGroupIdsT &&value)
const Aws::Vector< Aws::String > & GetSecurityGroupIds() const
const ScalingConfigurationRequest & GetScalingConfiguration() const
CreateComputeNodeGroupRequest & AddInstanceConfigs(InstanceConfigsT &&value)
CreateComputeNodeGroupRequest & WithClusterIdentifier(ClusterIdentifierT &&value)
CreateComputeNodeGroupRequest & WithIamInstanceProfileArn(IamInstanceProfileArnT &&value)
CreateComputeNodeGroupRequest & WithLaunchTemplateMode(LaunchTemplateMode value)
AWS_PCS_API Aws::String SerializePayload() const override
CreateComputeNodeGroupRequest & AddSecurityGroupIds(SecurityGroupIdsT &&value)
const ComputeNodeGroupSlurmConfigurationRequest & GetSlurmConfiguration() const
CreateComputeNodeGroupRequest & WithScalingConfiguration(ScalingConfigurationT &&value)
const Aws::Vector< InstanceConfig > & GetInstanceConfigs() const
CreateComputeNodeGroupRequest & WithPurchaseOption(PurchaseOption value)
const CustomLaunchTemplate & GetCustomLaunchTemplate() const
CreateComputeNodeGroupRequest & AddSubnetIds(SubnetIdsT &&value)
CreateComputeNodeGroupRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
CreateComputeNodeGroupRequest & WithClientToken(ClientTokenT &&value)
const NodeLifecycleActionsRequest & GetNodeLifecycleActions() const
CreateComputeNodeGroupRequest & WithAmiId(AmiIdT &&value)
CreateComputeNodeGroupRequest & WithComputeNodeGroupName(ComputeNodeGroupNameT &&value)
CreateComputeNodeGroupRequest & WithSshKeyName(SshKeyNameT &&value)
CreateComputeNodeGroupRequest & WithSlurmConfiguration(SlurmConfigurationT &&value)
CreateComputeNodeGroupRequest & WithTags(TagsT &&value)
CreateComputeNodeGroupRequest & WithSpotOptions(SpotOptionsT &&value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
virtual const char * GetServiceRequestName() const override
AWS_PCS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
static Aws::Utils::UUID PseudoRandomUUID()
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector