AWS SDK for C++

AWS SDK for C++ Version 1.11.787

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/ecs/ECSRequest.h>
10#include <aws/ecs/ECS_EXPORTS.h>
11#include <aws/ecs/model/CapacityProviderStrategyItem.h>
12#include <aws/ecs/model/ClusterConfiguration.h>
13#include <aws/ecs/model/ClusterServiceConnectDefaultsRequest.h>
14#include <aws/ecs/model/ClusterSetting.h>
15#include <aws/ecs/model/Tag.h>
16
17#include <utility>
18
19namespace Aws {
20namespace ECS {
21namespace Model {
22
29 public:
30 AWS_ECS_API CreateClusterRequest() = 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 "CreateCluster"; }
37
38 AWS_ECS_API Aws::String SerializePayload() const override;
39
41
43
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
81 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
82 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
83 template <typename TagsT = Aws::Vector<Tag>>
84 void SetTags(TagsT&& value) {
85 m_tagsHasBeenSet = true;
86 m_tags = std::forward<TagsT>(value);
87 }
88 template <typename TagsT = Aws::Vector<Tag>>
90 SetTags(std::forward<TagsT>(value));
91 return *this;
92 }
93 template <typename TagsT = Tag>
94 CreateClusterRequest& AddTags(TagsT&& value) {
95 m_tagsHasBeenSet = true;
96 m_tags.emplace_back(std::forward<TagsT>(value));
97 return *this;
98 }
100
102
110 inline const Aws::Vector<ClusterSetting>& GetSettings() const { return m_settings; }
111 inline bool SettingsHasBeenSet() const { return m_settingsHasBeenSet; }
112 template <typename SettingsT = Aws::Vector<ClusterSetting>>
113 void SetSettings(SettingsT&& value) {
114 m_settingsHasBeenSet = true;
115 m_settings = std::forward<SettingsT>(value);
116 }
117 template <typename SettingsT = Aws::Vector<ClusterSetting>>
118 CreateClusterRequest& WithSettings(SettingsT&& value) {
119 SetSettings(std::forward<SettingsT>(value));
120 return *this;
121 }
122 template <typename SettingsT = ClusterSetting>
123 CreateClusterRequest& AddSettings(SettingsT&& value) {
124 m_settingsHasBeenSet = true;
125 m_settings.emplace_back(std::forward<SettingsT>(value));
126 return *this;
127 }
129
131
134 inline const ClusterConfiguration& GetConfiguration() const { return m_configuration; }
135 inline bool ConfigurationHasBeenSet() const { return m_configurationHasBeenSet; }
136 template <typename ConfigurationT = ClusterConfiguration>
137 void SetConfiguration(ConfigurationT&& value) {
138 m_configurationHasBeenSet = true;
139 m_configuration = std::forward<ConfigurationT>(value);
140 }
141 template <typename ConfigurationT = ClusterConfiguration>
142 CreateClusterRequest& WithConfiguration(ConfigurationT&& value) {
143 SetConfiguration(std::forward<ConfigurationT>(value));
144 return *this;
145 }
147
149
169 inline const Aws::Vector<Aws::String>& GetCapacityProviders() const { return m_capacityProviders; }
170 inline bool CapacityProvidersHasBeenSet() const { return m_capacityProvidersHasBeenSet; }
171 template <typename CapacityProvidersT = Aws::Vector<Aws::String>>
172 void SetCapacityProviders(CapacityProvidersT&& value) {
173 m_capacityProvidersHasBeenSet = true;
174 m_capacityProviders = std::forward<CapacityProvidersT>(value);
175 }
176 template <typename CapacityProvidersT = Aws::Vector<Aws::String>>
177 CreateClusterRequest& WithCapacityProviders(CapacityProvidersT&& value) {
178 SetCapacityProviders(std::forward<CapacityProvidersT>(value));
179 return *this;
180 }
181 template <typename CapacityProvidersT = Aws::String>
182 CreateClusterRequest& AddCapacityProviders(CapacityProvidersT&& value) {
183 m_capacityProvidersHasBeenSet = true;
184 m_capacityProviders.emplace_back(std::forward<CapacityProvidersT>(value));
185 return *this;
186 }
188
190
204 return m_defaultCapacityProviderStrategy;
205 }
206 inline bool DefaultCapacityProviderStrategyHasBeenSet() const { return m_defaultCapacityProviderStrategyHasBeenSet; }
207 template <typename DefaultCapacityProviderStrategyT = Aws::Vector<CapacityProviderStrategyItem>>
208 void SetDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT&& value) {
209 m_defaultCapacityProviderStrategyHasBeenSet = true;
210 m_defaultCapacityProviderStrategy = std::forward<DefaultCapacityProviderStrategyT>(value);
211 }
212 template <typename DefaultCapacityProviderStrategyT = Aws::Vector<CapacityProviderStrategyItem>>
213 CreateClusterRequest& WithDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT&& value) {
214 SetDefaultCapacityProviderStrategy(std::forward<DefaultCapacityProviderStrategyT>(value));
215 return *this;
216 }
217 template <typename DefaultCapacityProviderStrategyT = CapacityProviderStrategyItem>
218 CreateClusterRequest& AddDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT&& value) {
219 m_defaultCapacityProviderStrategyHasBeenSet = true;
220 m_defaultCapacityProviderStrategy.emplace_back(std::forward<DefaultCapacityProviderStrategyT>(value));
221 return *this;
222 }
224
226
243 inline const ClusterServiceConnectDefaultsRequest& GetServiceConnectDefaults() const { return m_serviceConnectDefaults; }
244 inline bool ServiceConnectDefaultsHasBeenSet() const { return m_serviceConnectDefaultsHasBeenSet; }
245 template <typename ServiceConnectDefaultsT = ClusterServiceConnectDefaultsRequest>
246 void SetServiceConnectDefaults(ServiceConnectDefaultsT&& value) {
247 m_serviceConnectDefaultsHasBeenSet = true;
248 m_serviceConnectDefaults = std::forward<ServiceConnectDefaultsT>(value);
249 }
250 template <typename ServiceConnectDefaultsT = ClusterServiceConnectDefaultsRequest>
251 CreateClusterRequest& WithServiceConnectDefaults(ServiceConnectDefaultsT&& value) {
252 SetServiceConnectDefaults(std::forward<ServiceConnectDefaultsT>(value));
253 return *this;
254 }
256 private:
257 Aws::String m_clusterName;
258
259 Aws::Vector<Tag> m_tags;
260
262
263 ClusterConfiguration m_configuration;
264
265 Aws::Vector<Aws::String> m_capacityProviders;
266
267 Aws::Vector<CapacityProviderStrategyItem> m_defaultCapacityProviderStrategy;
268
269 ClusterServiceConnectDefaultsRequest m_serviceConnectDefaults;
270 bool m_clusterNameHasBeenSet = false;
271 bool m_tagsHasBeenSet = false;
272 bool m_settingsHasBeenSet = false;
273 bool m_configurationHasBeenSet = false;
274 bool m_capacityProvidersHasBeenSet = false;
275 bool m_defaultCapacityProviderStrategyHasBeenSet = false;
276 bool m_serviceConnectDefaultsHasBeenSet = false;
277};
278
279} // namespace Model
280} // namespace ECS
281} // namespace Aws
void SetDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT &&value)
CreateClusterRequest & WithServiceConnectDefaults(ServiceConnectDefaultsT &&value)
AWS_ECS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateClusterRequest & AddCapacityProviders(CapacityProvidersT &&value)
CreateClusterRequest & WithTags(TagsT &&value)
const Aws::Vector< ClusterSetting > & GetSettings() const
CreateClusterRequest & AddSettings(SettingsT &&value)
CreateClusterRequest & WithDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT &&value)
CreateClusterRequest & AddDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT &&value)
CreateClusterRequest & AddTags(TagsT &&value)
void SetCapacityProviders(CapacityProvidersT &&value)
const Aws::Vector< Aws::String > & GetCapacityProviders() const
AWS_ECS_API CreateClusterRequest()=default
CreateClusterRequest & WithSettings(SettingsT &&value)
const Aws::String & GetClusterName() const
virtual const char * GetServiceRequestName() const override
const Aws::Vector< Tag > & GetTags() const
const ClusterServiceConnectDefaultsRequest & GetServiceConnectDefaults() const
CreateClusterRequest & WithCapacityProviders(CapacityProvidersT &&value)
const ClusterConfiguration & GetConfiguration() const
CreateClusterRequest & WithConfiguration(ConfigurationT &&value)
void SetServiceConnectDefaults(ServiceConnectDefaultsT &&value)
const Aws::Vector< CapacityProviderStrategyItem > & GetDefaultCapacityProviderStrategy() const
void SetClusterName(ClusterNameT &&value)
AWS_ECS_API Aws::String SerializePayload() const override
CreateClusterRequest & WithClusterName(ClusterNameT &&value)
void SetConfiguration(ConfigurationT &&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