AWS SDK for C++

AWS SDK for C++ Version 1.11.875

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
151 inline const Aws::String& GetIpcMode() const { return m_ipcMode; }
152 inline bool IpcModeHasBeenSet() const { return m_ipcModeHasBeenSet; }
153 template <typename IpcModeT = Aws::String>
154 void SetIpcMode(IpcModeT&& value) {
155 m_ipcModeHasBeenSet = true;
156 m_ipcMode = std::forward<IpcModeT>(value);
157 }
158 template <typename IpcModeT = Aws::String>
159 EcsTaskProperties& WithIpcMode(IpcModeT&& value) {
160 SetIpcMode(std::forward<IpcModeT>(value));
161 return *this;
162 }
164
166
172 inline const Aws::String& GetTaskRoleArn() const { return m_taskRoleArn; }
173 inline bool TaskRoleArnHasBeenSet() const { return m_taskRoleArnHasBeenSet; }
174 template <typename TaskRoleArnT = Aws::String>
175 void SetTaskRoleArn(TaskRoleArnT&& value) {
176 m_taskRoleArnHasBeenSet = true;
177 m_taskRoleArn = std::forward<TaskRoleArnT>(value);
178 }
179 template <typename TaskRoleArnT = Aws::String>
180 EcsTaskProperties& WithTaskRoleArn(TaskRoleArnT&& value) {
181 SetTaskRoleArn(std::forward<TaskRoleArnT>(value));
182 return *this;
183 }
185
187
201 inline const Aws::String& GetPidMode() const { return m_pidMode; }
202 inline bool PidModeHasBeenSet() const { return m_pidModeHasBeenSet; }
203 template <typename PidModeT = Aws::String>
204 void SetPidMode(PidModeT&& value) {
205 m_pidModeHasBeenSet = true;
206 m_pidMode = std::forward<PidModeT>(value);
207 }
208 template <typename PidModeT = Aws::String>
209 EcsTaskProperties& WithPidMode(PidModeT&& value) {
210 SetPidMode(std::forward<PidModeT>(value));
211 return *this;
212 }
214
216
221 inline const NetworkConfiguration& GetNetworkConfiguration() const { return m_networkConfiguration; }
222 inline bool NetworkConfigurationHasBeenSet() const { return m_networkConfigurationHasBeenSet; }
223 template <typename NetworkConfigurationT = NetworkConfiguration>
224 void SetNetworkConfiguration(NetworkConfigurationT&& value) {
225 m_networkConfigurationHasBeenSet = true;
226 m_networkConfiguration = std::forward<NetworkConfigurationT>(value);
227 }
228 template <typename NetworkConfigurationT = NetworkConfiguration>
229 EcsTaskProperties& WithNetworkConfiguration(NetworkConfigurationT&& value) {
230 SetNetworkConfiguration(std::forward<NetworkConfigurationT>(value));
231 return *this;
232 }
234
236
245 inline const RuntimePlatform& GetRuntimePlatform() const { return m_runtimePlatform; }
246 inline bool RuntimePlatformHasBeenSet() const { return m_runtimePlatformHasBeenSet; }
247 template <typename RuntimePlatformT = RuntimePlatform>
248 void SetRuntimePlatform(RuntimePlatformT&& value) {
249 m_runtimePlatformHasBeenSet = true;
250 m_runtimePlatform = std::forward<RuntimePlatformT>(value);
251 }
252 template <typename RuntimePlatformT = RuntimePlatform>
253 EcsTaskProperties& WithRuntimePlatform(RuntimePlatformT&& value) {
254 SetRuntimePlatform(std::forward<RuntimePlatformT>(value));
255 return *this;
256 }
258
260
263 inline const Aws::Vector<Volume>& GetVolumes() const { return m_volumes; }
264 inline bool VolumesHasBeenSet() const { return m_volumesHasBeenSet; }
265 template <typename VolumesT = Aws::Vector<Volume>>
266 void SetVolumes(VolumesT&& value) {
267 m_volumesHasBeenSet = true;
268 m_volumes = std::forward<VolumesT>(value);
269 }
270 template <typename VolumesT = Aws::Vector<Volume>>
271 EcsTaskProperties& WithVolumes(VolumesT&& value) {
272 SetVolumes(std::forward<VolumesT>(value));
273 return *this;
274 }
275 template <typename VolumesT = Volume>
276 EcsTaskProperties& AddVolumes(VolumesT&& value) {
277 m_volumesHasBeenSet = true;
278 m_volumes.emplace_back(std::forward<VolumesT>(value));
279 return *this;
280 }
282
284
289 inline bool GetEnableExecuteCommand() const { return m_enableExecuteCommand; }
290 inline bool EnableExecuteCommandHasBeenSet() const { return m_enableExecuteCommandHasBeenSet; }
291 inline void SetEnableExecuteCommand(bool value) {
292 m_enableExecuteCommandHasBeenSet = true;
293 m_enableExecuteCommand = value;
294 }
297 return *this;
298 }
300
302
313 inline const Aws::String& GetNetworkMode() const { return m_networkMode; }
314 inline bool NetworkModeHasBeenSet() const { return m_networkModeHasBeenSet; }
315 template <typename NetworkModeT = Aws::String>
316 void SetNetworkMode(NetworkModeT&& value) {
317 m_networkModeHasBeenSet = true;
318 m_networkMode = std::forward<NetworkModeT>(value);
319 }
320 template <typename NetworkModeT = Aws::String>
321 EcsTaskProperties& WithNetworkMode(NetworkModeT&& value) {
322 SetNetworkMode(std::forward<NetworkModeT>(value));
323 return *this;
324 }
326 private:
328
329 EphemeralStorage m_ephemeralStorage;
330
331 Aws::String m_executionRoleArn;
332
333 Aws::String m_platformVersion;
334
335 Aws::String m_ipcMode;
336
337 Aws::String m_taskRoleArn;
338
339 Aws::String m_pidMode;
340
341 NetworkConfiguration m_networkConfiguration;
342
343 RuntimePlatform m_runtimePlatform;
344
345 Aws::Vector<Volume> m_volumes;
346
347 bool m_enableExecuteCommand{false};
348
349 Aws::String m_networkMode;
350 bool m_containersHasBeenSet = false;
351 bool m_ephemeralStorageHasBeenSet = false;
352 bool m_executionRoleArnHasBeenSet = false;
353 bool m_platformVersionHasBeenSet = false;
354 bool m_ipcModeHasBeenSet = false;
355 bool m_taskRoleArnHasBeenSet = false;
356 bool m_pidModeHasBeenSet = false;
357 bool m_networkConfigurationHasBeenSet = false;
358 bool m_runtimePlatformHasBeenSet = false;
359 bool m_volumesHasBeenSet = false;
360 bool m_enableExecuteCommandHasBeenSet = false;
361 bool m_networkModeHasBeenSet = false;
362};
363
364} // namespace Model
365} // namespace Batch
366} // namespace Aws
void SetPlatformVersion(PlatformVersionT &&value)
void SetExecutionRoleArn(ExecutionRoleArnT &&value)
EcsTaskProperties & WithTaskRoleArn(TaskRoleArnT &&value)
const Aws::String & GetNetworkMode() const
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)
void SetNetworkMode(NetworkModeT &&value)
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
EcsTaskProperties & WithNetworkMode(NetworkModeT &&value)
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