AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
ContainerDefinition.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/ecs/ECS_EXPORTS.h>
11#include <aws/ecs/model/ContainerDependency.h>
12#include <aws/ecs/model/ContainerRestartPolicy.h>
13#include <aws/ecs/model/EnvironmentFile.h>
14#include <aws/ecs/model/FirelensConfiguration.h>
15#include <aws/ecs/model/HealthCheck.h>
16#include <aws/ecs/model/HostEntry.h>
17#include <aws/ecs/model/KeyValuePair.h>
18#include <aws/ecs/model/LinuxParameters.h>
19#include <aws/ecs/model/LogConfiguration.h>
20#include <aws/ecs/model/MountPoint.h>
21#include <aws/ecs/model/PortMapping.h>
22#include <aws/ecs/model/RepositoryCredentials.h>
23#include <aws/ecs/model/ResourceRequirement.h>
24#include <aws/ecs/model/Secret.h>
25#include <aws/ecs/model/SystemControl.h>
26#include <aws/ecs/model/Ulimit.h>
27#include <aws/ecs/model/VersionConsistency.h>
28#include <aws/ecs/model/VolumeFrom.h>
29
30#include <utility>
31
32namespace Aws {
33namespace Utils {
34namespace Json {
35class JsonValue;
36class JsonView;
37} // namespace Json
38} // namespace Utils
39namespace ECS {
40namespace Model {
41
49 public:
50 AWS_ECS_API ContainerDefinition() = default;
54
56
64 inline const Aws::String& GetName() const { return m_name; }
65 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
66 template <typename NameT = Aws::String>
67 void SetName(NameT&& value) {
68 m_nameHasBeenSet = true;
69 m_name = std::forward<NameT>(value);
70 }
71 template <typename NameT = Aws::String>
72 ContainerDefinition& WithName(NameT&& value) {
73 SetName(std::forward<NameT>(value));
74 return *this;
75 }
77
79
110 inline const Aws::String& GetImage() const { return m_image; }
111 inline bool ImageHasBeenSet() const { return m_imageHasBeenSet; }
112 template <typename ImageT = Aws::String>
113 void SetImage(ImageT&& value) {
114 m_imageHasBeenSet = true;
115 m_image = std::forward<ImageT>(value);
116 }
117 template <typename ImageT = Aws::String>
119 SetImage(std::forward<ImageT>(value));
120 return *this;
121 }
123
125
128 inline const RepositoryCredentials& GetRepositoryCredentials() const { return m_repositoryCredentials; }
129 inline bool RepositoryCredentialsHasBeenSet() const { return m_repositoryCredentialsHasBeenSet; }
130 template <typename RepositoryCredentialsT = RepositoryCredentials>
131 void SetRepositoryCredentials(RepositoryCredentialsT&& value) {
132 m_repositoryCredentialsHasBeenSet = true;
133 m_repositoryCredentials = std::forward<RepositoryCredentialsT>(value);
134 }
135 template <typename RepositoryCredentialsT = RepositoryCredentials>
136 ContainerDefinition& WithRepositoryCredentials(RepositoryCredentialsT&& value) {
137 SetRepositoryCredentials(std::forward<RepositoryCredentialsT>(value));
138 return *this;
139 }
141
143
183 inline int GetCpu() const { return m_cpu; }
184 inline bool CpuHasBeenSet() const { return m_cpuHasBeenSet; }
185 inline void SetCpu(int value) {
186 m_cpuHasBeenSet = true;
187 m_cpu = value;
188 }
189 inline ContainerDefinition& WithCpu(int value) {
190 SetCpu(value);
191 return *this;
192 }
194
196
216 inline int GetMemory() const { return m_memory; }
217 inline bool MemoryHasBeenSet() const { return m_memoryHasBeenSet; }
218 inline void SetMemory(int value) {
219 m_memoryHasBeenSet = true;
220 m_memory = value;
221 }
222 inline ContainerDefinition& WithMemory(int value) {
223 SetMemory(value);
224 return *this;
225 }
227
229
256 inline int GetMemoryReservation() const { return m_memoryReservation; }
257 inline bool MemoryReservationHasBeenSet() const { return m_memoryReservationHasBeenSet; }
258 inline void SetMemoryReservation(int value) {
259 m_memoryReservationHasBeenSet = true;
260 m_memoryReservation = value;
261 }
264 return *this;
265 }
267
269
283 inline const Aws::Vector<Aws::String>& GetLinks() const { return m_links; }
284 inline bool LinksHasBeenSet() const { return m_linksHasBeenSet; }
285 template <typename LinksT = Aws::Vector<Aws::String>>
286 void SetLinks(LinksT&& value) {
287 m_linksHasBeenSet = true;
288 m_links = std::forward<LinksT>(value);
289 }
290 template <typename LinksT = Aws::Vector<Aws::String>>
292 SetLinks(std::forward<LinksT>(value));
293 return *this;
294 }
295 template <typename LinksT = Aws::String>
296 ContainerDefinition& AddLinks(LinksT&& value) {
297 m_linksHasBeenSet = true;
298 m_links.emplace_back(std::forward<LinksT>(value));
299 return *this;
300 }
302
304
326 inline const Aws::Vector<PortMapping>& GetPortMappings() const { return m_portMappings; }
327 inline bool PortMappingsHasBeenSet() const { return m_portMappingsHasBeenSet; }
328 template <typename PortMappingsT = Aws::Vector<PortMapping>>
329 void SetPortMappings(PortMappingsT&& value) {
330 m_portMappingsHasBeenSet = true;
331 m_portMappings = std::forward<PortMappingsT>(value);
332 }
333 template <typename PortMappingsT = Aws::Vector<PortMapping>>
334 ContainerDefinition& WithPortMappings(PortMappingsT&& value) {
335 SetPortMappings(std::forward<PortMappingsT>(value));
336 return *this;
337 }
338 template <typename PortMappingsT = PortMapping>
339 ContainerDefinition& AddPortMappings(PortMappingsT&& value) {
340 m_portMappingsHasBeenSet = true;
341 m_portMappings.emplace_back(std::forward<PortMappingsT>(value));
342 return *this;
343 }
345
347
362 inline bool GetEssential() const { return m_essential; }
363 inline bool EssentialHasBeenSet() const { return m_essentialHasBeenSet; }
364 inline void SetEssential(bool value) {
365 m_essentialHasBeenSet = true;
366 m_essential = value;
367 }
368 inline ContainerDefinition& WithEssential(bool value) {
369 SetEssential(value);
370 return *this;
371 }
373
375
383 inline const ContainerRestartPolicy& GetRestartPolicy() const { return m_restartPolicy; }
384 inline bool RestartPolicyHasBeenSet() const { return m_restartPolicyHasBeenSet; }
385 template <typename RestartPolicyT = ContainerRestartPolicy>
386 void SetRestartPolicy(RestartPolicyT&& value) {
387 m_restartPolicyHasBeenSet = true;
388 m_restartPolicy = std::forward<RestartPolicyT>(value);
389 }
390 template <typename RestartPolicyT = ContainerRestartPolicy>
391 ContainerDefinition& WithRestartPolicy(RestartPolicyT&& value) {
392 SetRestartPolicy(std::forward<RestartPolicyT>(value));
393 return *this;
394 }
396
398
407 inline const Aws::Vector<Aws::String>& GetEntryPoint() const { return m_entryPoint; }
408 inline bool EntryPointHasBeenSet() const { return m_entryPointHasBeenSet; }
409 template <typename EntryPointT = Aws::Vector<Aws::String>>
410 void SetEntryPoint(EntryPointT&& value) {
411 m_entryPointHasBeenSet = true;
412 m_entryPoint = std::forward<EntryPointT>(value);
413 }
414 template <typename EntryPointT = Aws::Vector<Aws::String>>
415 ContainerDefinition& WithEntryPoint(EntryPointT&& value) {
416 SetEntryPoint(std::forward<EntryPointT>(value));
417 return *this;
418 }
419 template <typename EntryPointT = Aws::String>
420 ContainerDefinition& AddEntryPoint(EntryPointT&& value) {
421 m_entryPointHasBeenSet = true;
422 m_entryPoint.emplace_back(std::forward<EntryPointT>(value));
423 return *this;
424 }
426
428
434 inline const Aws::Vector<Aws::String>& GetCommand() const { return m_command; }
435 inline bool CommandHasBeenSet() const { return m_commandHasBeenSet; }
436 template <typename CommandT = Aws::Vector<Aws::String>>
437 void SetCommand(CommandT&& value) {
438 m_commandHasBeenSet = true;
439 m_command = std::forward<CommandT>(value);
440 }
441 template <typename CommandT = Aws::Vector<Aws::String>>
442 ContainerDefinition& WithCommand(CommandT&& value) {
443 SetCommand(std::forward<CommandT>(value));
444 return *this;
445 }
446 template <typename CommandT = Aws::String>
447 ContainerDefinition& AddCommand(CommandT&& value) {
448 m_commandHasBeenSet = true;
449 m_command.emplace_back(std::forward<CommandT>(value));
450 return *this;
451 }
453
455
462 inline const Aws::Vector<KeyValuePair>& GetEnvironment() const { return m_environment; }
463 inline bool EnvironmentHasBeenSet() const { return m_environmentHasBeenSet; }
464 template <typename EnvironmentT = Aws::Vector<KeyValuePair>>
465 void SetEnvironment(EnvironmentT&& value) {
466 m_environmentHasBeenSet = true;
467 m_environment = std::forward<EnvironmentT>(value);
468 }
469 template <typename EnvironmentT = Aws::Vector<KeyValuePair>>
470 ContainerDefinition& WithEnvironment(EnvironmentT&& value) {
471 SetEnvironment(std::forward<EnvironmentT>(value));
472 return *this;
473 }
474 template <typename EnvironmentT = KeyValuePair>
475 ContainerDefinition& AddEnvironment(EnvironmentT&& value) {
476 m_environmentHasBeenSet = true;
477 m_environment.emplace_back(std::forward<EnvironmentT>(value));
478 return *this;
479 }
481
483
499 inline const Aws::Vector<EnvironmentFile>& GetEnvironmentFiles() const { return m_environmentFiles; }
500 inline bool EnvironmentFilesHasBeenSet() const { return m_environmentFilesHasBeenSet; }
501 template <typename EnvironmentFilesT = Aws::Vector<EnvironmentFile>>
502 void SetEnvironmentFiles(EnvironmentFilesT&& value) {
503 m_environmentFilesHasBeenSet = true;
504 m_environmentFiles = std::forward<EnvironmentFilesT>(value);
505 }
506 template <typename EnvironmentFilesT = Aws::Vector<EnvironmentFile>>
507 ContainerDefinition& WithEnvironmentFiles(EnvironmentFilesT&& value) {
508 SetEnvironmentFiles(std::forward<EnvironmentFilesT>(value));
509 return *this;
510 }
511 template <typename EnvironmentFilesT = EnvironmentFile>
512 ContainerDefinition& AddEnvironmentFiles(EnvironmentFilesT&& value) {
513 m_environmentFilesHasBeenSet = true;
514 m_environmentFiles.emplace_back(std::forward<EnvironmentFilesT>(value));
515 return *this;
516 }
518
520
528 inline const Aws::Vector<MountPoint>& GetMountPoints() const { return m_mountPoints; }
529 inline bool MountPointsHasBeenSet() const { return m_mountPointsHasBeenSet; }
530 template <typename MountPointsT = Aws::Vector<MountPoint>>
531 void SetMountPoints(MountPointsT&& value) {
532 m_mountPointsHasBeenSet = true;
533 m_mountPoints = std::forward<MountPointsT>(value);
534 }
535 template <typename MountPointsT = Aws::Vector<MountPoint>>
536 ContainerDefinition& WithMountPoints(MountPointsT&& value) {
537 SetMountPoints(std::forward<MountPointsT>(value));
538 return *this;
539 }
540 template <typename MountPointsT = MountPoint>
541 ContainerDefinition& AddMountPoints(MountPointsT&& value) {
542 m_mountPointsHasBeenSet = true;
543 m_mountPoints.emplace_back(std::forward<MountPointsT>(value));
544 return *this;
545 }
547
549
554 inline const Aws::Vector<VolumeFrom>& GetVolumesFrom() const { return m_volumesFrom; }
555 inline bool VolumesFromHasBeenSet() const { return m_volumesFromHasBeenSet; }
556 template <typename VolumesFromT = Aws::Vector<VolumeFrom>>
557 void SetVolumesFrom(VolumesFromT&& value) {
558 m_volumesFromHasBeenSet = true;
559 m_volumesFrom = std::forward<VolumesFromT>(value);
560 }
561 template <typename VolumesFromT = Aws::Vector<VolumeFrom>>
562 ContainerDefinition& WithVolumesFrom(VolumesFromT&& value) {
563 SetVolumesFrom(std::forward<VolumesFromT>(value));
564 return *this;
565 }
566 template <typename VolumesFromT = VolumeFrom>
567 ContainerDefinition& AddVolumesFrom(VolumesFromT&& value) {
568 m_volumesFromHasBeenSet = true;
569 m_volumesFrom.emplace_back(std::forward<VolumesFromT>(value));
570 return *this;
571 }
573
575
581 inline const LinuxParameters& GetLinuxParameters() const { return m_linuxParameters; }
582 inline bool LinuxParametersHasBeenSet() const { return m_linuxParametersHasBeenSet; }
583 template <typename LinuxParametersT = LinuxParameters>
584 void SetLinuxParameters(LinuxParametersT&& value) {
585 m_linuxParametersHasBeenSet = true;
586 m_linuxParameters = std::forward<LinuxParametersT>(value);
587 }
588 template <typename LinuxParametersT = LinuxParameters>
589 ContainerDefinition& WithLinuxParameters(LinuxParametersT&& value) {
590 SetLinuxParameters(std::forward<LinuxParametersT>(value));
591 return *this;
592 }
594
596
602 inline const Aws::Vector<Secret>& GetSecrets() const { return m_secrets; }
603 inline bool SecretsHasBeenSet() const { return m_secretsHasBeenSet; }
604 template <typename SecretsT = Aws::Vector<Secret>>
605 void SetSecrets(SecretsT&& value) {
606 m_secretsHasBeenSet = true;
607 m_secrets = std::forward<SecretsT>(value);
608 }
609 template <typename SecretsT = Aws::Vector<Secret>>
610 ContainerDefinition& WithSecrets(SecretsT&& value) {
611 SetSecrets(std::forward<SecretsT>(value));
612 return *this;
613 }
614 template <typename SecretsT = Secret>
615 ContainerDefinition& AddSecrets(SecretsT&& value) {
616 m_secretsHasBeenSet = true;
617 m_secrets.emplace_back(std::forward<SecretsT>(value));
618 return *this;
619 }
621
623
646 inline const Aws::Vector<ContainerDependency>& GetDependsOn() const { return m_dependsOn; }
647 inline bool DependsOnHasBeenSet() const { return m_dependsOnHasBeenSet; }
648 template <typename DependsOnT = Aws::Vector<ContainerDependency>>
649 void SetDependsOn(DependsOnT&& value) {
650 m_dependsOnHasBeenSet = true;
651 m_dependsOn = std::forward<DependsOnT>(value);
652 }
653 template <typename DependsOnT = Aws::Vector<ContainerDependency>>
654 ContainerDefinition& WithDependsOn(DependsOnT&& value) {
655 SetDependsOn(std::forward<DependsOnT>(value));
656 return *this;
657 }
658 template <typename DependsOnT = ContainerDependency>
659 ContainerDefinition& AddDependsOn(DependsOnT&& value) {
660 m_dependsOnHasBeenSet = true;
661 m_dependsOn.emplace_back(std::forward<DependsOnT>(value));
662 return *this;
663 }
665
667
697 inline int GetStartTimeout() const { return m_startTimeout; }
698 inline bool StartTimeoutHasBeenSet() const { return m_startTimeoutHasBeenSet; }
699 inline void SetStartTimeout(int value) {
700 m_startTimeoutHasBeenSet = true;
701 m_startTimeout = value;
702 }
704 SetStartTimeout(value);
705 return *this;
706 }
708
710
739 inline int GetStopTimeout() const { return m_stopTimeout; }
740 inline bool StopTimeoutHasBeenSet() const { return m_stopTimeoutHasBeenSet; }
741 inline void SetStopTimeout(int value) {
742 m_stopTimeoutHasBeenSet = true;
743 m_stopTimeout = value;
744 }
746 SetStopTimeout(value);
747 return *this;
748 }
750
752
763 inline VersionConsistency GetVersionConsistency() const { return m_versionConsistency; }
764 inline bool VersionConsistencyHasBeenSet() const { return m_versionConsistencyHasBeenSet; }
766 m_versionConsistencyHasBeenSet = true;
767 m_versionConsistency = value;
768 }
771 return *this;
772 }
774
776
783 inline const Aws::String& GetHostname() const { return m_hostname; }
784 inline bool HostnameHasBeenSet() const { return m_hostnameHasBeenSet; }
785 template <typename HostnameT = Aws::String>
786 void SetHostname(HostnameT&& value) {
787 m_hostnameHasBeenSet = true;
788 m_hostname = std::forward<HostnameT>(value);
789 }
790 template <typename HostnameT = Aws::String>
791 ContainerDefinition& WithHostname(HostnameT&& value) {
792 SetHostname(std::forward<HostnameT>(value));
793 return *this;
794 }
796
798
812 inline const Aws::String& GetUser() const { return m_user; }
813 inline bool UserHasBeenSet() const { return m_userHasBeenSet; }
814 template <typename UserT = Aws::String>
815 void SetUser(UserT&& value) {
816 m_userHasBeenSet = true;
817 m_user = std::forward<UserT>(value);
818 }
819 template <typename UserT = Aws::String>
821 SetUser(std::forward<UserT>(value));
822 return *this;
823 }
825
827
832 inline const Aws::String& GetWorkingDirectory() const { return m_workingDirectory; }
833 inline bool WorkingDirectoryHasBeenSet() const { return m_workingDirectoryHasBeenSet; }
834 template <typename WorkingDirectoryT = Aws::String>
835 void SetWorkingDirectory(WorkingDirectoryT&& value) {
836 m_workingDirectoryHasBeenSet = true;
837 m_workingDirectory = std::forward<WorkingDirectoryT>(value);
838 }
839 template <typename WorkingDirectoryT = Aws::String>
840 ContainerDefinition& WithWorkingDirectory(WorkingDirectoryT&& value) {
841 SetWorkingDirectory(std::forward<WorkingDirectoryT>(value));
842 return *this;
843 }
845
847
853 inline bool GetDisableNetworking() const { return m_disableNetworking; }
854 inline bool DisableNetworkingHasBeenSet() const { return m_disableNetworkingHasBeenSet; }
855 inline void SetDisableNetworking(bool value) {
856 m_disableNetworkingHasBeenSet = true;
857 m_disableNetworking = value;
858 }
861 return *this;
862 }
864
866
874 inline bool GetPrivileged() const { return m_privileged; }
875 inline bool PrivilegedHasBeenSet() const { return m_privilegedHasBeenSet; }
876 inline void SetPrivileged(bool value) {
877 m_privilegedHasBeenSet = true;
878 m_privileged = value;
879 }
881 SetPrivileged(value);
882 return *this;
883 }
885
887
894 inline bool GetReadonlyRootFilesystem() const { return m_readonlyRootFilesystem; }
895 inline bool ReadonlyRootFilesystemHasBeenSet() const { return m_readonlyRootFilesystemHasBeenSet; }
896 inline void SetReadonlyRootFilesystem(bool value) {
897 m_readonlyRootFilesystemHasBeenSet = true;
898 m_readonlyRootFilesystem = value;
899 }
902 return *this;
903 }
905
907
913 inline const Aws::Vector<Aws::String>& GetDnsServers() const { return m_dnsServers; }
914 inline bool DnsServersHasBeenSet() const { return m_dnsServersHasBeenSet; }
915 template <typename DnsServersT = Aws::Vector<Aws::String>>
916 void SetDnsServers(DnsServersT&& value) {
917 m_dnsServersHasBeenSet = true;
918 m_dnsServers = std::forward<DnsServersT>(value);
919 }
920 template <typename DnsServersT = Aws::Vector<Aws::String>>
921 ContainerDefinition& WithDnsServers(DnsServersT&& value) {
922 SetDnsServers(std::forward<DnsServersT>(value));
923 return *this;
924 }
925 template <typename DnsServersT = Aws::String>
926 ContainerDefinition& AddDnsServers(DnsServersT&& value) {
927 m_dnsServersHasBeenSet = true;
928 m_dnsServers.emplace_back(std::forward<DnsServersT>(value));
929 return *this;
930 }
932
934
940 inline const Aws::Vector<Aws::String>& GetDnsSearchDomains() const { return m_dnsSearchDomains; }
941 inline bool DnsSearchDomainsHasBeenSet() const { return m_dnsSearchDomainsHasBeenSet; }
942 template <typename DnsSearchDomainsT = Aws::Vector<Aws::String>>
943 void SetDnsSearchDomains(DnsSearchDomainsT&& value) {
944 m_dnsSearchDomainsHasBeenSet = true;
945 m_dnsSearchDomains = std::forward<DnsSearchDomainsT>(value);
946 }
947 template <typename DnsSearchDomainsT = Aws::Vector<Aws::String>>
948 ContainerDefinition& WithDnsSearchDomains(DnsSearchDomainsT&& value) {
949 SetDnsSearchDomains(std::forward<DnsSearchDomainsT>(value));
950 return *this;
951 }
952 template <typename DnsSearchDomainsT = Aws::String>
953 ContainerDefinition& AddDnsSearchDomains(DnsSearchDomainsT&& value) {
954 m_dnsSearchDomainsHasBeenSet = true;
955 m_dnsSearchDomains.emplace_back(std::forward<DnsSearchDomainsT>(value));
956 return *this;
957 }
959
961
969 inline const Aws::Vector<HostEntry>& GetExtraHosts() const { return m_extraHosts; }
970 inline bool ExtraHostsHasBeenSet() const { return m_extraHostsHasBeenSet; }
971 template <typename ExtraHostsT = Aws::Vector<HostEntry>>
972 void SetExtraHosts(ExtraHostsT&& value) {
973 m_extraHostsHasBeenSet = true;
974 m_extraHosts = std::forward<ExtraHostsT>(value);
975 }
976 template <typename ExtraHostsT = Aws::Vector<HostEntry>>
977 ContainerDefinition& WithExtraHosts(ExtraHostsT&& value) {
978 SetExtraHosts(std::forward<ExtraHostsT>(value));
979 return *this;
980 }
981 template <typename ExtraHostsT = HostEntry>
982 ContainerDefinition& AddExtraHosts(ExtraHostsT&& value) {
983 m_extraHostsHasBeenSet = true;
984 m_extraHosts.emplace_back(std::forward<ExtraHostsT>(value));
985 return *this;
986 }
988
990
1014 inline const Aws::Vector<Aws::String>& GetDockerSecurityOptions() const { return m_dockerSecurityOptions; }
1015 inline bool DockerSecurityOptionsHasBeenSet() const { return m_dockerSecurityOptionsHasBeenSet; }
1016 template <typename DockerSecurityOptionsT = Aws::Vector<Aws::String>>
1017 void SetDockerSecurityOptions(DockerSecurityOptionsT&& value) {
1018 m_dockerSecurityOptionsHasBeenSet = true;
1019 m_dockerSecurityOptions = std::forward<DockerSecurityOptionsT>(value);
1020 }
1021 template <typename DockerSecurityOptionsT = Aws::Vector<Aws::String>>
1022 ContainerDefinition& WithDockerSecurityOptions(DockerSecurityOptionsT&& value) {
1023 SetDockerSecurityOptions(std::forward<DockerSecurityOptionsT>(value));
1024 return *this;
1025 }
1026 template <typename DockerSecurityOptionsT = Aws::String>
1027 ContainerDefinition& AddDockerSecurityOptions(DockerSecurityOptionsT&& value) {
1028 m_dockerSecurityOptionsHasBeenSet = true;
1029 m_dockerSecurityOptions.emplace_back(std::forward<DockerSecurityOptionsT>(value));
1030 return *this;
1031 }
1033
1035
1041 inline bool GetInteractive() const { return m_interactive; }
1042 inline bool InteractiveHasBeenSet() const { return m_interactiveHasBeenSet; }
1043 inline void SetInteractive(bool value) {
1044 m_interactiveHasBeenSet = true;
1045 m_interactive = value;
1046 }
1048 SetInteractive(value);
1049 return *this;
1050 }
1052
1054
1059 inline bool GetPseudoTerminal() const { return m_pseudoTerminal; }
1060 inline bool PseudoTerminalHasBeenSet() const { return m_pseudoTerminalHasBeenSet; }
1061 inline void SetPseudoTerminal(bool value) {
1062 m_pseudoTerminalHasBeenSet = true;
1063 m_pseudoTerminal = value;
1064 }
1066 SetPseudoTerminal(value);
1067 return *this;
1068 }
1070
1072
1081 inline const Aws::Map<Aws::String, Aws::String>& GetDockerLabels() const { return m_dockerLabels; }
1082 inline bool DockerLabelsHasBeenSet() const { return m_dockerLabelsHasBeenSet; }
1083 template <typename DockerLabelsT = Aws::Map<Aws::String, Aws::String>>
1084 void SetDockerLabels(DockerLabelsT&& value) {
1085 m_dockerLabelsHasBeenSet = true;
1086 m_dockerLabels = std::forward<DockerLabelsT>(value);
1087 }
1088 template <typename DockerLabelsT = Aws::Map<Aws::String, Aws::String>>
1089 ContainerDefinition& WithDockerLabels(DockerLabelsT&& value) {
1090 SetDockerLabels(std::forward<DockerLabelsT>(value));
1091 return *this;
1092 }
1093 template <typename DockerLabelsKeyT = Aws::String, typename DockerLabelsValueT = Aws::String>
1094 ContainerDefinition& AddDockerLabels(DockerLabelsKeyT&& key, DockerLabelsValueT&& value) {
1095 m_dockerLabelsHasBeenSet = true;
1096 m_dockerLabels.emplace(std::forward<DockerLabelsKeyT>(key), std::forward<DockerLabelsValueT>(value));
1097 return *this;
1098 }
1100
1102
1121 inline const Aws::Vector<Ulimit>& GetUlimits() const { return m_ulimits; }
1122 inline bool UlimitsHasBeenSet() const { return m_ulimitsHasBeenSet; }
1123 template <typename UlimitsT = Aws::Vector<Ulimit>>
1124 void SetUlimits(UlimitsT&& value) {
1125 m_ulimitsHasBeenSet = true;
1126 m_ulimits = std::forward<UlimitsT>(value);
1127 }
1128 template <typename UlimitsT = Aws::Vector<Ulimit>>
1130 SetUlimits(std::forward<UlimitsT>(value));
1131 return *this;
1132 }
1133 template <typename UlimitsT = Ulimit>
1134 ContainerDefinition& AddUlimits(UlimitsT&& value) {
1135 m_ulimitsHasBeenSet = true;
1136 m_ulimits.emplace_back(std::forward<UlimitsT>(value));
1137 return *this;
1138 }
1140
1142
1168 inline const LogConfiguration& GetLogConfiguration() const { return m_logConfiguration; }
1169 inline bool LogConfigurationHasBeenSet() const { return m_logConfigurationHasBeenSet; }
1170 template <typename LogConfigurationT = LogConfiguration>
1171 void SetLogConfiguration(LogConfigurationT&& value) {
1172 m_logConfigurationHasBeenSet = true;
1173 m_logConfiguration = std::forward<LogConfigurationT>(value);
1174 }
1175 template <typename LogConfigurationT = LogConfiguration>
1176 ContainerDefinition& WithLogConfiguration(LogConfigurationT&& value) {
1177 SetLogConfiguration(std::forward<LogConfigurationT>(value));
1178 return *this;
1179 }
1181
1183
1189 inline const HealthCheck& GetHealthCheck() const { return m_healthCheck; }
1190 inline bool HealthCheckHasBeenSet() const { return m_healthCheckHasBeenSet; }
1191 template <typename HealthCheckT = HealthCheck>
1192 void SetHealthCheck(HealthCheckT&& value) {
1193 m_healthCheckHasBeenSet = true;
1194 m_healthCheck = std::forward<HealthCheckT>(value);
1195 }
1196 template <typename HealthCheckT = HealthCheck>
1197 ContainerDefinition& WithHealthCheck(HealthCheckT&& value) {
1198 SetHealthCheck(std::forward<HealthCheckT>(value));
1199 return *this;
1200 }
1202
1204
1211 inline const Aws::Vector<SystemControl>& GetSystemControls() const { return m_systemControls; }
1212 inline bool SystemControlsHasBeenSet() const { return m_systemControlsHasBeenSet; }
1213 template <typename SystemControlsT = Aws::Vector<SystemControl>>
1214 void SetSystemControls(SystemControlsT&& value) {
1215 m_systemControlsHasBeenSet = true;
1216 m_systemControls = std::forward<SystemControlsT>(value);
1217 }
1218 template <typename SystemControlsT = Aws::Vector<SystemControl>>
1219 ContainerDefinition& WithSystemControls(SystemControlsT&& value) {
1220 SetSystemControls(std::forward<SystemControlsT>(value));
1221 return *this;
1222 }
1223 template <typename SystemControlsT = SystemControl>
1224 ContainerDefinition& AddSystemControls(SystemControlsT&& value) {
1225 m_systemControlsHasBeenSet = true;
1226 m_systemControls.emplace_back(std::forward<SystemControlsT>(value));
1227 return *this;
1228 }
1230
1232
1236 inline const Aws::Vector<ResourceRequirement>& GetResourceRequirements() const { return m_resourceRequirements; }
1237 inline bool ResourceRequirementsHasBeenSet() const { return m_resourceRequirementsHasBeenSet; }
1238 template <typename ResourceRequirementsT = Aws::Vector<ResourceRequirement>>
1239 void SetResourceRequirements(ResourceRequirementsT&& value) {
1240 m_resourceRequirementsHasBeenSet = true;
1241 m_resourceRequirements = std::forward<ResourceRequirementsT>(value);
1242 }
1243 template <typename ResourceRequirementsT = Aws::Vector<ResourceRequirement>>
1244 ContainerDefinition& WithResourceRequirements(ResourceRequirementsT&& value) {
1245 SetResourceRequirements(std::forward<ResourceRequirementsT>(value));
1246 return *this;
1247 }
1248 template <typename ResourceRequirementsT = ResourceRequirement>
1249 ContainerDefinition& AddResourceRequirements(ResourceRequirementsT&& value) {
1250 m_resourceRequirementsHasBeenSet = true;
1251 m_resourceRequirements.emplace_back(std::forward<ResourceRequirementsT>(value));
1252 return *this;
1253 }
1255
1257
1264 inline const FirelensConfiguration& GetFirelensConfiguration() const { return m_firelensConfiguration; }
1265 inline bool FirelensConfigurationHasBeenSet() const { return m_firelensConfigurationHasBeenSet; }
1266 template <typename FirelensConfigurationT = FirelensConfiguration>
1267 void SetFirelensConfiguration(FirelensConfigurationT&& value) {
1268 m_firelensConfigurationHasBeenSet = true;
1269 m_firelensConfiguration = std::forward<FirelensConfigurationT>(value);
1270 }
1271 template <typename FirelensConfigurationT = FirelensConfiguration>
1272 ContainerDefinition& WithFirelensConfiguration(FirelensConfigurationT&& value) {
1273 SetFirelensConfiguration(std::forward<FirelensConfigurationT>(value));
1274 return *this;
1275 }
1277
1279
1308 inline const Aws::Vector<Aws::String>& GetCredentialSpecs() const { return m_credentialSpecs; }
1309 inline bool CredentialSpecsHasBeenSet() const { return m_credentialSpecsHasBeenSet; }
1310 template <typename CredentialSpecsT = Aws::Vector<Aws::String>>
1311 void SetCredentialSpecs(CredentialSpecsT&& value) {
1312 m_credentialSpecsHasBeenSet = true;
1313 m_credentialSpecs = std::forward<CredentialSpecsT>(value);
1314 }
1315 template <typename CredentialSpecsT = Aws::Vector<Aws::String>>
1316 ContainerDefinition& WithCredentialSpecs(CredentialSpecsT&& value) {
1317 SetCredentialSpecs(std::forward<CredentialSpecsT>(value));
1318 return *this;
1319 }
1320 template <typename CredentialSpecsT = Aws::String>
1321 ContainerDefinition& AddCredentialSpecs(CredentialSpecsT&& value) {
1322 m_credentialSpecsHasBeenSet = true;
1323 m_credentialSpecs.emplace_back(std::forward<CredentialSpecsT>(value));
1324 return *this;
1325 }
1327 private:
1328 Aws::String m_name;
1329
1330 Aws::String m_image;
1331
1332 RepositoryCredentials m_repositoryCredentials;
1333
1334 int m_cpu{0};
1335
1336 int m_memory{0};
1337
1338 int m_memoryReservation{0};
1339
1341
1342 Aws::Vector<PortMapping> m_portMappings;
1343
1344 bool m_essential{false};
1345
1346 ContainerRestartPolicy m_restartPolicy;
1347
1348 Aws::Vector<Aws::String> m_entryPoint;
1349
1350 Aws::Vector<Aws::String> m_command;
1351
1352 Aws::Vector<KeyValuePair> m_environment;
1353
1354 Aws::Vector<EnvironmentFile> m_environmentFiles;
1355
1356 Aws::Vector<MountPoint> m_mountPoints;
1357
1358 Aws::Vector<VolumeFrom> m_volumesFrom;
1359
1360 LinuxParameters m_linuxParameters;
1361
1362 Aws::Vector<Secret> m_secrets;
1363
1365
1366 int m_startTimeout{0};
1367
1368 int m_stopTimeout{0};
1369
1370 VersionConsistency m_versionConsistency{VersionConsistency::NOT_SET};
1371
1372 Aws::String m_hostname;
1373
1374 Aws::String m_user;
1375
1376 Aws::String m_workingDirectory;
1377
1378 bool m_disableNetworking{false};
1379
1380 bool m_privileged{false};
1381
1382 bool m_readonlyRootFilesystem{false};
1383
1384 Aws::Vector<Aws::String> m_dnsServers;
1385
1386 Aws::Vector<Aws::String> m_dnsSearchDomains;
1387
1388 Aws::Vector<HostEntry> m_extraHosts;
1389
1390 Aws::Vector<Aws::String> m_dockerSecurityOptions;
1391
1392 bool m_interactive{false};
1393
1394 bool m_pseudoTerminal{false};
1395
1397
1398 Aws::Vector<Ulimit> m_ulimits;
1399
1400 LogConfiguration m_logConfiguration;
1401
1402 HealthCheck m_healthCheck;
1403
1404 Aws::Vector<SystemControl> m_systemControls;
1405
1406 Aws::Vector<ResourceRequirement> m_resourceRequirements;
1407
1408 FirelensConfiguration m_firelensConfiguration;
1409
1410 Aws::Vector<Aws::String> m_credentialSpecs;
1411 bool m_nameHasBeenSet = false;
1412 bool m_imageHasBeenSet = false;
1413 bool m_repositoryCredentialsHasBeenSet = false;
1414 bool m_cpuHasBeenSet = false;
1415 bool m_memoryHasBeenSet = false;
1416 bool m_memoryReservationHasBeenSet = false;
1417 bool m_linksHasBeenSet = false;
1418 bool m_portMappingsHasBeenSet = false;
1419 bool m_essentialHasBeenSet = false;
1420 bool m_restartPolicyHasBeenSet = false;
1421 bool m_entryPointHasBeenSet = false;
1422 bool m_commandHasBeenSet = false;
1423 bool m_environmentHasBeenSet = false;
1424 bool m_environmentFilesHasBeenSet = false;
1425 bool m_mountPointsHasBeenSet = false;
1426 bool m_volumesFromHasBeenSet = false;
1427 bool m_linuxParametersHasBeenSet = false;
1428 bool m_secretsHasBeenSet = false;
1429 bool m_dependsOnHasBeenSet = false;
1430 bool m_startTimeoutHasBeenSet = false;
1431 bool m_stopTimeoutHasBeenSet = false;
1432 bool m_versionConsistencyHasBeenSet = false;
1433 bool m_hostnameHasBeenSet = false;
1434 bool m_userHasBeenSet = false;
1435 bool m_workingDirectoryHasBeenSet = false;
1436 bool m_disableNetworkingHasBeenSet = false;
1437 bool m_privilegedHasBeenSet = false;
1438 bool m_readonlyRootFilesystemHasBeenSet = false;
1439 bool m_dnsServersHasBeenSet = false;
1440 bool m_dnsSearchDomainsHasBeenSet = false;
1441 bool m_extraHostsHasBeenSet = false;
1442 bool m_dockerSecurityOptionsHasBeenSet = false;
1443 bool m_interactiveHasBeenSet = false;
1444 bool m_pseudoTerminalHasBeenSet = false;
1445 bool m_dockerLabelsHasBeenSet = false;
1446 bool m_ulimitsHasBeenSet = false;
1447 bool m_logConfigurationHasBeenSet = false;
1448 bool m_healthCheckHasBeenSet = false;
1449 bool m_systemControlsHasBeenSet = false;
1450 bool m_resourceRequirementsHasBeenSet = false;
1451 bool m_firelensConfigurationHasBeenSet = false;
1452 bool m_credentialSpecsHasBeenSet = false;
1453};
1454
1455} // namespace Model
1456} // namespace ECS
1457} // namespace Aws
ContainerDefinition & WithStopTimeout(int value)
ContainerDefinition & AddDockerLabels(DockerLabelsKeyT &&key, DockerLabelsValueT &&value)
ContainerDefinition & WithPseudoTerminal(bool value)
ContainerDefinition & WithReadonlyRootFilesystem(bool value)
const Aws::Vector< Aws::String > & GetEntryPoint() const
const Aws::Vector< ContainerDependency > & GetDependsOn() const
const Aws::Vector< Aws::String > & GetLinks() const
const Aws::Vector< Aws::String > & GetDockerSecurityOptions() const
ContainerDefinition & WithEssential(bool value)
void SetRepositoryCredentials(RepositoryCredentialsT &&value)
ContainerDefinition & AddSystemControls(SystemControlsT &&value)
void SetResourceRequirements(ResourceRequirementsT &&value)
ContainerDefinition & AddDnsSearchDomains(DnsSearchDomainsT &&value)
void SetLinuxParameters(LinuxParametersT &&value)
ContainerDefinition & WithSystemControls(SystemControlsT &&value)
ContainerDefinition & WithUlimits(UlimitsT &&value)
void SetDockerLabels(DockerLabelsT &&value)
ContainerDefinition & WithMemoryReservation(int value)
ContainerDefinition & WithEnvironmentFiles(EnvironmentFilesT &&value)
ContainerDefinition & WithName(NameT &&value)
const Aws::String & GetWorkingDirectory() const
const Aws::Vector< Aws::String > & GetDnsServers() const
const LinuxParameters & GetLinuxParameters() const
ContainerDefinition & AddMountPoints(MountPointsT &&value)
const LogConfiguration & GetLogConfiguration() const
AWS_ECS_API Aws::Utils::Json::JsonValue Jsonize() const
ContainerDefinition & WithDisableNetworking(bool value)
ContainerDefinition & AddDockerSecurityOptions(DockerSecurityOptionsT &&value)
void SetEnvironment(EnvironmentT &&value)
ContainerDefinition & WithRestartPolicy(RestartPolicyT &&value)
const Aws::Vector< VolumeFrom > & GetVolumesFrom() const
const Aws::Vector< Aws::String > & GetCredentialSpecs() const
ContainerDefinition & WithWorkingDirectory(WorkingDirectoryT &&value)
const Aws::Map< Aws::String, Aws::String > & GetDockerLabels() const
ContainerDefinition & WithPortMappings(PortMappingsT &&value)
ContainerDefinition & AddCredentialSpecs(CredentialSpecsT &&value)
void SetDnsSearchDomains(DnsSearchDomainsT &&value)
ContainerDefinition & AddEntryPoint(EntryPointT &&value)
ContainerDefinition & AddLinks(LinksT &&value)
ContainerDefinition & AddDnsServers(DnsServersT &&value)
const Aws::Vector< ResourceRequirement > & GetResourceRequirements() const
ContainerDefinition & AddVolumesFrom(VolumesFromT &&value)
ContainerDefinition & WithCommand(CommandT &&value)
void SetEnvironmentFiles(EnvironmentFilesT &&value)
const Aws::Vector< KeyValuePair > & GetEnvironment() const
ContainerDefinition & WithMemory(int value)
ContainerDefinition & AddEnvironment(EnvironmentT &&value)
void SetMountPoints(MountPointsT &&value)
AWS_ECS_API ContainerDefinition()=default
const Aws::Vector< PortMapping > & GetPortMappings() const
ContainerDefinition & WithDependsOn(DependsOnT &&value)
ContainerDefinition & WithDnsServers(DnsServersT &&value)
void SetFirelensConfiguration(FirelensConfigurationT &&value)
void SetVersionConsistency(VersionConsistency value)
const Aws::Vector< Secret > & GetSecrets() const
void SetHealthCheck(HealthCheckT &&value)
ContainerDefinition & AddDependsOn(DependsOnT &&value)
const Aws::Vector< Aws::String > & GetDnsSearchDomains() const
void SetSystemControls(SystemControlsT &&value)
ContainerDefinition & WithLinuxParameters(LinuxParametersT &&value)
ContainerDefinition & WithEnvironment(EnvironmentT &&value)
void SetRestartPolicy(RestartPolicyT &&value)
ContainerDefinition & WithEntryPoint(EntryPointT &&value)
void SetWorkingDirectory(WorkingDirectoryT &&value)
ContainerDefinition & WithDockerLabels(DockerLabelsT &&value)
ContainerDefinition & AddExtraHosts(ExtraHostsT &&value)
const HealthCheck & GetHealthCheck() const
void SetLogConfiguration(LogConfigurationT &&value)
void SetCredentialSpecs(CredentialSpecsT &&value)
ContainerDefinition & AddResourceRequirements(ResourceRequirementsT &&value)
ContainerDefinition & WithLinks(LinksT &&value)
ContainerDefinition & WithVersionConsistency(VersionConsistency value)
const Aws::Vector< Aws::String > & GetCommand() const
const Aws::Vector< Ulimit > & GetUlimits() const
ContainerDefinition & WithHealthCheck(HealthCheckT &&value)
const Aws::Vector< MountPoint > & GetMountPoints() const
ContainerDefinition & AddPortMappings(PortMappingsT &&value)
ContainerDefinition & WithInteractive(bool value)
ContainerDefinition & WithResourceRequirements(ResourceRequirementsT &&value)
void SetDockerSecurityOptions(DockerSecurityOptionsT &&value)
ContainerDefinition & WithCpu(int value)
ContainerDefinition & WithCredentialSpecs(CredentialSpecsT &&value)
ContainerDefinition & AddCommand(CommandT &&value)
void SetVolumesFrom(VolumesFromT &&value)
ContainerDefinition & WithMountPoints(MountPointsT &&value)
ContainerDefinition & WithDockerSecurityOptions(DockerSecurityOptionsT &&value)
ContainerDefinition & WithPrivileged(bool value)
AWS_ECS_API ContainerDefinition(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< EnvironmentFile > & GetEnvironmentFiles() const
const ContainerRestartPolicy & GetRestartPolicy() const
ContainerDefinition & WithVolumesFrom(VolumesFromT &&value)
const Aws::Vector< SystemControl > & GetSystemControls() const
ContainerDefinition & WithDnsSearchDomains(DnsSearchDomainsT &&value)
ContainerDefinition & AddUlimits(UlimitsT &&value)
AWS_ECS_API ContainerDefinition & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< HostEntry > & GetExtraHosts() const
ContainerDefinition & AddEnvironmentFiles(EnvironmentFilesT &&value)
const FirelensConfiguration & GetFirelensConfiguration() const
const Aws::String & GetName() const
ContainerDefinition & WithLogConfiguration(LogConfigurationT &&value)
ContainerDefinition & WithUser(UserT &&value)
VersionConsistency GetVersionConsistency() const
ContainerDefinition & WithExtraHosts(ExtraHostsT &&value)
ContainerDefinition & WithStartTimeout(int value)
ContainerDefinition & WithRepositoryCredentials(RepositoryCredentialsT &&value)
ContainerDefinition & AddSecrets(SecretsT &&value)
ContainerDefinition & WithSecrets(SecretsT &&value)
ContainerDefinition & WithFirelensConfiguration(FirelensConfigurationT &&value)
void SetPortMappings(PortMappingsT &&value)
ContainerDefinition & WithImage(ImageT &&value)
const Aws::String & GetHostname() const
ContainerDefinition & WithHostname(HostnameT &&value)
const RepositoryCredentials & GetRepositoryCredentials() const
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue