AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateClusterRequest.h
1
6#pragma once
7#include <aws/ecs/ECS_EXPORTS.h>
8#include <aws/ecs/ECSRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/ecs/model/ClusterConfiguration.h>
12#include <aws/ecs/model/ClusterServiceConnectDefaultsRequest.h>
13#include <aws/ecs/model/Tag.h>
14#include <aws/ecs/model/ClusterSetting.h>
15#include <aws/ecs/model/CapacityProviderStrategyItem.h>
16#include <utility>
17
18namespace Aws
19{
20namespace ECS
21{
22namespace Model
23{
24
28 {
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
42
44
49 inline const Aws::String& GetClusterName() const { return m_clusterName; }
50 inline bool ClusterNameHasBeenSet() const { return m_clusterNameHasBeenSet; }
51 template<typename ClusterNameT = Aws::String>
52 void SetClusterName(ClusterNameT&& value) { m_clusterNameHasBeenSet = true; m_clusterName = std::forward<ClusterNameT>(value); }
53 template<typename ClusterNameT = Aws::String>
54 CreateClusterRequest& WithClusterName(ClusterNameT&& value) { SetClusterName(std::forward<ClusterNameT>(value)); return *this;}
56
58
76 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
77 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
78 template<typename TagsT = Aws::Vector<Tag>>
79 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
80 template<typename TagsT = Aws::Vector<Tag>>
81 CreateClusterRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
82 template<typename TagsT = Tag>
83 CreateClusterRequest& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
85
87
95 inline const Aws::Vector<ClusterSetting>& GetSettings() const { return m_settings; }
96 inline bool SettingsHasBeenSet() const { return m_settingsHasBeenSet; }
97 template<typename SettingsT = Aws::Vector<ClusterSetting>>
98 void SetSettings(SettingsT&& value) { m_settingsHasBeenSet = true; m_settings = std::forward<SettingsT>(value); }
99 template<typename SettingsT = Aws::Vector<ClusterSetting>>
100 CreateClusterRequest& WithSettings(SettingsT&& value) { SetSettings(std::forward<SettingsT>(value)); return *this;}
101 template<typename SettingsT = ClusterSetting>
102 CreateClusterRequest& AddSettings(SettingsT&& value) { m_settingsHasBeenSet = true; m_settings.emplace_back(std::forward<SettingsT>(value)); return *this; }
104
106
109 inline const ClusterConfiguration& GetConfiguration() const { return m_configuration; }
110 inline bool ConfigurationHasBeenSet() const { return m_configurationHasBeenSet; }
111 template<typename ConfigurationT = ClusterConfiguration>
112 void SetConfiguration(ConfigurationT&& value) { m_configurationHasBeenSet = true; m_configuration = std::forward<ConfigurationT>(value); }
113 template<typename ConfigurationT = ClusterConfiguration>
114 CreateClusterRequest& WithConfiguration(ConfigurationT&& value) { SetConfiguration(std::forward<ConfigurationT>(value)); return *this;}
116
118
138 inline const Aws::Vector<Aws::String>& GetCapacityProviders() const { return m_capacityProviders; }
139 inline bool CapacityProvidersHasBeenSet() const { return m_capacityProvidersHasBeenSet; }
140 template<typename CapacityProvidersT = Aws::Vector<Aws::String>>
141 void SetCapacityProviders(CapacityProvidersT&& value) { m_capacityProvidersHasBeenSet = true; m_capacityProviders = std::forward<CapacityProvidersT>(value); }
142 template<typename CapacityProvidersT = Aws::Vector<Aws::String>>
143 CreateClusterRequest& WithCapacityProviders(CapacityProvidersT&& value) { SetCapacityProviders(std::forward<CapacityProvidersT>(value)); return *this;}
144 template<typename CapacityProvidersT = Aws::String>
145 CreateClusterRequest& AddCapacityProviders(CapacityProvidersT&& value) { m_capacityProvidersHasBeenSet = true; m_capacityProviders.emplace_back(std::forward<CapacityProvidersT>(value)); return *this; }
147
149
162 inline const Aws::Vector<CapacityProviderStrategyItem>& GetDefaultCapacityProviderStrategy() const { return m_defaultCapacityProviderStrategy; }
163 inline bool DefaultCapacityProviderStrategyHasBeenSet() const { return m_defaultCapacityProviderStrategyHasBeenSet; }
164 template<typename DefaultCapacityProviderStrategyT = Aws::Vector<CapacityProviderStrategyItem>>
165 void SetDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT&& value) { m_defaultCapacityProviderStrategyHasBeenSet = true; m_defaultCapacityProviderStrategy = std::forward<DefaultCapacityProviderStrategyT>(value); }
166 template<typename DefaultCapacityProviderStrategyT = Aws::Vector<CapacityProviderStrategyItem>>
167 CreateClusterRequest& WithDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT&& value) { SetDefaultCapacityProviderStrategy(std::forward<DefaultCapacityProviderStrategyT>(value)); return *this;}
168 template<typename DefaultCapacityProviderStrategyT = CapacityProviderStrategyItem>
169 CreateClusterRequest& AddDefaultCapacityProviderStrategy(DefaultCapacityProviderStrategyT&& value) { m_defaultCapacityProviderStrategyHasBeenSet = true; m_defaultCapacityProviderStrategy.emplace_back(std::forward<DefaultCapacityProviderStrategyT>(value)); return *this; }
171
173
190 inline const ClusterServiceConnectDefaultsRequest& GetServiceConnectDefaults() const { return m_serviceConnectDefaults; }
191 inline bool ServiceConnectDefaultsHasBeenSet() const { return m_serviceConnectDefaultsHasBeenSet; }
192 template<typename ServiceConnectDefaultsT = ClusterServiceConnectDefaultsRequest>
193 void SetServiceConnectDefaults(ServiceConnectDefaultsT&& value) { m_serviceConnectDefaultsHasBeenSet = true; m_serviceConnectDefaults = std::forward<ServiceConnectDefaultsT>(value); }
194 template<typename ServiceConnectDefaultsT = ClusterServiceConnectDefaultsRequest>
195 CreateClusterRequest& WithServiceConnectDefaults(ServiceConnectDefaultsT&& value) { SetServiceConnectDefaults(std::forward<ServiceConnectDefaultsT>(value)); return *this;}
197 private:
198
199 Aws::String m_clusterName;
200 bool m_clusterNameHasBeenSet = false;
201
202 Aws::Vector<Tag> m_tags;
203 bool m_tagsHasBeenSet = false;
204
206 bool m_settingsHasBeenSet = false;
207
208 ClusterConfiguration m_configuration;
209 bool m_configurationHasBeenSet = false;
210
211 Aws::Vector<Aws::String> m_capacityProviders;
212 bool m_capacityProvidersHasBeenSet = false;
213
214 Aws::Vector<CapacityProviderStrategyItem> m_defaultCapacityProviderStrategy;
215 bool m_defaultCapacityProviderStrategyHasBeenSet = false;
216
217 ClusterServiceConnectDefaultsRequest m_serviceConnectDefaults;
218 bool m_serviceConnectDefaultsHasBeenSet = false;
219 };
220
221} // namespace Model
222} // namespace ECS
223} // 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