AWS SDK for C++

AWS SDK for C++ Version 1.11.743

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
26 public:
27 AWS_ECS_API CreateClusterRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "CreateCluster"; }
34
35 AWS_ECS_API Aws::String SerializePayload() const override;
36
38
40
45 inline const Aws::String& GetClusterName() const { return m_clusterName; }
46 inline bool ClusterNameHasBeenSet() const { return m_clusterNameHasBeenSet; }
47 template <typename ClusterNameT = Aws::String>
48 void SetClusterName(ClusterNameT&& value) {
49 m_clusterNameHasBeenSet = true;
50 m_clusterName = std::forward<ClusterNameT>(value);
51 }
52 template <typename ClusterNameT = Aws::String>
53 CreateClusterRequest& WithClusterName(ClusterNameT&& value) {
54 SetClusterName(std::forward<ClusterNameT>(value));
55 return *this;
56 }
58
60
78 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
79 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
80 template <typename TagsT = Aws::Vector<Tag>>
81 void SetTags(TagsT&& value) {
82 m_tagsHasBeenSet = true;
83 m_tags = std::forward<TagsT>(value);
84 }
85 template <typename TagsT = Aws::Vector<Tag>>
87 SetTags(std::forward<TagsT>(value));
88 return *this;
89 }
90 template <typename TagsT = Tag>
91 CreateClusterRequest& AddTags(TagsT&& value) {
92 m_tagsHasBeenSet = true;
93 m_tags.emplace_back(std::forward<TagsT>(value));
94 return *this;
95 }
97
99
107 inline const Aws::Vector<ClusterSetting>& GetSettings() const { return m_settings; }
108 inline bool SettingsHasBeenSet() const { return m_settingsHasBeenSet; }
109 template <typename SettingsT = Aws::Vector<ClusterSetting>>
110 void SetSettings(SettingsT&& value) {
111 m_settingsHasBeenSet = true;
112 m_settings = std::forward<SettingsT>(value);
113 }
114 template <typename SettingsT = Aws::Vector<ClusterSetting>>
115 CreateClusterRequest& WithSettings(SettingsT&& value) {
116 SetSettings(std::forward<SettingsT>(value));
117 return *this;
118 }
119 template <typename SettingsT = ClusterSetting>
120 CreateClusterRequest& AddSettings(SettingsT&& value) {
121 m_settingsHasBeenSet = true;
122 m_settings.emplace_back(std::forward<SettingsT>(value));
123 return *this;
124 }
126
128
131 inline const ClusterConfiguration& GetConfiguration() const { return m_configuration; }
132 inline bool ConfigurationHasBeenSet() const { return m_configurationHasBeenSet; }
133 template <typename ConfigurationT = ClusterConfiguration>
134 void SetConfiguration(ConfigurationT&& value) {
135 m_configurationHasBeenSet = true;
136 m_configuration = std::forward<ConfigurationT>(value);
137 }
138 template <typename ConfigurationT = ClusterConfiguration>
139 CreateClusterRequest& WithConfiguration(ConfigurationT&& value) {
140 SetConfiguration(std::forward<ConfigurationT>(value));
141 return *this;
142 }
144
146
166 inline const Aws::Vector<Aws::String>& GetCapacityProviders() const { return m_capacityProviders; }
167 inline bool CapacityProvidersHasBeenSet() const { return m_capacityProvidersHasBeenSet; }
168 template <typename CapacityProvidersT = Aws::Vector<Aws::String>>
169 void SetCapacityProviders(CapacityProvidersT&& value) {
170 m_capacityProvidersHasBeenSet = true;
171 m_capacityProviders = std::forward<CapacityProvidersT>(value);
172 }
173 template <typename CapacityProvidersT = Aws::Vector<Aws::String>>
174 CreateClusterRequest& WithCapacityProviders(CapacityProvidersT&& value) {
175 SetCapacityProviders(std::forward<CapacityProvidersT>(value));
176 return *this;
177 }
178 template <typename CapacityProvidersT = Aws::String>
179 CreateClusterRequest& AddCapacityProviders(CapacityProvidersT&& value) {
180 m_capacityProvidersHasBeenSet = true;
181 m_capacityProviders.emplace_back(std::forward<CapacityProvidersT>(value));
182 return *this;
183 }
185
187
201 return m_defaultCapacityProviderStrategy;
202 }
203 inline bool DefaultCapacityProviderStrategyHasBeenSet() const { return m_defaultCapacityProviderStrategyHasBeenSet; }
204 template <typename DefaultCapacityProviderStrategyT = Aws::Vector<CapacityProviderStrategyItem>>
205 void SetDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT&& value) {
206 m_defaultCapacityProviderStrategyHasBeenSet = true;
207 m_defaultCapacityProviderStrategy = std::forward<DefaultCapacityProviderStrategyT>(value);
208 }
209 template <typename DefaultCapacityProviderStrategyT = Aws::Vector<CapacityProviderStrategyItem>>
210 CreateClusterRequest& WithDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT&& value) {
211 SetDefaultCapacityProviderStrategy(std::forward<DefaultCapacityProviderStrategyT>(value));
212 return *this;
213 }
214 template <typename DefaultCapacityProviderStrategyT = CapacityProviderStrategyItem>
215 CreateClusterRequest& AddDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT&& value) {
216 m_defaultCapacityProviderStrategyHasBeenSet = true;
217 m_defaultCapacityProviderStrategy.emplace_back(std::forward<DefaultCapacityProviderStrategyT>(value));
218 return *this;
219 }
221
223
240 inline const ClusterServiceConnectDefaultsRequest& GetServiceConnectDefaults() const { return m_serviceConnectDefaults; }
241 inline bool ServiceConnectDefaultsHasBeenSet() const { return m_serviceConnectDefaultsHasBeenSet; }
242 template <typename ServiceConnectDefaultsT = ClusterServiceConnectDefaultsRequest>
243 void SetServiceConnectDefaults(ServiceConnectDefaultsT&& value) {
244 m_serviceConnectDefaultsHasBeenSet = true;
245 m_serviceConnectDefaults = std::forward<ServiceConnectDefaultsT>(value);
246 }
247 template <typename ServiceConnectDefaultsT = ClusterServiceConnectDefaultsRequest>
248 CreateClusterRequest& WithServiceConnectDefaults(ServiceConnectDefaultsT&& value) {
249 SetServiceConnectDefaults(std::forward<ServiceConnectDefaultsT>(value));
250 return *this;
251 }
253 private:
254 Aws::String m_clusterName;
255
256 Aws::Vector<Tag> m_tags;
257
259
260 ClusterConfiguration m_configuration;
261
262 Aws::Vector<Aws::String> m_capacityProviders;
263
264 Aws::Vector<CapacityProviderStrategyItem> m_defaultCapacityProviderStrategy;
265
266 ClusterServiceConnectDefaultsRequest m_serviceConnectDefaults;
267 bool m_clusterNameHasBeenSet = false;
268 bool m_tagsHasBeenSet = false;
269 bool m_settingsHasBeenSet = false;
270 bool m_configurationHasBeenSet = false;
271 bool m_capacityProvidersHasBeenSet = false;
272 bool m_defaultCapacityProviderStrategyHasBeenSet = false;
273 bool m_serviceConnectDefaultsHasBeenSet = false;
274};
275
276} // namespace Model
277} // namespace ECS
278} // 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