AWS SDK for C++

AWS SDK for C++ Version 1.11.716

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
22#include <utility>
23
24namespace Aws {
25namespace EKS {
26namespace Model {
27
31 public:
32 AWS_EKS_API CreateNodegroupRequest() = 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 "CreateNodegroup"; }
39
40 AWS_EKS_API Aws::String SerializePayload() const override;
41
43
46 inline const Aws::String& GetClusterName() const { return m_clusterName; }
47 inline bool ClusterNameHasBeenSet() const { return m_clusterNameHasBeenSet; }
48 template <typename ClusterNameT = Aws::String>
49 void SetClusterName(ClusterNameT&& value) {
50 m_clusterNameHasBeenSet = true;
51 m_clusterName = std::forward<ClusterNameT>(value);
52 }
53 template <typename ClusterNameT = Aws::String>
54 CreateNodegroupRequest& WithClusterName(ClusterNameT&& value) {
55 SetClusterName(std::forward<ClusterNameT>(value));
56 return *this;
57 }
59
61
64 inline const Aws::String& GetNodegroupName() const { return m_nodegroupName; }
65 inline bool NodegroupNameHasBeenSet() const { return m_nodegroupNameHasBeenSet; }
66 template <typename NodegroupNameT = Aws::String>
67 void SetNodegroupName(NodegroupNameT&& value) {
68 m_nodegroupNameHasBeenSet = true;
69 m_nodegroupName = std::forward<NodegroupNameT>(value);
70 }
71 template <typename NodegroupNameT = Aws::String>
72 CreateNodegroupRequest& WithNodegroupName(NodegroupNameT&& value) {
73 SetNodegroupName(std::forward<NodegroupNameT>(value));
74 return *this;
75 }
77
79
83 inline const NodegroupScalingConfig& GetScalingConfig() const { return m_scalingConfig; }
84 inline bool ScalingConfigHasBeenSet() const { return m_scalingConfigHasBeenSet; }
85 template <typename ScalingConfigT = NodegroupScalingConfig>
86 void SetScalingConfig(ScalingConfigT&& value) {
87 m_scalingConfigHasBeenSet = true;
88 m_scalingConfig = std::forward<ScalingConfigT>(value);
89 }
90 template <typename ScalingConfigT = NodegroupScalingConfig>
91 CreateNodegroupRequest& WithScalingConfig(ScalingConfigT&& value) {
92 SetScalingConfig(std::forward<ScalingConfigT>(value));
93 return *this;
94 }
96
98
107 inline int GetDiskSize() const { return m_diskSize; }
108 inline bool DiskSizeHasBeenSet() const { return m_diskSizeHasBeenSet; }
109 inline void SetDiskSize(int value) {
110 m_diskSizeHasBeenSet = true;
111 m_diskSize = value;
112 }
114 SetDiskSize(value);
115 return *this;
116 }
118
120
129 inline const Aws::Vector<Aws::String>& GetSubnets() const { return m_subnets; }
130 inline bool SubnetsHasBeenSet() const { return m_subnetsHasBeenSet; }
131 template <typename SubnetsT = Aws::Vector<Aws::String>>
132 void SetSubnets(SubnetsT&& value) {
133 m_subnetsHasBeenSet = true;
134 m_subnets = std::forward<SubnetsT>(value);
135 }
136 template <typename SubnetsT = Aws::Vector<Aws::String>>
138 SetSubnets(std::forward<SubnetsT>(value));
139 return *this;
140 }
141 template <typename SubnetsT = Aws::String>
143 m_subnetsHasBeenSet = true;
144 m_subnets.emplace_back(std::forward<SubnetsT>(value));
145 return *this;
146 }
148
150
167 inline const Aws::Vector<Aws::String>& GetInstanceTypes() const { return m_instanceTypes; }
168 inline bool InstanceTypesHasBeenSet() const { return m_instanceTypesHasBeenSet; }
169 template <typename InstanceTypesT = Aws::Vector<Aws::String>>
170 void SetInstanceTypes(InstanceTypesT&& value) {
171 m_instanceTypesHasBeenSet = true;
172 m_instanceTypes = std::forward<InstanceTypesT>(value);
173 }
174 template <typename InstanceTypesT = Aws::Vector<Aws::String>>
175 CreateNodegroupRequest& WithInstanceTypes(InstanceTypesT&& value) {
176 SetInstanceTypes(std::forward<InstanceTypesT>(value));
177 return *this;
178 }
179 template <typename InstanceTypesT = Aws::String>
180 CreateNodegroupRequest& AddInstanceTypes(InstanceTypesT&& value) {
181 m_instanceTypesHasBeenSet = true;
182 m_instanceTypes.emplace_back(std::forward<InstanceTypesT>(value));
183 return *this;
184 }
186
188
199 inline AMITypes GetAmiType() const { return m_amiType; }
200 inline bool AmiTypeHasBeenSet() const { return m_amiTypeHasBeenSet; }
201 inline void SetAmiType(AMITypes value) {
202 m_amiTypeHasBeenSet = true;
203 m_amiType = value;
204 }
206 SetAmiType(value);
207 return *this;
208 }
210
212
221 inline const RemoteAccessConfig& GetRemoteAccess() const { return m_remoteAccess; }
222 inline bool RemoteAccessHasBeenSet() const { return m_remoteAccessHasBeenSet; }
223 template <typename RemoteAccessT = RemoteAccessConfig>
224 void SetRemoteAccess(RemoteAccessT&& value) {
225 m_remoteAccessHasBeenSet = true;
226 m_remoteAccess = std::forward<RemoteAccessT>(value);
227 }
228 template <typename RemoteAccessT = RemoteAccessConfig>
229 CreateNodegroupRequest& WithRemoteAccess(RemoteAccessT&& value) {
230 SetRemoteAccess(std::forward<RemoteAccessT>(value));
231 return *this;
232 }
234
236
252 inline const Aws::String& GetNodeRole() const { return m_nodeRole; }
253 inline bool NodeRoleHasBeenSet() const { return m_nodeRoleHasBeenSet; }
254 template <typename NodeRoleT = Aws::String>
255 void SetNodeRole(NodeRoleT&& value) {
256 m_nodeRoleHasBeenSet = true;
257 m_nodeRole = std::forward<NodeRoleT>(value);
258 }
259 template <typename NodeRoleT = Aws::String>
261 SetNodeRole(std::forward<NodeRoleT>(value));
262 return *this;
263 }
265
267
271 inline const Aws::Map<Aws::String, Aws::String>& GetLabels() const { return m_labels; }
272 inline bool LabelsHasBeenSet() const { return m_labelsHasBeenSet; }
273 template <typename LabelsT = Aws::Map<Aws::String, Aws::String>>
274 void SetLabels(LabelsT&& value) {
275 m_labelsHasBeenSet = true;
276 m_labels = std::forward<LabelsT>(value);
277 }
278 template <typename LabelsT = Aws::Map<Aws::String, Aws::String>>
280 SetLabels(std::forward<LabelsT>(value));
281 return *this;
282 }
283 template <typename LabelsKeyT = Aws::String, typename LabelsValueT = Aws::String>
284 CreateNodegroupRequest& AddLabels(LabelsKeyT&& key, LabelsValueT&& value) {
285 m_labelsHasBeenSet = true;
286 m_labels.emplace(std::forward<LabelsKeyT>(key), std::forward<LabelsValueT>(value));
287 return *this;
288 }
290
292
298 inline const Aws::Vector<Taint>& GetTaints() const { return m_taints; }
299 inline bool TaintsHasBeenSet() const { return m_taintsHasBeenSet; }
300 template <typename TaintsT = Aws::Vector<Taint>>
301 void SetTaints(TaintsT&& value) {
302 m_taintsHasBeenSet = true;
303 m_taints = std::forward<TaintsT>(value);
304 }
305 template <typename TaintsT = Aws::Vector<Taint>>
307 SetTaints(std::forward<TaintsT>(value));
308 return *this;
309 }
310 template <typename TaintsT = Taint>
312 m_taintsHasBeenSet = true;
313 m_taints.emplace_back(std::forward<TaintsT>(value));
314 return *this;
315 }
317
319
324 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
325 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
326 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
327 void SetTags(TagsT&& value) {
328 m_tagsHasBeenSet = true;
329 m_tags = std::forward<TagsT>(value);
330 }
331 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
333 SetTags(std::forward<TagsT>(value));
334 return *this;
335 }
336 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
337 CreateNodegroupRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
338 m_tagsHasBeenSet = true;
339 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
340 return *this;
341 }
343
345
349 inline const Aws::String& GetClientRequestToken() const { return m_clientRequestToken; }
350 inline bool ClientRequestTokenHasBeenSet() const { return m_clientRequestTokenHasBeenSet; }
351 template <typename ClientRequestTokenT = Aws::String>
352 void SetClientRequestToken(ClientRequestTokenT&& value) {
353 m_clientRequestTokenHasBeenSet = true;
354 m_clientRequestToken = std::forward<ClientRequestTokenT>(value);
355 }
356 template <typename ClientRequestTokenT = Aws::String>
357 CreateNodegroupRequest& WithClientRequestToken(ClientRequestTokenT&& value) {
358 SetClientRequestToken(std::forward<ClientRequestTokenT>(value));
359 return *this;
360 }
362
364
374 inline const LaunchTemplateSpecification& GetLaunchTemplate() const { return m_launchTemplate; }
375 inline bool LaunchTemplateHasBeenSet() const { return m_launchTemplateHasBeenSet; }
376 template <typename LaunchTemplateT = LaunchTemplateSpecification>
377 void SetLaunchTemplate(LaunchTemplateT&& value) {
378 m_launchTemplateHasBeenSet = true;
379 m_launchTemplate = std::forward<LaunchTemplateT>(value);
380 }
381 template <typename LaunchTemplateT = LaunchTemplateSpecification>
382 CreateNodegroupRequest& WithLaunchTemplate(LaunchTemplateT&& value) {
383 SetLaunchTemplate(std::forward<LaunchTemplateT>(value));
384 return *this;
385 }
387
389
392 inline const NodegroupUpdateConfig& GetUpdateConfig() const { return m_updateConfig; }
393 inline bool UpdateConfigHasBeenSet() const { return m_updateConfigHasBeenSet; }
394 template <typename UpdateConfigT = NodegroupUpdateConfig>
395 void SetUpdateConfig(UpdateConfigT&& value) {
396 m_updateConfigHasBeenSet = true;
397 m_updateConfig = std::forward<UpdateConfigT>(value);
398 }
399 template <typename UpdateConfigT = NodegroupUpdateConfig>
400 CreateNodegroupRequest& WithUpdateConfig(UpdateConfigT&& value) {
401 SetUpdateConfig(std::forward<UpdateConfigT>(value));
402 return *this;
403 }
405
407
410 inline const NodeRepairConfig& GetNodeRepairConfig() const { return m_nodeRepairConfig; }
411 inline bool NodeRepairConfigHasBeenSet() const { return m_nodeRepairConfigHasBeenSet; }
412 template <typename NodeRepairConfigT = NodeRepairConfig>
413 void SetNodeRepairConfig(NodeRepairConfigT&& value) {
414 m_nodeRepairConfigHasBeenSet = true;
415 m_nodeRepairConfig = std::forward<NodeRepairConfigT>(value);
416 }
417 template <typename NodeRepairConfigT = NodeRepairConfig>
418 CreateNodegroupRequest& WithNodeRepairConfig(NodeRepairConfigT&& value) {
419 SetNodeRepairConfig(std::forward<NodeRepairConfigT>(value));
420 return *this;
421 }
423
425
428 inline CapacityTypes GetCapacityType() const { return m_capacityType; }
429 inline bool CapacityTypeHasBeenSet() const { return m_capacityTypeHasBeenSet; }
430 inline void SetCapacityType(CapacityTypes value) {
431 m_capacityTypeHasBeenSet = true;
432 m_capacityType = value;
433 }
435 SetCapacityType(value);
436 return *this;
437 }
439
441
451 inline const Aws::String& GetVersion() const { return m_version; }
452 inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; }
453 template <typename VersionT = Aws::String>
454 void SetVersion(VersionT&& value) {
455 m_versionHasBeenSet = true;
456 m_version = std::forward<VersionT>(value);
457 }
458 template <typename VersionT = Aws::String>
460 SetVersion(std::forward<VersionT>(value));
461 return *this;
462 }
464
466
483 inline const Aws::String& GetReleaseVersion() const { return m_releaseVersion; }
484 inline bool ReleaseVersionHasBeenSet() const { return m_releaseVersionHasBeenSet; }
485 template <typename ReleaseVersionT = Aws::String>
486 void SetReleaseVersion(ReleaseVersionT&& value) {
487 m_releaseVersionHasBeenSet = true;
488 m_releaseVersion = std::forward<ReleaseVersionT>(value);
489 }
490 template <typename ReleaseVersionT = Aws::String>
491 CreateNodegroupRequest& WithReleaseVersion(ReleaseVersionT&& value) {
492 SetReleaseVersion(std::forward<ReleaseVersionT>(value));
493 return *this;
494 }
496 private:
497 Aws::String m_clusterName;
498
499 Aws::String m_nodegroupName;
500
501 NodegroupScalingConfig m_scalingConfig;
502
503 int m_diskSize{0};
504
505 Aws::Vector<Aws::String> m_subnets;
506
507 Aws::Vector<Aws::String> m_instanceTypes;
508
509 AMITypes m_amiType{AMITypes::NOT_SET};
510
511 RemoteAccessConfig m_remoteAccess;
512
513 Aws::String m_nodeRole;
514
516
517 Aws::Vector<Taint> m_taints;
518
520
521 Aws::String m_clientRequestToken{Aws::Utils::UUID::PseudoRandomUUID()};
522
523 LaunchTemplateSpecification m_launchTemplate;
524
525 NodegroupUpdateConfig m_updateConfig;
526
527 NodeRepairConfig m_nodeRepairConfig;
528
530
531 Aws::String m_version;
532
533 Aws::String m_releaseVersion;
534 bool m_clusterNameHasBeenSet = false;
535 bool m_nodegroupNameHasBeenSet = false;
536 bool m_scalingConfigHasBeenSet = false;
537 bool m_diskSizeHasBeenSet = false;
538 bool m_subnetsHasBeenSet = false;
539 bool m_instanceTypesHasBeenSet = false;
540 bool m_amiTypeHasBeenSet = false;
541 bool m_remoteAccessHasBeenSet = false;
542 bool m_nodeRoleHasBeenSet = false;
543 bool m_labelsHasBeenSet = false;
544 bool m_taintsHasBeenSet = false;
545 bool m_tagsHasBeenSet = false;
546 bool m_clientRequestTokenHasBeenSet = true;
547 bool m_launchTemplateHasBeenSet = false;
548 bool m_updateConfigHasBeenSet = false;
549 bool m_nodeRepairConfigHasBeenSet = false;
550 bool m_capacityTypeHasBeenSet = false;
551 bool m_versionHasBeenSet = false;
552 bool m_releaseVersionHasBeenSet = false;
553};
554
555} // namespace Model
556} // namespace EKS
557} // 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 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 & WithUpdateConfig(UpdateConfigT &&value)
CreateNodegroupRequest & WithCapacityType(CapacityTypes value)
void SetScalingConfig(ScalingConfigT &&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