AWS SDK for C++

AWS SDK for C++ Version 1.11.834

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/ClusterRestrictedInstanceGroupsConfig.h>
18#include <aws/sagemaker/model/ClusterTieredStorageConfig.h>
19#include <aws/sagemaker/model/Tag.h>
20#include <aws/sagemaker/model/VpcConfig.h>
21
22#include <utility>
23
24namespace Aws {
25namespace SageMaker {
26namespace Model {
27
31 public:
32 AWS_SAGEMAKER_API CreateClusterRequest() = 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 "CreateCluster"; }
39
40 AWS_SAGEMAKER_API Aws::String SerializePayload() const override;
41
43
45
48 inline const Aws::String& GetClusterName() const { return m_clusterName; }
49 inline bool ClusterNameHasBeenSet() const { return m_clusterNameHasBeenSet; }
50 template <typename ClusterNameT = Aws::String>
51 void SetClusterName(ClusterNameT&& value) {
52 m_clusterNameHasBeenSet = true;
53 m_clusterName = std::forward<ClusterNameT>(value);
54 }
55 template <typename ClusterNameT = Aws::String>
56 CreateClusterRequest& WithClusterName(ClusterNameT&& value) {
57 SetClusterName(std::forward<ClusterNameT>(value));
58 return *this;
59 }
61
63
66 inline const Aws::Vector<ClusterInstanceGroupSpecification>& GetInstanceGroups() const { return m_instanceGroups; }
67 inline bool InstanceGroupsHasBeenSet() const { return m_instanceGroupsHasBeenSet; }
68 template <typename InstanceGroupsT = Aws::Vector<ClusterInstanceGroupSpecification>>
69 void SetInstanceGroups(InstanceGroupsT&& value) {
70 m_instanceGroupsHasBeenSet = true;
71 m_instanceGroups = std::forward<InstanceGroupsT>(value);
72 }
73 template <typename InstanceGroupsT = Aws::Vector<ClusterInstanceGroupSpecification>>
74 CreateClusterRequest& WithInstanceGroups(InstanceGroupsT&& value) {
75 SetInstanceGroups(std::forward<InstanceGroupsT>(value));
76 return *this;
77 }
78 template <typename InstanceGroupsT = ClusterInstanceGroupSpecification>
79 CreateClusterRequest& AddInstanceGroups(InstanceGroupsT&& value) {
80 m_instanceGroupsHasBeenSet = true;
81 m_instanceGroups.emplace_back(std::forward<InstanceGroupsT>(value));
82 return *this;
83 }
85
87
92 return m_restrictedInstanceGroups;
93 }
94 inline bool RestrictedInstanceGroupsHasBeenSet() const { return m_restrictedInstanceGroupsHasBeenSet; }
95 template <typename RestrictedInstanceGroupsT = Aws::Vector<ClusterRestrictedInstanceGroupSpecification>>
96 void SetRestrictedInstanceGroups(RestrictedInstanceGroupsT&& value) {
97 m_restrictedInstanceGroupsHasBeenSet = true;
98 m_restrictedInstanceGroups = std::forward<RestrictedInstanceGroupsT>(value);
99 }
100 template <typename RestrictedInstanceGroupsT = Aws::Vector<ClusterRestrictedInstanceGroupSpecification>>
101 CreateClusterRequest& WithRestrictedInstanceGroups(RestrictedInstanceGroupsT&& value) {
102 SetRestrictedInstanceGroups(std::forward<RestrictedInstanceGroupsT>(value));
103 return *this;
104 }
105 template <typename RestrictedInstanceGroupsT = ClusterRestrictedInstanceGroupSpecification>
106 CreateClusterRequest& AddRestrictedInstanceGroups(RestrictedInstanceGroupsT&& value) {
107 m_restrictedInstanceGroupsHasBeenSet = true;
108 m_restrictedInstanceGroups.emplace_back(std::forward<RestrictedInstanceGroupsT>(value));
109 return *this;
110 }
112
114
118 inline const ClusterRestrictedInstanceGroupsConfig& GetRestrictedInstanceGroupsConfig() const { return m_restrictedInstanceGroupsConfig; }
119 inline bool RestrictedInstanceGroupsConfigHasBeenSet() const { return m_restrictedInstanceGroupsConfigHasBeenSet; }
120 template <typename RestrictedInstanceGroupsConfigT = ClusterRestrictedInstanceGroupsConfig>
121 void SetRestrictedInstanceGroupsConfig(RestrictedInstanceGroupsConfigT&& value) {
122 m_restrictedInstanceGroupsConfigHasBeenSet = true;
123 m_restrictedInstanceGroupsConfig = std::forward<RestrictedInstanceGroupsConfigT>(value);
124 }
125 template <typename RestrictedInstanceGroupsConfigT = ClusterRestrictedInstanceGroupsConfig>
126 CreateClusterRequest& WithRestrictedInstanceGroupsConfig(RestrictedInstanceGroupsConfigT&& value) {
127 SetRestrictedInstanceGroupsConfig(std::forward<RestrictedInstanceGroupsConfigT>(value));
128 return *this;
129 }
131
133
159 inline const VpcConfig& GetVpcConfig() const { return m_vpcConfig; }
160 inline bool VpcConfigHasBeenSet() const { return m_vpcConfigHasBeenSet; }
161 template <typename VpcConfigT = VpcConfig>
162 void SetVpcConfig(VpcConfigT&& value) {
163 m_vpcConfigHasBeenSet = true;
164 m_vpcConfig = std::forward<VpcConfigT>(value);
165 }
166 template <typename VpcConfigT = VpcConfig>
167 CreateClusterRequest& WithVpcConfig(VpcConfigT&& value) {
168 SetVpcConfig(std::forward<VpcConfigT>(value));
169 return *this;
170 }
172
174
182 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
183 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
184 template <typename TagsT = Aws::Vector<Tag>>
185 void SetTags(TagsT&& value) {
186 m_tagsHasBeenSet = true;
187 m_tags = std::forward<TagsT>(value);
188 }
189 template <typename TagsT = Aws::Vector<Tag>>
191 SetTags(std::forward<TagsT>(value));
192 return *this;
193 }
194 template <typename TagsT = Tag>
196 m_tagsHasBeenSet = true;
197 m_tags.emplace_back(std::forward<TagsT>(value));
198 return *this;
199 }
201
203
212 inline const ClusterOrchestrator& GetOrchestrator() const { return m_orchestrator; }
213 inline bool OrchestratorHasBeenSet() const { return m_orchestratorHasBeenSet; }
214 template <typename OrchestratorT = ClusterOrchestrator>
215 void SetOrchestrator(OrchestratorT&& value) {
216 m_orchestratorHasBeenSet = true;
217 m_orchestrator = std::forward<OrchestratorT>(value);
218 }
219 template <typename OrchestratorT = ClusterOrchestrator>
220 CreateClusterRequest& WithOrchestrator(OrchestratorT&& value) {
221 SetOrchestrator(std::forward<OrchestratorT>(value));
222 return *this;
223 }
225
227
233 inline ClusterNodeRecovery GetNodeRecovery() const { return m_nodeRecovery; }
234 inline bool NodeRecoveryHasBeenSet() const { return m_nodeRecoveryHasBeenSet; }
236 m_nodeRecoveryHasBeenSet = true;
237 m_nodeRecovery = value;
238 }
240 SetNodeRecovery(value);
241 return *this;
242 }
244
246
252 inline const ClusterTieredStorageConfig& GetTieredStorageConfig() const { return m_tieredStorageConfig; }
253 inline bool TieredStorageConfigHasBeenSet() const { return m_tieredStorageConfigHasBeenSet; }
254 template <typename TieredStorageConfigT = ClusterTieredStorageConfig>
255 void SetTieredStorageConfig(TieredStorageConfigT&& value) {
256 m_tieredStorageConfigHasBeenSet = true;
257 m_tieredStorageConfig = std::forward<TieredStorageConfigT>(value);
258 }
259 template <typename TieredStorageConfigT = ClusterTieredStorageConfig>
260 CreateClusterRequest& WithTieredStorageConfig(TieredStorageConfigT&& value) {
261 SetTieredStorageConfig(std::forward<TieredStorageConfigT>(value));
262 return *this;
263 }
265
267
276 inline ClusterNodeProvisioningMode GetNodeProvisioningMode() const { return m_nodeProvisioningMode; }
277 inline bool NodeProvisioningModeHasBeenSet() const { return m_nodeProvisioningModeHasBeenSet; }
279 m_nodeProvisioningModeHasBeenSet = true;
280 m_nodeProvisioningMode = value;
281 }
284 return *this;
285 }
287
289
297 inline const Aws::String& GetClusterRole() const { return m_clusterRole; }
298 inline bool ClusterRoleHasBeenSet() const { return m_clusterRoleHasBeenSet; }
299 template <typename ClusterRoleT = Aws::String>
300 void SetClusterRole(ClusterRoleT&& value) {
301 m_clusterRoleHasBeenSet = true;
302 m_clusterRole = std::forward<ClusterRoleT>(value);
303 }
304 template <typename ClusterRoleT = Aws::String>
305 CreateClusterRequest& WithClusterRole(ClusterRoleT&& value) {
306 SetClusterRole(std::forward<ClusterRoleT>(value));
307 return *this;
308 }
310
312
316 inline const ClusterAutoScalingConfig& GetAutoScaling() const { return m_autoScaling; }
317 inline bool AutoScalingHasBeenSet() const { return m_autoScalingHasBeenSet; }
318 template <typename AutoScalingT = ClusterAutoScalingConfig>
319 void SetAutoScaling(AutoScalingT&& value) {
320 m_autoScalingHasBeenSet = true;
321 m_autoScaling = std::forward<AutoScalingT>(value);
322 }
323 template <typename AutoScalingT = ClusterAutoScalingConfig>
324 CreateClusterRequest& WithAutoScaling(AutoScalingT&& value) {
325 SetAutoScaling(std::forward<AutoScalingT>(value));
326 return *this;
327 }
329 private:
330 Aws::String m_clusterName;
331
333
335
336 ClusterRestrictedInstanceGroupsConfig m_restrictedInstanceGroupsConfig;
337
338 VpcConfig m_vpcConfig;
339
340 Aws::Vector<Tag> m_tags;
341
342 ClusterOrchestrator m_orchestrator;
343
345
346 ClusterTieredStorageConfig m_tieredStorageConfig;
347
349
350 Aws::String m_clusterRole;
351
352 ClusterAutoScalingConfig m_autoScaling;
353 bool m_clusterNameHasBeenSet = false;
354 bool m_instanceGroupsHasBeenSet = false;
355 bool m_restrictedInstanceGroupsHasBeenSet = false;
356 bool m_restrictedInstanceGroupsConfigHasBeenSet = false;
357 bool m_vpcConfigHasBeenSet = false;
358 bool m_tagsHasBeenSet = false;
359 bool m_orchestratorHasBeenSet = false;
360 bool m_nodeRecoveryHasBeenSet = false;
361 bool m_tieredStorageConfigHasBeenSet = false;
362 bool m_nodeProvisioningModeHasBeenSet = false;
363 bool m_clusterRoleHasBeenSet = false;
364 bool m_autoScalingHasBeenSet = false;
365};
366
367} // namespace Model
368} // namespace SageMaker
369} // 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
CreateClusterRequest & WithRestrictedInstanceGroupsConfig(RestrictedInstanceGroupsConfigT &&value)
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
const ClusterRestrictedInstanceGroupsConfig & GetRestrictedInstanceGroupsConfig() const
CreateClusterRequest & WithAutoScaling(AutoScalingT &&value)
AWS_SAGEMAKER_API CreateClusterRequest()=default
void SetRestrictedInstanceGroups(RestrictedInstanceGroupsT &&value)
void SetInstanceGroups(InstanceGroupsT &&value)
CreateClusterRequest & AddRestrictedInstanceGroups(RestrictedInstanceGroupsT &&value)
void SetRestrictedInstanceGroupsConfig(RestrictedInstanceGroupsConfigT &&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