AWS SDK for C++

AWS SDK for C++ Version 1.11.718

Loading...
Searching...
No Matches
CreateClusterRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/sagemaker/SageMakerRequest.h>
10#include <aws/sagemaker/SageMaker_EXPORTS.h>
11#include <aws/sagemaker/model/ClusterAutoScalingConfig.h>
12#include <aws/sagemaker/model/ClusterInstanceGroupSpecification.h>
13#include <aws/sagemaker/model/ClusterNodeProvisioningMode.h>
14#include <aws/sagemaker/model/ClusterNodeRecovery.h>
15#include <aws/sagemaker/model/ClusterOrchestrator.h>
16#include <aws/sagemaker/model/ClusterRestrictedInstanceGroupSpecification.h>
17#include <aws/sagemaker/model/ClusterTieredStorageConfig.h>
18#include <aws/sagemaker/model/Tag.h>
19#include <aws/sagemaker/model/VpcConfig.h>
20
21#include <utility>
22
23namespace Aws {
24namespace SageMaker {
25namespace Model {
26
30 public:
31 AWS_SAGEMAKER_API CreateClusterRequest() = 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 "CreateCluster"; }
38
39 AWS_SAGEMAKER_API Aws::String SerializePayload() const override;
40
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 CreateClusterRequest& WithClusterName(ClusterNameT&& value) {
56 SetClusterName(std::forward<ClusterNameT>(value));
57 return *this;
58 }
60
62
65 inline const Aws::Vector<ClusterInstanceGroupSpecification>& GetInstanceGroups() const { return m_instanceGroups; }
66 inline bool InstanceGroupsHasBeenSet() const { return m_instanceGroupsHasBeenSet; }
67 template <typename InstanceGroupsT = Aws::Vector<ClusterInstanceGroupSpecification>>
68 void SetInstanceGroups(InstanceGroupsT&& value) {
69 m_instanceGroupsHasBeenSet = true;
70 m_instanceGroups = std::forward<InstanceGroupsT>(value);
71 }
72 template <typename InstanceGroupsT = Aws::Vector<ClusterInstanceGroupSpecification>>
73 CreateClusterRequest& WithInstanceGroups(InstanceGroupsT&& value) {
74 SetInstanceGroups(std::forward<InstanceGroupsT>(value));
75 return *this;
76 }
77 template <typename InstanceGroupsT = ClusterInstanceGroupSpecification>
78 CreateClusterRequest& AddInstanceGroups(InstanceGroupsT&& value) {
79 m_instanceGroupsHasBeenSet = true;
80 m_instanceGroups.emplace_back(std::forward<InstanceGroupsT>(value));
81 return *this;
82 }
84
86
91 return m_restrictedInstanceGroups;
92 }
93 inline bool RestrictedInstanceGroupsHasBeenSet() const { return m_restrictedInstanceGroupsHasBeenSet; }
94 template <typename RestrictedInstanceGroupsT = Aws::Vector<ClusterRestrictedInstanceGroupSpecification>>
95 void SetRestrictedInstanceGroups(RestrictedInstanceGroupsT&& value) {
96 m_restrictedInstanceGroupsHasBeenSet = true;
97 m_restrictedInstanceGroups = std::forward<RestrictedInstanceGroupsT>(value);
98 }
99 template <typename RestrictedInstanceGroupsT = Aws::Vector<ClusterRestrictedInstanceGroupSpecification>>
100 CreateClusterRequest& WithRestrictedInstanceGroups(RestrictedInstanceGroupsT&& value) {
101 SetRestrictedInstanceGroups(std::forward<RestrictedInstanceGroupsT>(value));
102 return *this;
103 }
104 template <typename RestrictedInstanceGroupsT = ClusterRestrictedInstanceGroupSpecification>
105 CreateClusterRequest& AddRestrictedInstanceGroups(RestrictedInstanceGroupsT&& value) {
106 m_restrictedInstanceGroupsHasBeenSet = true;
107 m_restrictedInstanceGroups.emplace_back(std::forward<RestrictedInstanceGroupsT>(value));
108 return *this;
109 }
111
113
139 inline const VpcConfig& GetVpcConfig() const { return m_vpcConfig; }
140 inline bool VpcConfigHasBeenSet() const { return m_vpcConfigHasBeenSet; }
141 template <typename VpcConfigT = VpcConfig>
142 void SetVpcConfig(VpcConfigT&& value) {
143 m_vpcConfigHasBeenSet = true;
144 m_vpcConfig = std::forward<VpcConfigT>(value);
145 }
146 template <typename VpcConfigT = VpcConfig>
147 CreateClusterRequest& WithVpcConfig(VpcConfigT&& value) {
148 SetVpcConfig(std::forward<VpcConfigT>(value));
149 return *this;
150 }
152
154
162 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
163 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
164 template <typename TagsT = Aws::Vector<Tag>>
165 void SetTags(TagsT&& value) {
166 m_tagsHasBeenSet = true;
167 m_tags = std::forward<TagsT>(value);
168 }
169 template <typename TagsT = Aws::Vector<Tag>>
171 SetTags(std::forward<TagsT>(value));
172 return *this;
173 }
174 template <typename TagsT = Tag>
176 m_tagsHasBeenSet = true;
177 m_tags.emplace_back(std::forward<TagsT>(value));
178 return *this;
179 }
181
183
188 inline const ClusterOrchestrator& GetOrchestrator() const { return m_orchestrator; }
189 inline bool OrchestratorHasBeenSet() const { return m_orchestratorHasBeenSet; }
190 template <typename OrchestratorT = ClusterOrchestrator>
191 void SetOrchestrator(OrchestratorT&& value) {
192 m_orchestratorHasBeenSet = true;
193 m_orchestrator = std::forward<OrchestratorT>(value);
194 }
195 template <typename OrchestratorT = ClusterOrchestrator>
196 CreateClusterRequest& WithOrchestrator(OrchestratorT&& value) {
197 SetOrchestrator(std::forward<OrchestratorT>(value));
198 return *this;
199 }
201
203
209 inline ClusterNodeRecovery GetNodeRecovery() const { return m_nodeRecovery; }
210 inline bool NodeRecoveryHasBeenSet() const { return m_nodeRecoveryHasBeenSet; }
212 m_nodeRecoveryHasBeenSet = true;
213 m_nodeRecovery = value;
214 }
216 SetNodeRecovery(value);
217 return *this;
218 }
220
222
228 inline const ClusterTieredStorageConfig& GetTieredStorageConfig() const { return m_tieredStorageConfig; }
229 inline bool TieredStorageConfigHasBeenSet() const { return m_tieredStorageConfigHasBeenSet; }
230 template <typename TieredStorageConfigT = ClusterTieredStorageConfig>
231 void SetTieredStorageConfig(TieredStorageConfigT&& value) {
232 m_tieredStorageConfigHasBeenSet = true;
233 m_tieredStorageConfig = std::forward<TieredStorageConfigT>(value);
234 }
235 template <typename TieredStorageConfigT = ClusterTieredStorageConfig>
236 CreateClusterRequest& WithTieredStorageConfig(TieredStorageConfigT&& value) {
237 SetTieredStorageConfig(std::forward<TieredStorageConfigT>(value));
238 return *this;
239 }
241
243
252 inline ClusterNodeProvisioningMode GetNodeProvisioningMode() const { return m_nodeProvisioningMode; }
253 inline bool NodeProvisioningModeHasBeenSet() const { return m_nodeProvisioningModeHasBeenSet; }
255 m_nodeProvisioningModeHasBeenSet = true;
256 m_nodeProvisioningMode = value;
257 }
260 return *this;
261 }
263
265
273 inline const Aws::String& GetClusterRole() const { return m_clusterRole; }
274 inline bool ClusterRoleHasBeenSet() const { return m_clusterRoleHasBeenSet; }
275 template <typename ClusterRoleT = Aws::String>
276 void SetClusterRole(ClusterRoleT&& value) {
277 m_clusterRoleHasBeenSet = true;
278 m_clusterRole = std::forward<ClusterRoleT>(value);
279 }
280 template <typename ClusterRoleT = Aws::String>
281 CreateClusterRequest& WithClusterRole(ClusterRoleT&& value) {
282 SetClusterRole(std::forward<ClusterRoleT>(value));
283 return *this;
284 }
286
288
292 inline const ClusterAutoScalingConfig& GetAutoScaling() const { return m_autoScaling; }
293 inline bool AutoScalingHasBeenSet() const { return m_autoScalingHasBeenSet; }
294 template <typename AutoScalingT = ClusterAutoScalingConfig>
295 void SetAutoScaling(AutoScalingT&& value) {
296 m_autoScalingHasBeenSet = true;
297 m_autoScaling = std::forward<AutoScalingT>(value);
298 }
299 template <typename AutoScalingT = ClusterAutoScalingConfig>
300 CreateClusterRequest& WithAutoScaling(AutoScalingT&& value) {
301 SetAutoScaling(std::forward<AutoScalingT>(value));
302 return *this;
303 }
305 private:
306 Aws::String m_clusterName;
307
309
311
312 VpcConfig m_vpcConfig;
313
314 Aws::Vector<Tag> m_tags;
315
316 ClusterOrchestrator m_orchestrator;
317
319
320 ClusterTieredStorageConfig m_tieredStorageConfig;
321
323
324 Aws::String m_clusterRole;
325
326 ClusterAutoScalingConfig m_autoScaling;
327 bool m_clusterNameHasBeenSet = false;
328 bool m_instanceGroupsHasBeenSet = false;
329 bool m_restrictedInstanceGroupsHasBeenSet = false;
330 bool m_vpcConfigHasBeenSet = false;
331 bool m_tagsHasBeenSet = false;
332 bool m_orchestratorHasBeenSet = false;
333 bool m_nodeRecoveryHasBeenSet = false;
334 bool m_tieredStorageConfigHasBeenSet = false;
335 bool m_nodeProvisioningModeHasBeenSet = false;
336 bool m_clusterRoleHasBeenSet = false;
337 bool m_autoScalingHasBeenSet = false;
338};
339
340} // namespace Model
341} // namespace SageMaker
342} // namespace Aws
CreateClusterRequest & WithOrchestrator(OrchestratorT &&value)
const ClusterOrchestrator & GetOrchestrator() const
ClusterNodeProvisioningMode GetNodeProvisioningMode() const
const Aws::Vector< Tag > & GetTags() const
CreateClusterRequest & WithRestrictedInstanceGroups(RestrictedInstanceGroupsT &&value)
CreateClusterRequest & AddTags(TagsT &&value)
CreateClusterRequest & AddInstanceGroups(InstanceGroupsT &&value)
CreateClusterRequest & WithInstanceGroups(InstanceGroupsT &&value)
CreateClusterRequest & WithClusterName(ClusterNameT &&value)
CreateClusterRequest & WithClusterRole(ClusterRoleT &&value)
CreateClusterRequest & WithTags(TagsT &&value)
AWS_SAGEMAKER_API Aws::String SerializePayload() const override
AWS_SAGEMAKER_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
virtual const char * GetServiceRequestName() const override
const ClusterTieredStorageConfig & GetTieredStorageConfig() const
CreateClusterRequest & WithNodeProvisioningMode(ClusterNodeProvisioningMode value)
const Aws::Vector< ClusterRestrictedInstanceGroupSpecification > & GetRestrictedInstanceGroups() const
void SetTieredStorageConfig(TieredStorageConfigT &&value)
CreateClusterRequest & WithNodeRecovery(ClusterNodeRecovery value)
void SetNodeProvisioningMode(ClusterNodeProvisioningMode value)
const Aws::Vector< ClusterInstanceGroupSpecification > & GetInstanceGroups() const
CreateClusterRequest & WithVpcConfig(VpcConfigT &&value)
CreateClusterRequest & WithTieredStorageConfig(TieredStorageConfigT &&value)
const ClusterAutoScalingConfig & GetAutoScaling() const
CreateClusterRequest & WithAutoScaling(AutoScalingT &&value)
AWS_SAGEMAKER_API CreateClusterRequest()=default
void SetRestrictedInstanceGroups(RestrictedInstanceGroupsT &&value)
void SetInstanceGroups(InstanceGroupsT &&value)
CreateClusterRequest & AddRestrictedInstanceGroups(RestrictedInstanceGroupsT &&value)
void SetNodeRecovery(ClusterNodeRecovery value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector