AWS SDK for C++

AWS SDK for C++ Version 1.11.786

Loading...
Searching...
No Matches
CreateNodegroupRequest.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/eks/EKSRequest.h>
12#include <aws/eks/EKS_EXPORTS.h>
13#include <aws/eks/model/AMITypes.h>
14#include <aws/eks/model/CapacityTypes.h>
15#include <aws/eks/model/LaunchTemplateSpecification.h>
16#include <aws/eks/model/NodeRepairConfig.h>
17#include <aws/eks/model/NodegroupScalingConfig.h>
18#include <aws/eks/model/NodegroupUpdateConfig.h>
19#include <aws/eks/model/RemoteAccessConfig.h>
20#include <aws/eks/model/Taint.h>
21#include <aws/eks/model/WarmPoolConfig.h>
22
23#include <utility>
24
25namespace Aws {
26namespace EKS {
27namespace Model {
28
32 public:
33 AWS_EKS_API CreateNodegroupRequest() = default;
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 "CreateNodegroup"; }
40
41 AWS_EKS_API Aws::String SerializePayload() const override;
42
44
47 inline const Aws::String& GetClusterName() const { return m_clusterName; }
48 inline bool ClusterNameHasBeenSet() const { return m_clusterNameHasBeenSet; }
49 template <typename ClusterNameT = Aws::String>
50 void SetClusterName(ClusterNameT&& value) {
51 m_clusterNameHasBeenSet = true;
52 m_clusterName = std::forward<ClusterNameT>(value);
53 }
54 template <typename ClusterNameT = Aws::String>
55 CreateNodegroupRequest& WithClusterName(ClusterNameT&& value) {
56 SetClusterName(std::forward<ClusterNameT>(value));
57 return *this;
58 }
60
62
65 inline const Aws::String& GetNodegroupName() const { return m_nodegroupName; }
66 inline bool NodegroupNameHasBeenSet() const { return m_nodegroupNameHasBeenSet; }
67 template <typename NodegroupNameT = Aws::String>
68 void SetNodegroupName(NodegroupNameT&& value) {
69 m_nodegroupNameHasBeenSet = true;
70 m_nodegroupName = std::forward<NodegroupNameT>(value);
71 }
72 template <typename NodegroupNameT = Aws::String>
73 CreateNodegroupRequest& WithNodegroupName(NodegroupNameT&& value) {
74 SetNodegroupName(std::forward<NodegroupNameT>(value));
75 return *this;
76 }
78
80
84 inline const NodegroupScalingConfig& GetScalingConfig() const { return m_scalingConfig; }
85 inline bool ScalingConfigHasBeenSet() const { return m_scalingConfigHasBeenSet; }
86 template <typename ScalingConfigT = NodegroupScalingConfig>
87 void SetScalingConfig(ScalingConfigT&& value) {
88 m_scalingConfigHasBeenSet = true;
89 m_scalingConfig = std::forward<ScalingConfigT>(value);
90 }
91 template <typename ScalingConfigT = NodegroupScalingConfig>
92 CreateNodegroupRequest& WithScalingConfig(ScalingConfigT&& value) {
93 SetScalingConfig(std::forward<ScalingConfigT>(value));
94 return *this;
95 }
97
99
108 inline int GetDiskSize() const { return m_diskSize; }
109 inline bool DiskSizeHasBeenSet() const { return m_diskSizeHasBeenSet; }
110 inline void SetDiskSize(int value) {
111 m_diskSizeHasBeenSet = true;
112 m_diskSize = value;
113 }
115 SetDiskSize(value);
116 return *this;
117 }
119
121
130 inline const Aws::Vector<Aws::String>& GetSubnets() const { return m_subnets; }
131 inline bool SubnetsHasBeenSet() const { return m_subnetsHasBeenSet; }
132 template <typename SubnetsT = Aws::Vector<Aws::String>>
133 void SetSubnets(SubnetsT&& value) {
134 m_subnetsHasBeenSet = true;
135 m_subnets = std::forward<SubnetsT>(value);
136 }
137 template <typename SubnetsT = Aws::Vector<Aws::String>>
139 SetSubnets(std::forward<SubnetsT>(value));
140 return *this;
141 }
142 template <typename SubnetsT = Aws::String>
144 m_subnetsHasBeenSet = true;
145 m_subnets.emplace_back(std::forward<SubnetsT>(value));
146 return *this;
147 }
149
151
168 inline const Aws::Vector<Aws::String>& GetInstanceTypes() const { return m_instanceTypes; }
169 inline bool InstanceTypesHasBeenSet() const { return m_instanceTypesHasBeenSet; }
170 template <typename InstanceTypesT = Aws::Vector<Aws::String>>
171 void SetInstanceTypes(InstanceTypesT&& value) {
172 m_instanceTypesHasBeenSet = true;
173 m_instanceTypes = std::forward<InstanceTypesT>(value);
174 }
175 template <typename InstanceTypesT = Aws::Vector<Aws::String>>
176 CreateNodegroupRequest& WithInstanceTypes(InstanceTypesT&& value) {
177 SetInstanceTypes(std::forward<InstanceTypesT>(value));
178 return *this;
179 }
180 template <typename InstanceTypesT = Aws::String>
181 CreateNodegroupRequest& AddInstanceTypes(InstanceTypesT&& value) {
182 m_instanceTypesHasBeenSet = true;
183 m_instanceTypes.emplace_back(std::forward<InstanceTypesT>(value));
184 return *this;
185 }
187
189
200 inline AMITypes GetAmiType() const { return m_amiType; }
201 inline bool AmiTypeHasBeenSet() const { return m_amiTypeHasBeenSet; }
202 inline void SetAmiType(AMITypes value) {
203 m_amiTypeHasBeenSet = true;
204 m_amiType = value;
205 }
207 SetAmiType(value);
208 return *this;
209 }
211
213
222 inline const RemoteAccessConfig& GetRemoteAccess() const { return m_remoteAccess; }
223 inline bool RemoteAccessHasBeenSet() const { return m_remoteAccessHasBeenSet; }
224 template <typename RemoteAccessT = RemoteAccessConfig>
225 void SetRemoteAccess(RemoteAccessT&& value) {
226 m_remoteAccessHasBeenSet = true;
227 m_remoteAccess = std::forward<RemoteAccessT>(value);
228 }
229 template <typename RemoteAccessT = RemoteAccessConfig>
230 CreateNodegroupRequest& WithRemoteAccess(RemoteAccessT&& value) {
231 SetRemoteAccess(std::forward<RemoteAccessT>(value));
232 return *this;
233 }
235
237
253 inline const Aws::String& GetNodeRole() const { return m_nodeRole; }
254 inline bool NodeRoleHasBeenSet() const { return m_nodeRoleHasBeenSet; }
255 template <typename NodeRoleT = Aws::String>
256 void SetNodeRole(NodeRoleT&& value) {
257 m_nodeRoleHasBeenSet = true;
258 m_nodeRole = std::forward<NodeRoleT>(value);
259 }
260 template <typename NodeRoleT = Aws::String>
262 SetNodeRole(std::forward<NodeRoleT>(value));
263 return *this;
264 }
266
268
272 inline const Aws::Map<Aws::String, Aws::String>& GetLabels() const { return m_labels; }
273 inline bool LabelsHasBeenSet() const { return m_labelsHasBeenSet; }
274 template <typename LabelsT = Aws::Map<Aws::String, Aws::String>>
275 void SetLabels(LabelsT&& value) {
276 m_labelsHasBeenSet = true;
277 m_labels = std::forward<LabelsT>(value);
278 }
279 template <typename LabelsT = Aws::Map<Aws::String, Aws::String>>
281 SetLabels(std::forward<LabelsT>(value));
282 return *this;
283 }
284 template <typename LabelsKeyT = Aws::String, typename LabelsValueT = Aws::String>
285 CreateNodegroupRequest& AddLabels(LabelsKeyT&& key, LabelsValueT&& value) {
286 m_labelsHasBeenSet = true;
287 m_labels.emplace(std::forward<LabelsKeyT>(key), std::forward<LabelsValueT>(value));
288 return *this;
289 }
291
293
299 inline const Aws::Vector<Taint>& GetTaints() const { return m_taints; }
300 inline bool TaintsHasBeenSet() const { return m_taintsHasBeenSet; }
301 template <typename TaintsT = Aws::Vector<Taint>>
302 void SetTaints(TaintsT&& value) {
303 m_taintsHasBeenSet = true;
304 m_taints = std::forward<TaintsT>(value);
305 }
306 template <typename TaintsT = Aws::Vector<Taint>>
308 SetTaints(std::forward<TaintsT>(value));
309 return *this;
310 }
311 template <typename TaintsT = Taint>
313 m_taintsHasBeenSet = true;
314 m_taints.emplace_back(std::forward<TaintsT>(value));
315 return *this;
316 }
318
320
325 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
326 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
327 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
328 void SetTags(TagsT&& value) {
329 m_tagsHasBeenSet = true;
330 m_tags = std::forward<TagsT>(value);
331 }
332 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
334 SetTags(std::forward<TagsT>(value));
335 return *this;
336 }
337 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
338 CreateNodegroupRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
339 m_tagsHasBeenSet = true;
340 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
341 return *this;
342 }
344
346
350 inline const Aws::String& GetClientRequestToken() const { return m_clientRequestToken; }
351 inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; }
352 template <typename ClientRequestTokenT = Aws::String>
353 void SetClientRequestToken(ClientRequestTokenT&& value) {
354 m_clientRequestTokenHasBeenSet = true;
355 m_clientRequestToken = std::forward<ClientRequestTokenT>(value);
356 }
357 template <typename ClientRequestTokenT = Aws::String>
358 CreateNodegroupRequest& WithClientRequestToken(ClientRequestTokenT&& value) {
359 SetClientRequestToken(std::forward<ClientRequestTokenT>(value));
360 return *this;
361 }
363
365
375 inline const LaunchTemplateSpecification& GetLaunchTemplate() const { return m_launchTemplate; }
376 inline bool LaunchTemplateHasBeenSet() const { return m_launchTemplateHasBeenSet; }
377 template <typename LaunchTemplateT = LaunchTemplateSpecification>
378 void SetLaunchTemplate(LaunchTemplateT&& value) {
379 m_launchTemplateHasBeenSet = true;
380 m_launchTemplate = std::forward<LaunchTemplateT>(value);
381 }
382 template <typename LaunchTemplateT = LaunchTemplateSpecification>
383 CreateNodegroupRequest& WithLaunchTemplate(LaunchTemplateT&& value) {
384 SetLaunchTemplate(std::forward<LaunchTemplateT>(value));
385 return *this;
386 }
388
390
393 inline const NodegroupUpdateConfig& GetUpdateConfig() const { return m_updateConfig; }
394 inline bool UpdateConfigHasBeenSet() const { return m_updateConfigHasBeenSet; }
395 template <typename UpdateConfigT = NodegroupUpdateConfig>
396 void SetUpdateConfig(UpdateConfigT&& value) {
397 m_updateConfigHasBeenSet = true;
398 m_updateConfig = std::forward<UpdateConfigT>(value);
399 }
400 template <typename UpdateConfigT = NodegroupUpdateConfig>
401 CreateNodegroupRequest& WithUpdateConfig(UpdateConfigT&& value) {
402 SetUpdateConfig(std::forward<UpdateConfigT>(value));
403 return *this;
404 }
406
408
411 inline const NodeRepairConfig& GetNodeRepairConfig() const { return m_nodeRepairConfig; }
412 inline bool NodeRepairConfigHasBeenSet() const { return m_nodeRepairConfigHasBeenSet; }
413 template <typename NodeRepairConfigT = NodeRepairConfig>
414 void SetNodeRepairConfig(NodeRepairConfigT&& value) {
415 m_nodeRepairConfigHasBeenSet = true;
416 m_nodeRepairConfig = std::forward<NodeRepairConfigT>(value);
417 }
418 template <typename NodeRepairConfigT = NodeRepairConfig>
419 CreateNodegroupRequest& WithNodeRepairConfig(NodeRepairConfigT&& value) {
420 SetNodeRepairConfig(std::forward<NodeRepairConfigT>(value));
421 return *this;
422 }
424
426
429 inline CapacityTypes GetCapacityType() const { return m_capacityType; }
430 inline bool CapacityTypeHasBeenSet() const { return m_capacityTypeHasBeenSet; }
431 inline void SetCapacityType(CapacityTypes value) {
432 m_capacityTypeHasBeenSet = true;
433 m_capacityType = value;
434 }
436 SetCapacityType(value);
437 return *this;
438 }
440
442
452 inline const Aws::String& GetVersion() const { return m_version; }
453 inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; }
454 template <typename VersionT = Aws::String>
455 void SetVersion(VersionT&& value) {
456 m_versionHasBeenSet = true;
457 m_version = std::forward<VersionT>(value);
458 }
459 template <typename VersionT = Aws::String>
461 SetVersion(std::forward<VersionT>(value));
462 return *this;
463 }
465
467
484 inline const Aws::String& GetReleaseVersion() const { return m_releaseVersion; }
485 inline bool ReleaseVersionHasBeenSet() const { return m_releaseVersionHasBeenSet; }
486 template <typename ReleaseVersionT = Aws::String>
487 void SetReleaseVersion(ReleaseVersionT&& value) {
488 m_releaseVersionHasBeenSet = true;
489 m_releaseVersion = std::forward<ReleaseVersionT>(value);
490 }
491 template <typename ReleaseVersionT = Aws::String>
492 CreateNodegroupRequest& WithReleaseVersion(ReleaseVersionT&& value) {
493 SetReleaseVersion(std::forward<ReleaseVersionT>(value));
494 return *this;
495 }
497
499
505 inline const WarmPoolConfig& GetWarmPoolConfig() const { return m_warmPoolConfig; }
506 inline bool WarmPoolConfigHasBeenSet() const { return m_warmPoolConfigHasBeenSet; }
507 template <typename WarmPoolConfigT = WarmPoolConfig>
508 void SetWarmPoolConfig(WarmPoolConfigT&& value) {
509 m_warmPoolConfigHasBeenSet = true;
510 m_warmPoolConfig = std::forward<WarmPoolConfigT>(value);
511 }
512 template <typename WarmPoolConfigT = WarmPoolConfig>
513 CreateNodegroupRequest& WithWarmPoolConfig(WarmPoolConfigT&& value) {
514 SetWarmPoolConfig(std::forward<WarmPoolConfigT>(value));
515 return *this;
516 }
518 private:
519 Aws::String m_clusterName;
520
521 Aws::String m_nodegroupName;
522
523 NodegroupScalingConfig m_scalingConfig;
524
525 int m_diskSize{0};
526
527 Aws::Vector<Aws::String> m_subnets;
528
529 Aws::Vector<Aws::String> m_instanceTypes;
530
531 AMITypes m_amiType{AMITypes::NOT_SET};
532
533 RemoteAccessConfig m_remoteAccess;
534
535 Aws::String m_nodeRole;
536
538
539 Aws::Vector<Taint> m_taints;
540
542
543 Aws::String m_clientRequestToken{Aws::Utils::UUID::PseudoRandomUUID()};
544
545 LaunchTemplateSpecification m_launchTemplate;
546
547 NodegroupUpdateConfig m_updateConfig;
548
549 NodeRepairConfig m_nodeRepairConfig;
550
552
553 Aws::String m_version;
554
555 Aws::String m_releaseVersion;
556
557 WarmPoolConfig m_warmPoolConfig;
558 bool m_clusterNameHasBeenSet = false;
559 bool m_nodegroupNameHasBeenSet = false;
560 bool m_scalingConfigHasBeenSet = false;
561 bool m_diskSizeHasBeenSet = false;
562 bool m_subnetsHasBeenSet = false;
563 bool m_instanceTypesHasBeenSet = false;
564 bool m_amiTypeHasBeenSet = false;
565 bool m_remoteAccessHasBeenSet = false;
566 bool m_nodeRoleHasBeenSet = false;
567 bool m_labelsHasBeenSet = false;
568 bool m_taintsHasBeenSet = false;
569 bool m_tagsHasBeenSet = false;
570 bool m_clientRequestTokenHasBeenSet = true;
571 bool m_launchTemplateHasBeenSet = false;
572 bool m_updateConfigHasBeenSet = false;
573 bool m_nodeRepairConfigHasBeenSet = false;
574 bool m_capacityTypeHasBeenSet = false;
575 bool m_versionHasBeenSet = false;
576 bool m_releaseVersionHasBeenSet = false;
577 bool m_warmPoolConfigHasBeenSet = false;
578};
579
580} // namespace Model
581} // namespace EKS
582} // namespace Aws
void SetNodegroupName(NodegroupNameT &&value)
AWS_EKS_API CreateNodegroupRequest()=default
CreateNodegroupRequest & WithRemoteAccess(RemoteAccessT &&value)
CreateNodegroupRequest & WithClusterName(ClusterNameT &&value)
CreateNodegroupRequest & WithReleaseVersion(ReleaseVersionT &&value)
CreateNodegroupRequest & WithAmiType(AMITypes value)
CreateNodegroupRequest & WithLaunchTemplate(LaunchTemplateT &&value)
CreateNodegroupRequest & AddTaints(TaintsT &&value)
const Aws::Vector< Aws::String > & GetSubnets() const
void SetReleaseVersion(ReleaseVersionT &&value)
CreateNodegroupRequest & WithLabels(LabelsT &&value)
void SetClientRequestToken(ClientRequestTokenT &&value)
void SetNodeRepairConfig(NodeRepairConfigT &&value)
CreateNodegroupRequest & WithTaints(TaintsT &&value)
const WarmPoolConfig & GetWarmPoolConfig() const
const Aws::Map< Aws::String, Aws::String > & GetLabels() const
CreateNodegroupRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
const Aws::Vector< Taint > & GetTaints() const
CreateNodegroupRequest & WithNodeRepairConfig(NodeRepairConfigT &&value)
const Aws::Vector< Aws::String > & GetInstanceTypes() const
virtual const char * GetServiceRequestName() const override
CreateNodegroupRequest & WithWarmPoolConfig(WarmPoolConfigT &&value)
CreateNodegroupRequest & WithUpdateConfig(UpdateConfigT &&value)
CreateNodegroupRequest & WithCapacityType(CapacityTypes value)
void SetScalingConfig(ScalingConfigT &&value)
void SetWarmPoolConfig(WarmPoolConfigT &&value)
const NodegroupUpdateConfig & GetUpdateConfig() const
CreateNodegroupRequest & WithScalingConfig(ScalingConfigT &&value)
const NodeRepairConfig & GetNodeRepairConfig() const
const LaunchTemplateSpecification & GetLaunchTemplate() const
const Aws::Map< Aws::String, Aws::String > & GetTags() const
AWS_EKS_API Aws::String SerializePayload() const override
CreateNodegroupRequest & WithTags(TagsT &&value)
CreateNodegroupRequest & WithNodegroupName(NodegroupNameT &&value)
CreateNodegroupRequest & WithInstanceTypes(InstanceTypesT &&value)
void SetLaunchTemplate(LaunchTemplateT &&value)
CreateNodegroupRequest & AddInstanceTypes(InstanceTypesT &&value)
CreateNodegroupRequest & WithSubnets(SubnetsT &&value)
const RemoteAccessConfig & GetRemoteAccess() const
const NodegroupScalingConfig & GetScalingConfig() const
const Aws::String & GetClientRequestToken() const
CreateNodegroupRequest & AddLabels(LabelsKeyT &&key, LabelsValueT &&value)
CreateNodegroupRequest & AddSubnets(SubnetsT &&value)
CreateNodegroupRequest & WithNodeRole(NodeRoleT &&value)
CreateNodegroupRequest & WithClientRequestToken(ClientRequestTokenT &&value)
CreateNodegroupRequest & WithVersion(VersionT &&value)
CreateNodegroupRequest & WithDiskSize(int value)
static Aws::Utils::UUID PseudoRandomUUID()
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