AWS SDK for C++

AWS SDK for C++ Version 1.11.807

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
144 inline PurchaseOption GetPurchaseOption() const { return m_purchaseOption; }
145 inline bool PurchaseOptionHasBeenSet() const { return m_purchaseOptionHasBeenSet; }
147 m_purchaseOptionHasBeenSet = true;
148 m_purchaseOption = value;
149 }
151 SetPurchaseOption(value);
152 return *this;
153 }
155
157
158 inline const CustomLaunchTemplate& GetCustomLaunchTemplate() const { return m_customLaunchTemplate; }
159 inline bool CustomLaunchTemplateHasBeenSet() const { return m_customLaunchTemplateHasBeenSet; }
160 template <typename CustomLaunchTemplateT = CustomLaunchTemplate>
161 void SetCustomLaunchTemplate(CustomLaunchTemplateT&& value) {
162 m_customLaunchTemplateHasBeenSet = true;
163 m_customLaunchTemplate = std::forward<CustomLaunchTemplateT>(value);
164 }
165 template <typename CustomLaunchTemplateT = CustomLaunchTemplate>
167 SetCustomLaunchTemplate(std::forward<CustomLaunchTemplateT>(value));
168 return *this;
169 }
171
173
182 inline const Aws::String& GetIamInstanceProfileArn() const { return m_iamInstanceProfileArn; }
183 inline bool IamInstanceProfileArnHasBeenSet() const { return m_iamInstanceProfileArnHasBeenSet; }
184 template <typename IamInstanceProfileArnT = Aws::String>
185 void SetIamInstanceProfileArn(IamInstanceProfileArnT&& value) {
186 m_iamInstanceProfileArnHasBeenSet = true;
187 m_iamInstanceProfileArn = std::forward<IamInstanceProfileArnT>(value);
188 }
189 template <typename IamInstanceProfileArnT = Aws::String>
191 SetIamInstanceProfileArn(std::forward<IamInstanceProfileArnT>(value));
192 return *this;
193 }
195
197
200 inline const ScalingConfigurationRequest& GetScalingConfiguration() const { return m_scalingConfiguration; }
201 inline bool ScalingConfigurationHasBeenSet() const { return m_scalingConfigurationHasBeenSet; }
202 template <typename ScalingConfigurationT = ScalingConfigurationRequest>
203 void SetScalingConfiguration(ScalingConfigurationT&& value) {
204 m_scalingConfigurationHasBeenSet = true;
205 m_scalingConfiguration = std::forward<ScalingConfigurationT>(value);
206 }
207 template <typename ScalingConfigurationT = ScalingConfigurationRequest>
209 SetScalingConfiguration(std::forward<ScalingConfigurationT>(value));
210 return *this;
211 }
213
215
219 inline const Aws::Vector<InstanceConfig>& GetInstanceConfigs() const { return m_instanceConfigs; }
220 inline bool InstanceConfigsHasBeenSet() const { return m_instanceConfigsHasBeenSet; }
221 template <typename InstanceConfigsT = Aws::Vector<InstanceConfig>>
222 void SetInstanceConfigs(InstanceConfigsT&& value) {
223 m_instanceConfigsHasBeenSet = true;
224 m_instanceConfigs = std::forward<InstanceConfigsT>(value);
225 }
226 template <typename InstanceConfigsT = Aws::Vector<InstanceConfig>>
228 SetInstanceConfigs(std::forward<InstanceConfigsT>(value));
229 return *this;
230 }
231 template <typename InstanceConfigsT = InstanceConfig>
233 m_instanceConfigsHasBeenSet = true;
234 m_instanceConfigs.emplace_back(std::forward<InstanceConfigsT>(value));
235 return *this;
236 }
238
240
241 inline const SpotOptions& GetSpotOptions() const { return m_spotOptions; }
242 inline bool SpotOptionsHasBeenSet() const { return m_spotOptionsHasBeenSet; }
243 template <typename SpotOptionsT = SpotOptions>
244 void SetSpotOptions(SpotOptionsT&& value) {
245 m_spotOptionsHasBeenSet = true;
246 m_spotOptions = std::forward<SpotOptionsT>(value);
247 }
248 template <typename SpotOptionsT = SpotOptions>
250 SetSpotOptions(std::forward<SpotOptionsT>(value));
251 return *this;
252 }
254
256
259 inline const ComputeNodeGroupSlurmConfigurationRequest& GetSlurmConfiguration() const { return m_slurmConfiguration; }
260 inline bool SlurmConfigurationHasBeenSet() const { return m_slurmConfigurationHasBeenSet; }
261 template <typename SlurmConfigurationT = ComputeNodeGroupSlurmConfigurationRequest>
262 void SetSlurmConfiguration(SlurmConfigurationT&& value) {
263 m_slurmConfigurationHasBeenSet = true;
264 m_slurmConfiguration = std::forward<SlurmConfigurationT>(value);
265 }
266 template <typename SlurmConfigurationT = ComputeNodeGroupSlurmConfigurationRequest>
268 SetSlurmConfiguration(std::forward<SlurmConfigurationT>(value));
269 return *this;
270 }
272
274
283 inline const Aws::String& GetClientToken() const { return m_clientToken; }
284 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
285 template <typename ClientTokenT = Aws::String>
286 void SetClientToken(ClientTokenT&& value) {
287 m_clientTokenHasBeenSet = true;
288 m_clientToken = std::forward<ClientTokenT>(value);
289 }
290 template <typename ClientTokenT = Aws::String>
292 SetClientToken(std::forward<ClientTokenT>(value));
293 return *this;
294 }
296
298
302 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
303 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
304 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
305 void SetTags(TagsT&& value) {
306 m_tagsHasBeenSet = true;
307 m_tags = std::forward<TagsT>(value);
308 }
309 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
311 SetTags(std::forward<TagsT>(value));
312 return *this;
313 }
314 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
315 CreateComputeNodeGroupRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
316 m_tagsHasBeenSet = true;
317 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
318 return *this;
319 }
321 private:
322 Aws::String m_clusterIdentifier;
323
324 Aws::String m_computeNodeGroupName;
325
326 Aws::String m_amiId;
327
328 Aws::Vector<Aws::String> m_subnetIds;
329
330 PurchaseOption m_purchaseOption{PurchaseOption::NOT_SET};
331
332 CustomLaunchTemplate m_customLaunchTemplate;
333
334 Aws::String m_iamInstanceProfileArn;
335
336 ScalingConfigurationRequest m_scalingConfiguration;
337
338 Aws::Vector<InstanceConfig> m_instanceConfigs;
339
340 SpotOptions m_spotOptions;
341
342 ComputeNodeGroupSlurmConfigurationRequest m_slurmConfiguration;
343
345
347 bool m_clusterIdentifierHasBeenSet = false;
348 bool m_computeNodeGroupNameHasBeenSet = false;
349 bool m_amiIdHasBeenSet = false;
350 bool m_subnetIdsHasBeenSet = false;
351 bool m_purchaseOptionHasBeenSet = false;
352 bool m_customLaunchTemplateHasBeenSet = false;
353 bool m_iamInstanceProfileArnHasBeenSet = false;
354 bool m_scalingConfigurationHasBeenSet = false;
355 bool m_instanceConfigsHasBeenSet = false;
356 bool m_spotOptionsHasBeenSet = false;
357 bool m_slurmConfigurationHasBeenSet = false;
358 bool m_clientTokenHasBeenSet = true;
359 bool m_tagsHasBeenSet = false;
360};
361
362} // namespace Model
363} // namespace PCS
364} // 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