AWS SDK for C++

AWS SDK for C++ Version 1.11.865

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/NodeLifecycleActionsRequest.h>
17#include <aws/pcs/model/PurchaseOption.h>
18#include <aws/pcs/model/ScalingConfigurationRequest.h>
19#include <aws/pcs/model/SpotOptions.h>
20
21#include <utility>
22
23namespace Aws {
24namespace PCS {
25namespace Model {
26
30 public:
31 AWS_PCS_API CreateComputeNodeGroupRequest() = default;
32
33 // Service request name is the Operation name which will send this request out,
34 // each operation should has unique request name, so that we can get operation's name from this request.
35 // Note: this is not true for response, multiple operations may have the same response name,
36 // so we can not get operation's name from response.
37 inline virtual const char* GetServiceRequestName() const override { return "CreateComputeNodeGroup"; }
38
39 AWS_PCS_API Aws::String SerializePayload() const override;
40
42
44
47 inline const Aws::String& GetClusterIdentifier() const { return m_clusterIdentifier; }
48 inline bool ClusterIdentifierHasBeenSet() const { return m_clusterIdentifierHasBeenSet; }
49 template <typename ClusterIdentifierT = Aws::String>
50 void SetClusterIdentifier(ClusterIdentifierT&& value) {
51 m_clusterIdentifierHasBeenSet = true;
52 m_clusterIdentifier = std::forward<ClusterIdentifierT>(value);
53 }
54 template <typename ClusterIdentifierT = Aws::String>
56 SetClusterIdentifier(std::forward<ClusterIdentifierT>(value));
57 return *this;
58 }
60
62
65 inline const Aws::String& GetComputeNodeGroupName() const { return m_computeNodeGroupName; }
66 inline bool ComputeNodeGroupNameHasBeenSet() const { return m_computeNodeGroupNameHasBeenSet; }
67 template <typename ComputeNodeGroupNameT = Aws::String>
68 void SetComputeNodeGroupName(ComputeNodeGroupNameT&& value) {
69 m_computeNodeGroupNameHasBeenSet = true;
70 m_computeNodeGroupName = std::forward<ComputeNodeGroupNameT>(value);
71 }
72 template <typename ComputeNodeGroupNameT = Aws::String>
74 SetComputeNodeGroupName(std::forward<ComputeNodeGroupNameT>(value));
75 return *this;
76 }
78
80
85 inline const Aws::String& GetAmiId() const { return m_amiId; }
86 inline bool AmiIdHasBeenSet() const { return m_amiIdHasBeenSet; }
87 template <typename AmiIdT = Aws::String>
88 void SetAmiId(AmiIdT&& value) {
89 m_amiIdHasBeenSet = true;
90 m_amiId = std::forward<AmiIdT>(value);
91 }
92 template <typename AmiIdT = Aws::String>
94 SetAmiId(std::forward<AmiIdT>(value));
95 return *this;
96 }
98
100
104 inline const Aws::Vector<Aws::String>& GetSubnetIds() const { return m_subnetIds; }
105 inline bool SubnetIdsHasBeenSet() const { return m_subnetIdsHasBeenSet; }
106 template <typename SubnetIdsT = Aws::Vector<Aws::String>>
107 void SetSubnetIds(SubnetIdsT&& value) {
108 m_subnetIdsHasBeenSet = true;
109 m_subnetIds = std::forward<SubnetIdsT>(value);
110 }
111 template <typename SubnetIdsT = Aws::Vector<Aws::String>>
113 SetSubnetIds(std::forward<SubnetIdsT>(value));
114 return *this;
115 }
116 template <typename SubnetIdsT = Aws::String>
118 m_subnetIdsHasBeenSet = true;
119 m_subnetIds.emplace_back(std::forward<SubnetIdsT>(value));
120 return *this;
121 }
123
125
145 inline PurchaseOption GetPurchaseOption() const { return m_purchaseOption; }
146 inline bool PurchaseOptionHasBeenSet() const { return m_purchaseOptionHasBeenSet; }
148 m_purchaseOptionHasBeenSet = true;
149 m_purchaseOption = value;
150 }
152 SetPurchaseOption(value);
153 return *this;
154 }
156
158
159 inline const CustomLaunchTemplate& GetCustomLaunchTemplate() const { return m_customLaunchTemplate; }
160 inline bool CustomLaunchTemplateHasBeenSet() const { return m_customLaunchTemplateHasBeenSet; }
161 template <typename CustomLaunchTemplateT = CustomLaunchTemplate>
162 void SetCustomLaunchTemplate(CustomLaunchTemplateT&& value) {
163 m_customLaunchTemplateHasBeenSet = true;
164 m_customLaunchTemplate = std::forward<CustomLaunchTemplateT>(value);
165 }
166 template <typename CustomLaunchTemplateT = CustomLaunchTemplate>
168 SetCustomLaunchTemplate(std::forward<CustomLaunchTemplateT>(value));
169 return *this;
170 }
172
174
183 inline const Aws::String& GetIamInstanceProfileArn() const { return m_iamInstanceProfileArn; }
184 inline bool IamInstanceProfileArnHasBeenSet() const { return m_iamInstanceProfileArnHasBeenSet; }
185 template <typename IamInstanceProfileArnT = Aws::String>
186 void SetIamInstanceProfileArn(IamInstanceProfileArnT&& value) {
187 m_iamInstanceProfileArnHasBeenSet = true;
188 m_iamInstanceProfileArn = std::forward<IamInstanceProfileArnT>(value);
189 }
190 template <typename IamInstanceProfileArnT = Aws::String>
192 SetIamInstanceProfileArn(std::forward<IamInstanceProfileArnT>(value));
193 return *this;
194 }
196
198
201 inline const ScalingConfigurationRequest& GetScalingConfiguration() const { return m_scalingConfiguration; }
202 inline bool ScalingConfigurationHasBeenSet() const { return m_scalingConfigurationHasBeenSet; }
203 template <typename ScalingConfigurationT = ScalingConfigurationRequest>
204 void SetScalingConfiguration(ScalingConfigurationT&& value) {
205 m_scalingConfigurationHasBeenSet = true;
206 m_scalingConfiguration = std::forward<ScalingConfigurationT>(value);
207 }
208 template <typename ScalingConfigurationT = ScalingConfigurationRequest>
210 SetScalingConfiguration(std::forward<ScalingConfigurationT>(value));
211 return *this;
212 }
214
216
220 inline const Aws::Vector<InstanceConfig>& GetInstanceConfigs() const { return m_instanceConfigs; }
221 inline bool InstanceConfigsHasBeenSet() const { return m_instanceConfigsHasBeenSet; }
222 template <typename InstanceConfigsT = Aws::Vector<InstanceConfig>>
223 void SetInstanceConfigs(InstanceConfigsT&& value) {
224 m_instanceConfigsHasBeenSet = true;
225 m_instanceConfigs = std::forward<InstanceConfigsT>(value);
226 }
227 template <typename InstanceConfigsT = Aws::Vector<InstanceConfig>>
229 SetInstanceConfigs(std::forward<InstanceConfigsT>(value));
230 return *this;
231 }
232 template <typename InstanceConfigsT = InstanceConfig>
234 m_instanceConfigsHasBeenSet = true;
235 m_instanceConfigs.emplace_back(std::forward<InstanceConfigsT>(value));
236 return *this;
237 }
239
241
242 inline const SpotOptions& GetSpotOptions() const { return m_spotOptions; }
243 inline bool SpotOptionsHasBeenSet() const { return m_spotOptionsHasBeenSet; }
244 template <typename SpotOptionsT = SpotOptions>
245 void SetSpotOptions(SpotOptionsT&& value) {
246 m_spotOptionsHasBeenSet = true;
247 m_spotOptions = std::forward<SpotOptionsT>(value);
248 }
249 template <typename SpotOptionsT = SpotOptions>
251 SetSpotOptions(std::forward<SpotOptionsT>(value));
252 return *this;
253 }
255
257
260 inline const ComputeNodeGroupSlurmConfigurationRequest& GetSlurmConfiguration() const { return m_slurmConfiguration; }
261 inline bool SlurmConfigurationHasBeenSet() const { return m_slurmConfigurationHasBeenSet; }
262 template <typename SlurmConfigurationT = ComputeNodeGroupSlurmConfigurationRequest>
263 void SetSlurmConfiguration(SlurmConfigurationT&& value) {
264 m_slurmConfigurationHasBeenSet = true;
265 m_slurmConfiguration = std::forward<SlurmConfigurationT>(value);
266 }
267 template <typename SlurmConfigurationT = ComputeNodeGroupSlurmConfigurationRequest>
269 SetSlurmConfiguration(std::forward<SlurmConfigurationT>(value));
270 return *this;
271 }
273
275
281 inline const NodeLifecycleActionsRequest& GetNodeLifecycleActions() const { return m_nodeLifecycleActions; }
282 inline bool NodeLifecycleActionsHasBeenSet() const { return m_nodeLifecycleActionsHasBeenSet; }
283 template <typename NodeLifecycleActionsT = NodeLifecycleActionsRequest>
284 void SetNodeLifecycleActions(NodeLifecycleActionsT&& value) {
285 m_nodeLifecycleActionsHasBeenSet = true;
286 m_nodeLifecycleActions = std::forward<NodeLifecycleActionsT>(value);
287 }
288 template <typename NodeLifecycleActionsT = NodeLifecycleActionsRequest>
290 SetNodeLifecycleActions(std::forward<NodeLifecycleActionsT>(value));
291 return *this;
292 }
294
296
305 inline const Aws::String& GetClientToken() const { return m_clientToken; }
306 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
307 template <typename ClientTokenT = Aws::String>
308 void SetClientToken(ClientTokenT&& value) {
309 m_clientTokenHasBeenSet = true;
310 m_clientToken = std::forward<ClientTokenT>(value);
311 }
312 template <typename ClientTokenT = Aws::String>
314 SetClientToken(std::forward<ClientTokenT>(value));
315 return *this;
316 }
318
320
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 CreateComputeNodeGroupRequest& 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 private:
344 Aws::String m_clusterIdentifier;
345
346 Aws::String m_computeNodeGroupName;
347
348 Aws::String m_amiId;
349
350 Aws::Vector<Aws::String> m_subnetIds;
351
352 PurchaseOption m_purchaseOption{PurchaseOption::NOT_SET};
353
354 CustomLaunchTemplate m_customLaunchTemplate;
355
356 Aws::String m_iamInstanceProfileArn;
357
358 ScalingConfigurationRequest m_scalingConfiguration;
359
360 Aws::Vector<InstanceConfig> m_instanceConfigs;
361
362 SpotOptions m_spotOptions;
363
364 ComputeNodeGroupSlurmConfigurationRequest m_slurmConfiguration;
365
366 NodeLifecycleActionsRequest m_nodeLifecycleActions;
367
369
371 bool m_clusterIdentifierHasBeenSet = false;
372 bool m_computeNodeGroupNameHasBeenSet = false;
373 bool m_amiIdHasBeenSet = false;
374 bool m_subnetIdsHasBeenSet = false;
375 bool m_purchaseOptionHasBeenSet = false;
376 bool m_customLaunchTemplateHasBeenSet = false;
377 bool m_iamInstanceProfileArnHasBeenSet = false;
378 bool m_scalingConfigurationHasBeenSet = false;
379 bool m_instanceConfigsHasBeenSet = false;
380 bool m_spotOptionsHasBeenSet = false;
381 bool m_slurmConfigurationHasBeenSet = false;
382 bool m_nodeLifecycleActionsHasBeenSet = false;
383 bool m_clientTokenHasBeenSet = true;
384 bool m_tagsHasBeenSet = false;
385};
386
387} // namespace Model
388} // namespace PCS
389} // 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)
const ScalingConfigurationRequest & GetScalingConfiguration() const
CreateComputeNodeGroupRequest & AddInstanceConfigs(InstanceConfigsT &&value)
CreateComputeNodeGroupRequest & WithClusterIdentifier(ClusterIdentifierT &&value)
CreateComputeNodeGroupRequest & WithIamInstanceProfileArn(IamInstanceProfileArnT &&value)
AWS_PCS_API Aws::String SerializePayload() const override
const ComputeNodeGroupSlurmConfigurationRequest & GetSlurmConfiguration() const
CreateComputeNodeGroupRequest & WithScalingConfiguration(ScalingConfigurationT &&value)
const Aws::Vector< InstanceConfig > & GetInstanceConfigs() const
CreateComputeNodeGroupRequest & WithPurchaseOption(PurchaseOption value)
void SetComputeNodeGroupName(ComputeNodeGroupNameT &&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 & 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