AWS SDK for C++

AWS SDK for C++ Version 1.11.743

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/PurchaseOption.h>
17#include <aws/pcs/model/ScalingConfigurationRequest.h>
18#include <aws/pcs/model/SpotOptions.h>
19
20#include <utility>
21
22namespace Aws {
23namespace PCS {
24namespace Model {
25
29 public:
30 AWS_PCS_API CreateComputeNodeGroupRequest() = default;
31
32 // Service request name is the Operation name which will send this request out,
33 // each operation should has unique request name, so that we can get operation's name from this request.
34 // Note: this is not true for response, multiple operations may have the same response name,
35 // so we can not get operation's name from response.
36 inline virtual const char* GetServiceRequestName() const override { return "CreateComputeNodeGroup"; }
37
38 AWS_PCS_API Aws::String SerializePayload() const override;
39
41
43
46 inline const Aws::String& GetClusterIdentifier() const { return m_clusterIdentifier; }
47 inline bool ClusterIdentifierHasBeenSet() const { return m_clusterIdentifierHasBeenSet; }
48 template <typename ClusterIdentifierT = Aws::String>
49 void SetClusterIdentifier(ClusterIdentifierT&& value) {
50 m_clusterIdentifierHasBeenSet = true;
51 m_clusterIdentifier = std::forward<ClusterIdentifierT>(value);
52 }
53 template <typename ClusterIdentifierT = Aws::String>
55 SetClusterIdentifier(std::forward<ClusterIdentifierT>(value));
56 return *this;
57 }
59
61
64 inline const Aws::String& GetComputeNodeGroupName() const { return m_computeNodeGroupName; }
65 inline bool ComputeNodeGroupNameHasBeenSet() const { return m_computeNodeGroupNameHasBeenSet; }
66 template <typename ComputeNodeGroupNameT = Aws::String>
67 void SetComputeNodeGroupName(ComputeNodeGroupNameT&& value) {
68 m_computeNodeGroupNameHasBeenSet = true;
69 m_computeNodeGroupName = std::forward<ComputeNodeGroupNameT>(value);
70 }
71 template <typename ComputeNodeGroupNameT = Aws::String>
73 SetComputeNodeGroupName(std::forward<ComputeNodeGroupNameT>(value));
74 return *this;
75 }
77
79
84 inline const Aws::String& GetAmiId() const { return m_amiId; }
85 inline bool AmiIdHasBeenSet() const { return m_amiIdHasBeenSet; }
86 template <typename AmiIdT = Aws::String>
87 void SetAmiId(AmiIdT&& value) {
88 m_amiIdHasBeenSet = true;
89 m_amiId = std::forward<AmiIdT>(value);
90 }
91 template <typename AmiIdT = Aws::String>
93 SetAmiId(std::forward<AmiIdT>(value));
94 return *this;
95 }
97
99
103 inline const Aws::Vector<Aws::String>& GetSubnetIds() const { return m_subnetIds; }
104 inline bool SubnetIdsHasBeenSet() const { return m_subnetIdsHasBeenSet; }
105 template <typename SubnetIdsT = Aws::Vector<Aws::String>>
106 void SetSubnetIds(SubnetIdsT&& value) {
107 m_subnetIdsHasBeenSet = true;
108 m_subnetIds = std::forward<SubnetIdsT>(value);
109 }
110 template <typename SubnetIdsT = Aws::Vector<Aws::String>>
112 SetSubnetIds(std::forward<SubnetIdsT>(value));
113 return *this;
114 }
115 template <typename SubnetIdsT = Aws::String>
117 m_subnetIdsHasBeenSet = true;
118 m_subnetIds.emplace_back(std::forward<SubnetIdsT>(value));
119 return *this;
120 }
122
124
136 inline PurchaseOption GetPurchaseOption() const { return m_purchaseOption; }
137 inline bool PurchaseOptionHasBeenSet() const { return m_purchaseOptionHasBeenSet; }
139 m_purchaseOptionHasBeenSet = true;
140 m_purchaseOption = value;
141 }
143 SetPurchaseOption(value);
144 return *this;
145 }
147
149
150 inline const CustomLaunchTemplate& GetCustomLaunchTemplate() const { return m_customLaunchTemplate; }
151 inline bool CustomLaunchTemplateHasBeenSet() const { return m_customLaunchTemplateHasBeenSet; }
152 template <typename CustomLaunchTemplateT = CustomLaunchTemplate>
153 void SetCustomLaunchTemplate(CustomLaunchTemplateT&& value) {
154 m_customLaunchTemplateHasBeenSet = true;
155 m_customLaunchTemplate = std::forward<CustomLaunchTemplateT>(value);
156 }
157 template <typename CustomLaunchTemplateT = CustomLaunchTemplate>
159 SetCustomLaunchTemplate(std::forward<CustomLaunchTemplateT>(value));
160 return *this;
161 }
163
165
174 inline const Aws::String& GetIamInstanceProfileArn() const { return m_iamInstanceProfileArn; }
175 inline bool IamInstanceProfileArnHasBeenSet() const { return m_iamInstanceProfileArnHasBeenSet; }
176 template <typename IamInstanceProfileArnT = Aws::String>
177 void SetIamInstanceProfileArn(IamInstanceProfileArnT&& value) {
178 m_iamInstanceProfileArnHasBeenSet = true;
179 m_iamInstanceProfileArn = std::forward<IamInstanceProfileArnT>(value);
180 }
181 template <typename IamInstanceProfileArnT = Aws::String>
183 SetIamInstanceProfileArn(std::forward<IamInstanceProfileArnT>(value));
184 return *this;
185 }
187
189
192 inline const ScalingConfigurationRequest& GetScalingConfiguration() const { return m_scalingConfiguration; }
193 inline bool ScalingConfigurationHasBeenSet() const { return m_scalingConfigurationHasBeenSet; }
194 template <typename ScalingConfigurationT = ScalingConfigurationRequest>
195 void SetScalingConfiguration(ScalingConfigurationT&& value) {
196 m_scalingConfigurationHasBeenSet = true;
197 m_scalingConfiguration = std::forward<ScalingConfigurationT>(value);
198 }
199 template <typename ScalingConfigurationT = ScalingConfigurationRequest>
201 SetScalingConfiguration(std::forward<ScalingConfigurationT>(value));
202 return *this;
203 }
205
207
211 inline const Aws::Vector<InstanceConfig>& GetInstanceConfigs() const { return m_instanceConfigs; }
212 inline bool InstanceConfigsHasBeenSet() const { return m_instanceConfigsHasBeenSet; }
213 template <typename InstanceConfigsT = Aws::Vector<InstanceConfig>>
214 void SetInstanceConfigs(InstanceConfigsT&& value) {
215 m_instanceConfigsHasBeenSet = true;
216 m_instanceConfigs = std::forward<InstanceConfigsT>(value);
217 }
218 template <typename InstanceConfigsT = Aws::Vector<InstanceConfig>>
220 SetInstanceConfigs(std::forward<InstanceConfigsT>(value));
221 return *this;
222 }
223 template <typename InstanceConfigsT = InstanceConfig>
225 m_instanceConfigsHasBeenSet = true;
226 m_instanceConfigs.emplace_back(std::forward<InstanceConfigsT>(value));
227 return *this;
228 }
230
232
233 inline const SpotOptions& GetSpotOptions() const { return m_spotOptions; }
234 inline bool SpotOptionsHasBeenSet() const { return m_spotOptionsHasBeenSet; }
235 template <typename SpotOptionsT = SpotOptions>
236 void SetSpotOptions(SpotOptionsT&& value) {
237 m_spotOptionsHasBeenSet = true;
238 m_spotOptions = std::forward<SpotOptionsT>(value);
239 }
240 template <typename SpotOptionsT = SpotOptions>
242 SetSpotOptions(std::forward<SpotOptionsT>(value));
243 return *this;
244 }
246
248
251 inline const ComputeNodeGroupSlurmConfigurationRequest& GetSlurmConfiguration() const { return m_slurmConfiguration; }
252 inline bool SlurmConfigurationHasBeenSet() const { return m_slurmConfigurationHasBeenSet; }
253 template <typename SlurmConfigurationT = ComputeNodeGroupSlurmConfigurationRequest>
254 void SetSlurmConfiguration(SlurmConfigurationT&& value) {
255 m_slurmConfigurationHasBeenSet = true;
256 m_slurmConfiguration = std::forward<SlurmConfigurationT>(value);
257 }
258 template <typename SlurmConfigurationT = ComputeNodeGroupSlurmConfigurationRequest>
260 SetSlurmConfiguration(std::forward<SlurmConfigurationT>(value));
261 return *this;
262 }
264
266
275 inline const Aws::String& GetClientToken() const { return m_clientToken; }
276 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
277 template <typename ClientTokenT = Aws::String>
278 void SetClientToken(ClientTokenT&& value) {
279 m_clientTokenHasBeenSet = true;
280 m_clientToken = std::forward<ClientTokenT>(value);
281 }
282 template <typename ClientTokenT = Aws::String>
284 SetClientToken(std::forward<ClientTokenT>(value));
285 return *this;
286 }
288
290
294 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
295 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
296 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
297 void SetTags(TagsT&& value) {
298 m_tagsHasBeenSet = true;
299 m_tags = std::forward<TagsT>(value);
300 }
301 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
303 SetTags(std::forward<TagsT>(value));
304 return *this;
305 }
306 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
307 CreateComputeNodeGroupRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
308 m_tagsHasBeenSet = true;
309 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
310 return *this;
311 }
313 private:
314 Aws::String m_clusterIdentifier;
315
316 Aws::String m_computeNodeGroupName;
317
318 Aws::String m_amiId;
319
320 Aws::Vector<Aws::String> m_subnetIds;
321
322 PurchaseOption m_purchaseOption{PurchaseOption::NOT_SET};
323
324 CustomLaunchTemplate m_customLaunchTemplate;
325
326 Aws::String m_iamInstanceProfileArn;
327
328 ScalingConfigurationRequest m_scalingConfiguration;
329
330 Aws::Vector<InstanceConfig> m_instanceConfigs;
331
332 SpotOptions m_spotOptions;
333
334 ComputeNodeGroupSlurmConfigurationRequest m_slurmConfiguration;
335
337
339 bool m_clusterIdentifierHasBeenSet = false;
340 bool m_computeNodeGroupNameHasBeenSet = false;
341 bool m_amiIdHasBeenSet = false;
342 bool m_subnetIdsHasBeenSet = false;
343 bool m_purchaseOptionHasBeenSet = false;
344 bool m_customLaunchTemplateHasBeenSet = false;
345 bool m_iamInstanceProfileArnHasBeenSet = false;
346 bool m_scalingConfigurationHasBeenSet = false;
347 bool m_instanceConfigsHasBeenSet = false;
348 bool m_spotOptionsHasBeenSet = false;
349 bool m_slurmConfigurationHasBeenSet = false;
350 bool m_clientTokenHasBeenSet = true;
351 bool m_tagsHasBeenSet = false;
352};
353
354} // namespace Model
355} // namespace PCS
356} // namespace Aws
void SetIamInstanceProfileArn(IamInstanceProfileArnT &&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)
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