AWS SDK for C++

AWS SDK for C++ Version 1.11.796

Loading...
Searching...
No Matches
RegisterTaskDefinitionRequest.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/Compatibility.h>
12#include <aws/ecs/model/ContainerDefinition.h>
13#include <aws/ecs/model/EphemeralStorage.h>
14#include <aws/ecs/model/IpcMode.h>
15#include <aws/ecs/model/NetworkMode.h>
16#include <aws/ecs/model/PidMode.h>
17#include <aws/ecs/model/ProxyConfiguration.h>
18#include <aws/ecs/model/RuntimePlatform.h>
19#include <aws/ecs/model/Tag.h>
20#include <aws/ecs/model/TaskDefinitionPlacementConstraint.h>
21#include <aws/ecs/model/Volume.h>
22
23#include <utility>
24
25namespace Aws {
26namespace ECS {
27namespace Model {
28
35 public:
36 AWS_ECS_API RegisterTaskDefinitionRequest() = default;
37
38 // Service request name is the Operation name which will send this request out,
39 // each operation should has unique request name, so that we can get operation's name from this request.
40 // Note: this is not true for response, multiple operations may have the same response name,
41 // so we can not get operation's name from response.
42 inline virtual const char* GetServiceRequestName() const override { return "RegisterTaskDefinition"; }
43
44 AWS_ECS_API Aws::String SerializePayload() const override;
45
47
49
55 inline const Aws::String& GetFamily() const { return m_family; }
56 inline bool FamilyHasBeenSet() const { return m_familyHasBeenSet; }
57 template <typename FamilyT = Aws::String>
58 void SetFamily(FamilyT&& value) {
59 m_familyHasBeenSet = true;
60 m_family = std::forward<FamilyT>(value);
61 }
62 template <typename FamilyT = Aws::String>
64 SetFamily(std::forward<FamilyT>(value));
65 return *this;
66 }
68
70
78 inline const Aws::String& GetTaskRoleArn() const { return m_taskRoleArn; }
79 inline bool TaskRoleArnHasBeenSet() const { return m_taskRoleArnHasBeenSet; }
80 template <typename TaskRoleArnT = Aws::String>
81 void SetTaskRoleArn(TaskRoleArnT&& value) {
82 m_taskRoleArnHasBeenSet = true;
83 m_taskRoleArn = std::forward<TaskRoleArnT>(value);
84 }
85 template <typename TaskRoleArnT = Aws::String>
87 SetTaskRoleArn(std::forward<TaskRoleArnT>(value));
88 return *this;
89 }
91
93
101 inline const Aws::String& GetExecutionRoleArn() const { return m_executionRoleArn; }
102 inline bool ExecutionRoleArnHasBeenSet() const { return m_executionRoleArnHasBeenSet; }
103 template <typename ExecutionRoleArnT = Aws::String>
104 void SetExecutionRoleArn(ExecutionRoleArnT&& value) {
105 m_executionRoleArnHasBeenSet = true;
106 m_executionRoleArn = std::forward<ExecutionRoleArnT>(value);
107 }
108 template <typename ExecutionRoleArnT = Aws::String>
110 SetExecutionRoleArn(std::forward<ExecutionRoleArnT>(value));
111 return *this;
112 }
114
116
147 inline NetworkMode GetNetworkMode() const { return m_networkMode; }
148 inline bool NetworkModeHasBeenSet() const { return m_networkModeHasBeenSet; }
149 inline void SetNetworkMode(NetworkMode value) {
150 m_networkModeHasBeenSet = true;
151 m_networkMode = value;
152 }
154 SetNetworkMode(value);
155 return *this;
156 }
158
160
164 inline const Aws::Vector<ContainerDefinition>& GetContainerDefinitions() const { return m_containerDefinitions; }
165 inline bool ContainerDefinitionsHasBeenSet() const { return m_containerDefinitionsHasBeenSet; }
166 template <typename ContainerDefinitionsT = Aws::Vector<ContainerDefinition>>
167 void SetContainerDefinitions(ContainerDefinitionsT&& value) {
168 m_containerDefinitionsHasBeenSet = true;
169 m_containerDefinitions = std::forward<ContainerDefinitionsT>(value);
170 }
171 template <typename ContainerDefinitionsT = Aws::Vector<ContainerDefinition>>
173 SetContainerDefinitions(std::forward<ContainerDefinitionsT>(value));
174 return *this;
175 }
176 template <typename ContainerDefinitionsT = ContainerDefinition>
178 m_containerDefinitionsHasBeenSet = true;
179 m_containerDefinitions.emplace_back(std::forward<ContainerDefinitionsT>(value));
180 return *this;
181 }
183
185
189 inline const Aws::Vector<Volume>& GetVolumes() const { return m_volumes; }
190 inline bool VolumesHasBeenSet() const { return m_volumesHasBeenSet; }
191 template <typename VolumesT = Aws::Vector<Volume>>
192 void SetVolumes(VolumesT&& value) {
193 m_volumesHasBeenSet = true;
194 m_volumes = std::forward<VolumesT>(value);
195 }
196 template <typename VolumesT = Aws::Vector<Volume>>
198 SetVolumes(std::forward<VolumesT>(value));
199 return *this;
200 }
201 template <typename VolumesT = Volume>
203 m_volumesHasBeenSet = true;
204 m_volumes.emplace_back(std::forward<VolumesT>(value));
205 return *this;
206 }
208
210
215 inline const Aws::Vector<TaskDefinitionPlacementConstraint>& GetPlacementConstraints() const { return m_placementConstraints; }
216 inline bool PlacementConstraintsHasBeenSet() const { return m_placementConstraintsHasBeenSet; }
217 template <typename PlacementConstraintsT = Aws::Vector<TaskDefinitionPlacementConstraint>>
218 void SetPlacementConstraints(PlacementConstraintsT&& value) {
219 m_placementConstraintsHasBeenSet = true;
220 m_placementConstraints = std::forward<PlacementConstraintsT>(value);
221 }
222 template <typename PlacementConstraintsT = Aws::Vector<TaskDefinitionPlacementConstraint>>
224 SetPlacementConstraints(std::forward<PlacementConstraintsT>(value));
225 return *this;
226 }
227 template <typename PlacementConstraintsT = TaskDefinitionPlacementConstraint>
229 m_placementConstraintsHasBeenSet = true;
230 m_placementConstraints.emplace_back(std::forward<PlacementConstraintsT>(value));
231 return *this;
232 }
234
236
242 inline const Aws::Vector<Compatibility>& GetRequiresCompatibilities() const { return m_requiresCompatibilities; }
243 inline bool RequiresCompatibilitiesHasBeenSet() const { return m_requiresCompatibilitiesHasBeenSet; }
244 template <typename RequiresCompatibilitiesT = Aws::Vector<Compatibility>>
245 void SetRequiresCompatibilities(RequiresCompatibilitiesT&& value) {
246 m_requiresCompatibilitiesHasBeenSet = true;
247 m_requiresCompatibilities = std::forward<RequiresCompatibilitiesT>(value);
248 }
249 template <typename RequiresCompatibilitiesT = Aws::Vector<Compatibility>>
251 SetRequiresCompatibilities(std::forward<RequiresCompatibilitiesT>(value));
252 return *this;
253 }
255 m_requiresCompatibilitiesHasBeenSet = true;
256 m_requiresCompatibilities.push_back(value);
257 return *this;
258 }
260
262
278 inline const Aws::String& GetCpu() const { return m_cpu; }
279 inline bool CpuHasBeenSet() const { return m_cpuHasBeenSet; }
280 template <typename CpuT = Aws::String>
281 void SetCpu(CpuT&& value) {
282 m_cpuHasBeenSet = true;
283 m_cpu = std::forward<CpuT>(value);
284 }
285 template <typename CpuT = Aws::String>
287 SetCpu(std::forward<CpuT>(value));
288 return *this;
289 }
291
293
320 inline const Aws::String& GetMemory() const { return m_memory; }
321 inline bool MemoryHasBeenSet() const { return m_memoryHasBeenSet; }
322 template <typename MemoryT = Aws::String>
323 void SetMemory(MemoryT&& value) {
324 m_memoryHasBeenSet = true;
325 m_memory = std::forward<MemoryT>(value);
326 }
327 template <typename MemoryT = Aws::String>
329 SetMemory(std::forward<MemoryT>(value));
330 return *this;
331 }
333
335
353 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
354 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
355 template <typename TagsT = Aws::Vector<Tag>>
356 void SetTags(TagsT&& value) {
357 m_tagsHasBeenSet = true;
358 m_tags = std::forward<TagsT>(value);
359 }
360 template <typename TagsT = Aws::Vector<Tag>>
362 SetTags(std::forward<TagsT>(value));
363 return *this;
364 }
365 template <typename TagsT = Tag>
367 m_tagsHasBeenSet = true;
368 m_tags.emplace_back(std::forward<TagsT>(value));
369 return *this;
370 }
372
374
392 inline PidMode GetPidMode() const { return m_pidMode; }
393 inline bool PidModeHasBeenSet() const { return m_pidModeHasBeenSet; }
394 inline void SetPidMode(PidMode value) {
395 m_pidModeHasBeenSet = true;
396 m_pidMode = value;
397 }
399 SetPidMode(value);
400 return *this;
401 }
403
405
430 inline IpcMode GetIpcMode() const { return m_ipcMode; }
431 inline bool IpcModeHasBeenSet() const { return m_ipcModeHasBeenSet; }
432 inline void SetIpcMode(IpcMode value) {
433 m_ipcModeHasBeenSet = true;
434 m_ipcMode = value;
435 }
437 SetIpcMode(value);
438 return *this;
439 }
441
443
456 inline const ProxyConfiguration& GetProxyConfiguration() const { return m_proxyConfiguration; }
457 inline bool ProxyConfigurationHasBeenSet() const { return m_proxyConfigurationHasBeenSet; }
458 template <typename ProxyConfigurationT = ProxyConfiguration>
459 void SetProxyConfiguration(ProxyConfigurationT&& value) {
460 m_proxyConfigurationHasBeenSet = true;
461 m_proxyConfiguration = std::forward<ProxyConfigurationT>(value);
462 }
463 template <typename ProxyConfigurationT = ProxyConfiguration>
465 SetProxyConfiguration(std::forward<ProxyConfigurationT>(value));
466 return *this;
467 }
469
471
482 inline const EphemeralStorage& GetEphemeralStorage() const { return m_ephemeralStorage; }
483 inline bool EphemeralStorageHasBeenSet() const { return m_ephemeralStorageHasBeenSet; }
484 template <typename EphemeralStorageT = EphemeralStorage>
485 void SetEphemeralStorage(EphemeralStorageT&& value) {
486 m_ephemeralStorageHasBeenSet = true;
487 m_ephemeralStorage = std::forward<EphemeralStorageT>(value);
488 }
489 template <typename EphemeralStorageT = EphemeralStorage>
491 SetEphemeralStorage(std::forward<EphemeralStorageT>(value));
492 return *this;
493 }
495
497
500 inline const RuntimePlatform& GetRuntimePlatform() const { return m_runtimePlatform; }
501 inline bool RuntimePlatformHasBeenSet() const { return m_runtimePlatformHasBeenSet; }
502 template <typename RuntimePlatformT = RuntimePlatform>
503 void SetRuntimePlatform(RuntimePlatformT&& value) {
504 m_runtimePlatformHasBeenSet = true;
505 m_runtimePlatform = std::forward<RuntimePlatformT>(value);
506 }
507 template <typename RuntimePlatformT = RuntimePlatform>
509 SetRuntimePlatform(std::forward<RuntimePlatformT>(value));
510 return *this;
511 }
513
515
520 inline bool GetEnableFaultInjection() const { return m_enableFaultInjection; }
521 inline bool EnableFaultInjectionHasBeenSet() const { return m_enableFaultInjectionHasBeenSet; }
522 inline void SetEnableFaultInjection(bool value) {
523 m_enableFaultInjectionHasBeenSet = true;
524 m_enableFaultInjection = value;
525 }
528 return *this;
529 }
531 private:
532 Aws::String m_family;
533
534 Aws::String m_taskRoleArn;
535
536 Aws::String m_executionRoleArn;
537
538 NetworkMode m_networkMode{NetworkMode::NOT_SET};
539
540 Aws::Vector<ContainerDefinition> m_containerDefinitions;
541
542 Aws::Vector<Volume> m_volumes;
543
545
546 Aws::Vector<Compatibility> m_requiresCompatibilities;
547
548 Aws::String m_cpu;
549
550 Aws::String m_memory;
551
552 Aws::Vector<Tag> m_tags;
553
554 PidMode m_pidMode{PidMode::NOT_SET};
555
556 IpcMode m_ipcMode{IpcMode::NOT_SET};
557
558 ProxyConfiguration m_proxyConfiguration;
559
560 EphemeralStorage m_ephemeralStorage;
561
562 RuntimePlatform m_runtimePlatform;
563
564 bool m_enableFaultInjection{false};
565 bool m_familyHasBeenSet = false;
566 bool m_taskRoleArnHasBeenSet = false;
567 bool m_executionRoleArnHasBeenSet = false;
568 bool m_networkModeHasBeenSet = false;
569 bool m_containerDefinitionsHasBeenSet = false;
570 bool m_volumesHasBeenSet = false;
571 bool m_placementConstraintsHasBeenSet = false;
572 bool m_requiresCompatibilitiesHasBeenSet = false;
573 bool m_cpuHasBeenSet = false;
574 bool m_memoryHasBeenSet = false;
575 bool m_tagsHasBeenSet = false;
576 bool m_pidModeHasBeenSet = false;
577 bool m_ipcModeHasBeenSet = false;
578 bool m_proxyConfigurationHasBeenSet = false;
579 bool m_ephemeralStorageHasBeenSet = false;
580 bool m_runtimePlatformHasBeenSet = false;
581 bool m_enableFaultInjectionHasBeenSet = false;
582};
583
584} // namespace Model
585} // namespace ECS
586} // namespace Aws
virtual const char * GetServiceRequestName() const override
AWS_ECS_API Aws::String SerializePayload() const override
const Aws::Vector< ContainerDefinition > & GetContainerDefinitions() const
RegisterTaskDefinitionRequest & WithProxyConfiguration(ProxyConfigurationT &&value)
RegisterTaskDefinitionRequest & WithEnableFaultInjection(bool value)
RegisterTaskDefinitionRequest & WithRequiresCompatibilities(RequiresCompatibilitiesT &&value)
RegisterTaskDefinitionRequest & WithRuntimePlatform(RuntimePlatformT &&value)
RegisterTaskDefinitionRequest & WithPidMode(PidMode value)
RegisterTaskDefinitionRequest & WithEphemeralStorage(EphemeralStorageT &&value)
RegisterTaskDefinitionRequest & WithVolumes(VolumesT &&value)
RegisterTaskDefinitionRequest & WithTags(TagsT &&value)
RegisterTaskDefinitionRequest & WithExecutionRoleArn(ExecutionRoleArnT &&value)
RegisterTaskDefinitionRequest & WithPlacementConstraints(PlacementConstraintsT &&value)
RegisterTaskDefinitionRequest & WithCpu(CpuT &&value)
RegisterTaskDefinitionRequest & WithContainerDefinitions(ContainerDefinitionsT &&value)
RegisterTaskDefinitionRequest & AddVolumes(VolumesT &&value)
AWS_ECS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
RegisterTaskDefinitionRequest & AddRequiresCompatibilities(Compatibility value)
const Aws::Vector< Compatibility > & GetRequiresCompatibilities() const
RegisterTaskDefinitionRequest & WithTaskRoleArn(TaskRoleArnT &&value)
RegisterTaskDefinitionRequest & WithMemory(MemoryT &&value)
RegisterTaskDefinitionRequest & WithNetworkMode(NetworkMode value)
RegisterTaskDefinitionRequest & AddPlacementConstraints(PlacementConstraintsT &&value)
const Aws::Vector< TaskDefinitionPlacementConstraint > & GetPlacementConstraints() const
RegisterTaskDefinitionRequest & AddContainerDefinitions(ContainerDefinitionsT &&value)
RegisterTaskDefinitionRequest & AddTags(TagsT &&value)
RegisterTaskDefinitionRequest & WithFamily(FamilyT &&value)
RegisterTaskDefinitionRequest & WithIpcMode(IpcMode value)
void SetRequiresCompatibilities(RequiresCompatibilitiesT &&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