AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
EcsTaskProperties.h
1
6#pragma once
7#include <aws/batch/Batch_EXPORTS.h>
8#include <aws/batch/model/EphemeralStorage.h>
9#include <aws/batch/model/NetworkConfiguration.h>
10#include <aws/batch/model/RuntimePlatform.h>
11#include <aws/batch/model/TaskContainerProperties.h>
12#include <aws/batch/model/Volume.h>
13#include <aws/core/utils/memory/stl/AWSString.h>
14#include <aws/core/utils/memory/stl/AWSVector.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace Batch {
26namespace Model {
27
37 public:
38 AWS_BATCH_API EcsTaskProperties() = default;
41 AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const;
42
44
47 inline const Aws::Vector<TaskContainerProperties>& GetContainers() const { return m_containers; }
48 inline bool ContainersHasBeenSet() const { return m_containersHasBeenSet; }
49 template <typename ContainersT = Aws::Vector<TaskContainerProperties>>
50 void SetContainers(ContainersT&& value) {
51 m_containersHasBeenSet = true;
52 m_containers = std::forward<ContainersT>(value);
53 }
54 template <typename ContainersT = Aws::Vector<TaskContainerProperties>>
55 EcsTaskProperties& WithContainers(ContainersT&& value) {
56 SetContainers(std::forward<ContainersT>(value));
57 return *this;
58 }
59 template <typename ContainersT = TaskContainerProperties>
60 EcsTaskProperties& AddContainers(ContainersT&& value) {
61 m_containersHasBeenSet = true;
62 m_containers.emplace_back(std::forward<ContainersT>(value));
63 return *this;
64 }
66
68
73 inline const EphemeralStorage& GetEphemeralStorage() const { return m_ephemeralStorage; }
74 inline bool EphemeralStorageHasBeenSet() const { return m_ephemeralStorageHasBeenSet; }
75 template <typename EphemeralStorageT = EphemeralStorage>
76 void SetEphemeralStorage(EphemeralStorageT&& value) {
77 m_ephemeralStorageHasBeenSet = true;
78 m_ephemeralStorage = std::forward<EphemeralStorageT>(value);
79 }
80 template <typename EphemeralStorageT = EphemeralStorage>
81 EcsTaskProperties& WithEphemeralStorage(EphemeralStorageT&& value) {
82 SetEphemeralStorage(std::forward<EphemeralStorageT>(value));
83 return *this;
84 }
86
88
95 inline const Aws::String& GetExecutionRoleArn() const { return m_executionRoleArn; }
96 inline bool ExecutionRoleArnHasBeenSet() const { return m_executionRoleArnHasBeenSet; }
97 template <typename ExecutionRoleArnT = Aws::String>
98 void SetExecutionRoleArn(ExecutionRoleArnT&& value) {
99 m_executionRoleArnHasBeenSet = true;
100 m_executionRoleArn = std::forward<ExecutionRoleArnT>(value);
101 }
102 template <typename ExecutionRoleArnT = Aws::String>
103 EcsTaskProperties& WithExecutionRoleArn(ExecutionRoleArnT&& value) {
104 SetExecutionRoleArn(std::forward<ExecutionRoleArnT>(value));
105 return *this;
106 }
108
110
120 inline const Aws::String& GetPlatformVersion() const { return m_platformVersion; }
121 inline bool PlatformVersionHasBeenSet() const { return m_platformVersionHasBeenSet; }
122 template <typename PlatformVersionT = Aws::String>
123 void SetPlatformVersion(PlatformVersionT&& value) {
124 m_platformVersionHasBeenSet = true;
125 m_platformVersion = std::forward<PlatformVersionT>(value);
126 }
127 template <typename PlatformVersionT = Aws::String>
128 EcsTaskProperties& WithPlatformVersion(PlatformVersionT&& value) {
129 SetPlatformVersion(std::forward<PlatformVersionT>(value));
130 return *this;
131 }
133
135
150 inline const Aws::String& GetIpcMode() const { return m_ipcMode; }
151 inline bool IpcModeHasBeenSet() const { return m_ipcModeHasBeenSet; }
152 template <typename IpcModeT = Aws::String>
153 void SetIpcMode(IpcModeT&& value) {
154 m_ipcModeHasBeenSet = true;
155 m_ipcMode = std::forward<IpcModeT>(value);
156 }
157 template <typename IpcModeT = Aws::String>
158 EcsTaskProperties& WithIpcMode(IpcModeT&& value) {
159 SetIpcMode(std::forward<IpcModeT>(value));
160 return *this;
161 }
163
165
171 inline const Aws::String& GetTaskRoleArn() const { return m_taskRoleArn; }
172 inline bool TaskRoleArnHasBeenSet() const { return m_taskRoleArnHasBeenSet; }
173 template <typename TaskRoleArnT = Aws::String>
174 void SetTaskRoleArn(TaskRoleArnT&& value) {
175 m_taskRoleArnHasBeenSet = true;
176 m_taskRoleArn = std::forward<TaskRoleArnT>(value);
177 }
178 template <typename TaskRoleArnT = Aws::String>
179 EcsTaskProperties& WithTaskRoleArn(TaskRoleArnT&& value) {
180 SetTaskRoleArn(std::forward<TaskRoleArnT>(value));
181 return *this;
182 }
184
186
200 inline const Aws::String& GetPidMode() const { return m_pidMode; }
201 inline bool PidModeHasBeenSet() const { return m_pidModeHasBeenSet; }
202 template <typename PidModeT = Aws::String>
203 void SetPidMode(PidModeT&& value) {
204 m_pidModeHasBeenSet = true;
205 m_pidMode = std::forward<PidModeT>(value);
206 }
207 template <typename PidModeT = Aws::String>
208 EcsTaskProperties& WithPidMode(PidModeT&& value) {
209 SetPidMode(std::forward<PidModeT>(value));
210 return *this;
211 }
213
215
220 inline const NetworkConfiguration& GetNetworkConfiguration() const { return m_networkConfiguration; }
221 inline bool NetworkConfigurationHasBeenSet() const { return m_networkConfigurationHasBeenSet; }
222 template <typename NetworkConfigurationT = NetworkConfiguration>
223 void SetNetworkConfiguration(NetworkConfigurationT&& value) {
224 m_networkConfigurationHasBeenSet = true;
225 m_networkConfiguration = std::forward<NetworkConfigurationT>(value);
226 }
227 template <typename NetworkConfigurationT = NetworkConfiguration>
228 EcsTaskProperties& WithNetworkConfiguration(NetworkConfigurationT&& value) {
229 SetNetworkConfiguration(std::forward<NetworkConfigurationT>(value));
230 return *this;
231 }
233
235
239 inline const RuntimePlatform& GetRuntimePlatform() const { return m_runtimePlatform; }
240 inline bool RuntimePlatformHasBeenSet() const { return m_runtimePlatformHasBeenSet; }
241 template <typename RuntimePlatformT = RuntimePlatform>
242 void SetRuntimePlatform(RuntimePlatformT&& value) {
243 m_runtimePlatformHasBeenSet = true;
244 m_runtimePlatform = std::forward<RuntimePlatformT>(value);
245 }
246 template <typename RuntimePlatformT = RuntimePlatform>
247 EcsTaskProperties& WithRuntimePlatform(RuntimePlatformT&& value) {
248 SetRuntimePlatform(std::forward<RuntimePlatformT>(value));
249 return *this;
250 }
252
254
257 inline const Aws::Vector<Volume>& GetVolumes() const { return m_volumes; }
258 inline bool VolumesHasBeenSet() const { return m_volumesHasBeenSet; }
259 template <typename VolumesT = Aws::Vector<Volume>>
260 void SetVolumes(VolumesT&& value) {
261 m_volumesHasBeenSet = true;
262 m_volumes = std::forward<VolumesT>(value);
263 }
264 template <typename VolumesT = Aws::Vector<Volume>>
265 EcsTaskProperties& WithVolumes(VolumesT&& value) {
266 SetVolumes(std::forward<VolumesT>(value));
267 return *this;
268 }
269 template <typename VolumesT = Volume>
270 EcsTaskProperties& AddVolumes(VolumesT&& value) {
271 m_volumesHasBeenSet = true;
272 m_volumes.emplace_back(std::forward<VolumesT>(value));
273 return *this;
274 }
276
278
283 inline bool GetEnableExecuteCommand() const { return m_enableExecuteCommand; }
284 inline bool EnableExecuteCommandHasBeenSet() const { return m_enableExecuteCommandHasBeenSet; }
285 inline void SetEnableExecuteCommand(bool value) {
286 m_enableExecuteCommandHasBeenSet = true;
287 m_enableExecuteCommand = value;
288 }
291 return *this;
292 }
294 private:
296
297 EphemeralStorage m_ephemeralStorage;
298
299 Aws::String m_executionRoleArn;
300
301 Aws::String m_platformVersion;
302
303 Aws::String m_ipcMode;
304
305 Aws::String m_taskRoleArn;
306
307 Aws::String m_pidMode;
308
309 NetworkConfiguration m_networkConfiguration;
310
311 RuntimePlatform m_runtimePlatform;
312
313 Aws::Vector<Volume> m_volumes;
314
315 bool m_enableExecuteCommand{false};
316 bool m_containersHasBeenSet = false;
317 bool m_ephemeralStorageHasBeenSet = false;
318 bool m_executionRoleArnHasBeenSet = false;
319 bool m_platformVersionHasBeenSet = false;
320 bool m_ipcModeHasBeenSet = false;
321 bool m_taskRoleArnHasBeenSet = false;
322 bool m_pidModeHasBeenSet = false;
323 bool m_networkConfigurationHasBeenSet = false;
324 bool m_runtimePlatformHasBeenSet = false;
325 bool m_volumesHasBeenSet = false;
326 bool m_enableExecuteCommandHasBeenSet = false;
327};
328
329} // namespace Model
330} // namespace Batch
331} // namespace Aws
void SetPlatformVersion(PlatformVersionT &&value)
void SetExecutionRoleArn(ExecutionRoleArnT &&value)
EcsTaskProperties & WithTaskRoleArn(TaskRoleArnT &&value)
const NetworkConfiguration & GetNetworkConfiguration() const
EcsTaskProperties & WithContainers(ContainersT &&value)
void SetRuntimePlatform(RuntimePlatformT &&value)
void SetContainers(ContainersT &&value)
EcsTaskProperties & WithNetworkConfiguration(NetworkConfigurationT &&value)
const Aws::Vector< TaskContainerProperties > & GetContainers() const
const Aws::Vector< Volume > & GetVolumes() const
const RuntimePlatform & GetRuntimePlatform() const
EcsTaskProperties & WithRuntimePlatform(RuntimePlatformT &&value)
EcsTaskProperties & AddContainers(ContainersT &&value)
AWS_BATCH_API EcsTaskProperties(Aws::Utils::Json::JsonView jsonValue)
AWS_BATCH_API EcsTaskProperties & operator=(Aws::Utils::Json::JsonView jsonValue)
EcsTaskProperties & WithEphemeralStorage(EphemeralStorageT &&value)
void SetNetworkConfiguration(NetworkConfigurationT &&value)
EcsTaskProperties & WithIpcMode(IpcModeT &&value)
const Aws::String & GetTaskRoleArn() const
void SetTaskRoleArn(TaskRoleArnT &&value)
EcsTaskProperties & AddVolumes(VolumesT &&value)
EcsTaskProperties & WithEnableExecuteCommand(bool value)
const Aws::String & GetPidMode() const
EcsTaskProperties & WithVolumes(VolumesT &&value)
EcsTaskProperties & WithPidMode(PidModeT &&value)
EcsTaskProperties & WithPlatformVersion(PlatformVersionT &&value)
const Aws::String & GetExecutionRoleArn() const
AWS_BATCH_API Aws::Utils::Json::JsonValue Jsonize() const
const EphemeralStorage & GetEphemeralStorage() const
const Aws::String & GetPlatformVersion() const
EcsTaskProperties & WithExecutionRoleArn(ExecutionRoleArnT &&value)
void SetEphemeralStorage(EphemeralStorageT &&value)
AWS_BATCH_API EcsTaskProperties()=default
const Aws::String & GetIpcMode() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue