/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace ECS { namespace Model { /** *

A Docker container that's part of a task.

See Also:

AWS API * Reference

*/ class Container { public: AWS_ECS_API Container(); AWS_ECS_API Container(Aws::Utils::Json::JsonView jsonValue); AWS_ECS_API Container& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_ECS_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The Amazon Resource Name (ARN) of the container.

*/ inline const Aws::String& GetContainerArn() const{ return m_containerArn; } /** *

The Amazon Resource Name (ARN) of the container.

*/ inline bool ContainerArnHasBeenSet() const { return m_containerArnHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the container.

*/ inline void SetContainerArn(const Aws::String& value) { m_containerArnHasBeenSet = true; m_containerArn = value; } /** *

The Amazon Resource Name (ARN) of the container.

*/ inline void SetContainerArn(Aws::String&& value) { m_containerArnHasBeenSet = true; m_containerArn = std::move(value); } /** *

The Amazon Resource Name (ARN) of the container.

*/ inline void SetContainerArn(const char* value) { m_containerArnHasBeenSet = true; m_containerArn.assign(value); } /** *

The Amazon Resource Name (ARN) of the container.

*/ inline Container& WithContainerArn(const Aws::String& value) { SetContainerArn(value); return *this;} /** *

The Amazon Resource Name (ARN) of the container.

*/ inline Container& WithContainerArn(Aws::String&& value) { SetContainerArn(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the container.

*/ inline Container& WithContainerArn(const char* value) { SetContainerArn(value); return *this;} /** *

The ARN of the task.

*/ inline const Aws::String& GetTaskArn() const{ return m_taskArn; } /** *

The ARN of the task.

*/ inline bool TaskArnHasBeenSet() const { return m_taskArnHasBeenSet; } /** *

The ARN of the task.

*/ inline void SetTaskArn(const Aws::String& value) { m_taskArnHasBeenSet = true; m_taskArn = value; } /** *

The ARN of the task.

*/ inline void SetTaskArn(Aws::String&& value) { m_taskArnHasBeenSet = true; m_taskArn = std::move(value); } /** *

The ARN of the task.

*/ inline void SetTaskArn(const char* value) { m_taskArnHasBeenSet = true; m_taskArn.assign(value); } /** *

The ARN of the task.

*/ inline Container& WithTaskArn(const Aws::String& value) { SetTaskArn(value); return *this;} /** *

The ARN of the task.

*/ inline Container& WithTaskArn(Aws::String&& value) { SetTaskArn(std::move(value)); return *this;} /** *

The ARN of the task.

*/ inline Container& WithTaskArn(const char* value) { SetTaskArn(value); return *this;} /** *

The name of the container.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the container.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the container.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the container.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the container.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the container.

*/ inline Container& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the container.

*/ inline Container& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the container.

*/ inline Container& WithName(const char* value) { SetName(value); return *this;} /** *

The image used for the container.

*/ inline const Aws::String& GetImage() const{ return m_image; } /** *

The image used for the container.

*/ inline bool ImageHasBeenSet() const { return m_imageHasBeenSet; } /** *

The image used for the container.

*/ inline void SetImage(const Aws::String& value) { m_imageHasBeenSet = true; m_image = value; } /** *

The image used for the container.

*/ inline void SetImage(Aws::String&& value) { m_imageHasBeenSet = true; m_image = std::move(value); } /** *

The image used for the container.

*/ inline void SetImage(const char* value) { m_imageHasBeenSet = true; m_image.assign(value); } /** *

The image used for the container.

*/ inline Container& WithImage(const Aws::String& value) { SetImage(value); return *this;} /** *

The image used for the container.

*/ inline Container& WithImage(Aws::String&& value) { SetImage(std::move(value)); return *this;} /** *

The image used for the container.

*/ inline Container& WithImage(const char* value) { SetImage(value); return *this;} /** *

The container image manifest digest.

*/ inline const Aws::String& GetImageDigest() const{ return m_imageDigest; } /** *

The container image manifest digest.

*/ inline bool ImageDigestHasBeenSet() const { return m_imageDigestHasBeenSet; } /** *

The container image manifest digest.

*/ inline void SetImageDigest(const Aws::String& value) { m_imageDigestHasBeenSet = true; m_imageDigest = value; } /** *

The container image manifest digest.

*/ inline void SetImageDigest(Aws::String&& value) { m_imageDigestHasBeenSet = true; m_imageDigest = std::move(value); } /** *

The container image manifest digest.

*/ inline void SetImageDigest(const char* value) { m_imageDigestHasBeenSet = true; m_imageDigest.assign(value); } /** *

The container image manifest digest.

*/ inline Container& WithImageDigest(const Aws::String& value) { SetImageDigest(value); return *this;} /** *

The container image manifest digest.

*/ inline Container& WithImageDigest(Aws::String&& value) { SetImageDigest(std::move(value)); return *this;} /** *

The container image manifest digest.

*/ inline Container& WithImageDigest(const char* value) { SetImageDigest(value); return *this;} /** *

The ID of the Docker container.

*/ inline const Aws::String& GetRuntimeId() const{ return m_runtimeId; } /** *

The ID of the Docker container.

*/ inline bool RuntimeIdHasBeenSet() const { return m_runtimeIdHasBeenSet; } /** *

The ID of the Docker container.

*/ inline void SetRuntimeId(const Aws::String& value) { m_runtimeIdHasBeenSet = true; m_runtimeId = value; } /** *

The ID of the Docker container.

*/ inline void SetRuntimeId(Aws::String&& value) { m_runtimeIdHasBeenSet = true; m_runtimeId = std::move(value); } /** *

The ID of the Docker container.

*/ inline void SetRuntimeId(const char* value) { m_runtimeIdHasBeenSet = true; m_runtimeId.assign(value); } /** *

The ID of the Docker container.

*/ inline Container& WithRuntimeId(const Aws::String& value) { SetRuntimeId(value); return *this;} /** *

The ID of the Docker container.

*/ inline Container& WithRuntimeId(Aws::String&& value) { SetRuntimeId(std::move(value)); return *this;} /** *

The ID of the Docker container.

*/ inline Container& WithRuntimeId(const char* value) { SetRuntimeId(value); return *this;} /** *

The last known status of the container.

*/ inline const Aws::String& GetLastStatus() const{ return m_lastStatus; } /** *

The last known status of the container.

*/ inline bool LastStatusHasBeenSet() const { return m_lastStatusHasBeenSet; } /** *

The last known status of the container.

*/ inline void SetLastStatus(const Aws::String& value) { m_lastStatusHasBeenSet = true; m_lastStatus = value; } /** *

The last known status of the container.

*/ inline void SetLastStatus(Aws::String&& value) { m_lastStatusHasBeenSet = true; m_lastStatus = std::move(value); } /** *

The last known status of the container.

*/ inline void SetLastStatus(const char* value) { m_lastStatusHasBeenSet = true; m_lastStatus.assign(value); } /** *

The last known status of the container.

*/ inline Container& WithLastStatus(const Aws::String& value) { SetLastStatus(value); return *this;} /** *

The last known status of the container.

*/ inline Container& WithLastStatus(Aws::String&& value) { SetLastStatus(std::move(value)); return *this;} /** *

The last known status of the container.

*/ inline Container& WithLastStatus(const char* value) { SetLastStatus(value); return *this;} /** *

The exit code returned from the container.

*/ inline int GetExitCode() const{ return m_exitCode; } /** *

The exit code returned from the container.

*/ inline bool ExitCodeHasBeenSet() const { return m_exitCodeHasBeenSet; } /** *

The exit code returned from the container.

*/ inline void SetExitCode(int value) { m_exitCodeHasBeenSet = true; m_exitCode = value; } /** *

The exit code returned from the container.

*/ inline Container& WithExitCode(int value) { SetExitCode(value); return *this;} /** *

A short (255 max characters) human-readable string to provide additional * details about a running or stopped container.

*/ inline const Aws::String& GetReason() const{ return m_reason; } /** *

A short (255 max characters) human-readable string to provide additional * details about a running or stopped container.

*/ inline bool ReasonHasBeenSet() const { return m_reasonHasBeenSet; } /** *

A short (255 max characters) human-readable string to provide additional * details about a running or stopped container.

*/ inline void SetReason(const Aws::String& value) { m_reasonHasBeenSet = true; m_reason = value; } /** *

A short (255 max characters) human-readable string to provide additional * details about a running or stopped container.

*/ inline void SetReason(Aws::String&& value) { m_reasonHasBeenSet = true; m_reason = std::move(value); } /** *

A short (255 max characters) human-readable string to provide additional * details about a running or stopped container.

*/ inline void SetReason(const char* value) { m_reasonHasBeenSet = true; m_reason.assign(value); } /** *

A short (255 max characters) human-readable string to provide additional * details about a running or stopped container.

*/ inline Container& WithReason(const Aws::String& value) { SetReason(value); return *this;} /** *

A short (255 max characters) human-readable string to provide additional * details about a running or stopped container.

*/ inline Container& WithReason(Aws::String&& value) { SetReason(std::move(value)); return *this;} /** *

A short (255 max characters) human-readable string to provide additional * details about a running or stopped container.

*/ inline Container& WithReason(const char* value) { SetReason(value); return *this;} /** *

The network bindings associated with the container.

*/ inline const Aws::Vector& GetNetworkBindings() const{ return m_networkBindings; } /** *

The network bindings associated with the container.

*/ inline bool NetworkBindingsHasBeenSet() const { return m_networkBindingsHasBeenSet; } /** *

The network bindings associated with the container.

*/ inline void SetNetworkBindings(const Aws::Vector& value) { m_networkBindingsHasBeenSet = true; m_networkBindings = value; } /** *

The network bindings associated with the container.

*/ inline void SetNetworkBindings(Aws::Vector&& value) { m_networkBindingsHasBeenSet = true; m_networkBindings = std::move(value); } /** *

The network bindings associated with the container.

*/ inline Container& WithNetworkBindings(const Aws::Vector& value) { SetNetworkBindings(value); return *this;} /** *

The network bindings associated with the container.

*/ inline Container& WithNetworkBindings(Aws::Vector&& value) { SetNetworkBindings(std::move(value)); return *this;} /** *

The network bindings associated with the container.

*/ inline Container& AddNetworkBindings(const NetworkBinding& value) { m_networkBindingsHasBeenSet = true; m_networkBindings.push_back(value); return *this; } /** *

The network bindings associated with the container.

*/ inline Container& AddNetworkBindings(NetworkBinding&& value) { m_networkBindingsHasBeenSet = true; m_networkBindings.push_back(std::move(value)); return *this; } /** *

The network interfaces associated with the container.

*/ inline const Aws::Vector& GetNetworkInterfaces() const{ return m_networkInterfaces; } /** *

The network interfaces associated with the container.

*/ inline bool NetworkInterfacesHasBeenSet() const { return m_networkInterfacesHasBeenSet; } /** *

The network interfaces associated with the container.

*/ inline void SetNetworkInterfaces(const Aws::Vector& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces = value; } /** *

The network interfaces associated with the container.

*/ inline void SetNetworkInterfaces(Aws::Vector&& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces = std::move(value); } /** *

The network interfaces associated with the container.

*/ inline Container& WithNetworkInterfaces(const Aws::Vector& value) { SetNetworkInterfaces(value); return *this;} /** *

The network interfaces associated with the container.

*/ inline Container& WithNetworkInterfaces(Aws::Vector&& value) { SetNetworkInterfaces(std::move(value)); return *this;} /** *

The network interfaces associated with the container.

*/ inline Container& AddNetworkInterfaces(const NetworkInterface& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces.push_back(value); return *this; } /** *

The network interfaces associated with the container.

*/ inline Container& AddNetworkInterfaces(NetworkInterface&& value) { m_networkInterfacesHasBeenSet = true; m_networkInterfaces.push_back(std::move(value)); return *this; } /** *

The health status of the container. If health checks aren't configured for * this container in its task definition, then it reports the health status as * UNKNOWN.

*/ inline const HealthStatus& GetHealthStatus() const{ return m_healthStatus; } /** *

The health status of the container. If health checks aren't configured for * this container in its task definition, then it reports the health status as * UNKNOWN.

*/ inline bool HealthStatusHasBeenSet() const { return m_healthStatusHasBeenSet; } /** *

The health status of the container. If health checks aren't configured for * this container in its task definition, then it reports the health status as * UNKNOWN.

*/ inline void SetHealthStatus(const HealthStatus& value) { m_healthStatusHasBeenSet = true; m_healthStatus = value; } /** *

The health status of the container. If health checks aren't configured for * this container in its task definition, then it reports the health status as * UNKNOWN.

*/ inline void SetHealthStatus(HealthStatus&& value) { m_healthStatusHasBeenSet = true; m_healthStatus = std::move(value); } /** *

The health status of the container. If health checks aren't configured for * this container in its task definition, then it reports the health status as * UNKNOWN.

*/ inline Container& WithHealthStatus(const HealthStatus& value) { SetHealthStatus(value); return *this;} /** *

The health status of the container. If health checks aren't configured for * this container in its task definition, then it reports the health status as * UNKNOWN.

*/ inline Container& WithHealthStatus(HealthStatus&& value) { SetHealthStatus(std::move(value)); return *this;} /** *

The details of any Amazon ECS managed agents associated with the * container.

*/ inline const Aws::Vector& GetManagedAgents() const{ return m_managedAgents; } /** *

The details of any Amazon ECS managed agents associated with the * container.

*/ inline bool ManagedAgentsHasBeenSet() const { return m_managedAgentsHasBeenSet; } /** *

The details of any Amazon ECS managed agents associated with the * container.

*/ inline void SetManagedAgents(const Aws::Vector& value) { m_managedAgentsHasBeenSet = true; m_managedAgents = value; } /** *

The details of any Amazon ECS managed agents associated with the * container.

*/ inline void SetManagedAgents(Aws::Vector&& value) { m_managedAgentsHasBeenSet = true; m_managedAgents = std::move(value); } /** *

The details of any Amazon ECS managed agents associated with the * container.

*/ inline Container& WithManagedAgents(const Aws::Vector& value) { SetManagedAgents(value); return *this;} /** *

The details of any Amazon ECS managed agents associated with the * container.

*/ inline Container& WithManagedAgents(Aws::Vector&& value) { SetManagedAgents(std::move(value)); return *this;} /** *

The details of any Amazon ECS managed agents associated with the * container.

*/ inline Container& AddManagedAgents(const ManagedAgent& value) { m_managedAgentsHasBeenSet = true; m_managedAgents.push_back(value); return *this; } /** *

The details of any Amazon ECS managed agents associated with the * container.

*/ inline Container& AddManagedAgents(ManagedAgent&& value) { m_managedAgentsHasBeenSet = true; m_managedAgents.push_back(std::move(value)); return *this; } /** *

The number of CPU units set for the container. The value is 0 if * no value was specified in the container definition when the task definition was * registered.

*/ inline const Aws::String& GetCpu() const{ return m_cpu; } /** *

The number of CPU units set for the container. The value is 0 if * no value was specified in the container definition when the task definition was * registered.

*/ inline bool CpuHasBeenSet() const { return m_cpuHasBeenSet; } /** *

The number of CPU units set for the container. The value is 0 if * no value was specified in the container definition when the task definition was * registered.

*/ inline void SetCpu(const Aws::String& value) { m_cpuHasBeenSet = true; m_cpu = value; } /** *

The number of CPU units set for the container. The value is 0 if * no value was specified in the container definition when the task definition was * registered.

*/ inline void SetCpu(Aws::String&& value) { m_cpuHasBeenSet = true; m_cpu = std::move(value); } /** *

The number of CPU units set for the container. The value is 0 if * no value was specified in the container definition when the task definition was * registered.

*/ inline void SetCpu(const char* value) { m_cpuHasBeenSet = true; m_cpu.assign(value); } /** *

The number of CPU units set for the container. The value is 0 if * no value was specified in the container definition when the task definition was * registered.

*/ inline Container& WithCpu(const Aws::String& value) { SetCpu(value); return *this;} /** *

The number of CPU units set for the container. The value is 0 if * no value was specified in the container definition when the task definition was * registered.

*/ inline Container& WithCpu(Aws::String&& value) { SetCpu(std::move(value)); return *this;} /** *

The number of CPU units set for the container. The value is 0 if * no value was specified in the container definition when the task definition was * registered.

*/ inline Container& WithCpu(const char* value) { SetCpu(value); return *this;} /** *

The hard limit (in MiB) of memory set for the container.

*/ inline const Aws::String& GetMemory() const{ return m_memory; } /** *

The hard limit (in MiB) of memory set for the container.

*/ inline bool MemoryHasBeenSet() const { return m_memoryHasBeenSet; } /** *

The hard limit (in MiB) of memory set for the container.

*/ inline void SetMemory(const Aws::String& value) { m_memoryHasBeenSet = true; m_memory = value; } /** *

The hard limit (in MiB) of memory set for the container.

*/ inline void SetMemory(Aws::String&& value) { m_memoryHasBeenSet = true; m_memory = std::move(value); } /** *

The hard limit (in MiB) of memory set for the container.

*/ inline void SetMemory(const char* value) { m_memoryHasBeenSet = true; m_memory.assign(value); } /** *

The hard limit (in MiB) of memory set for the container.

*/ inline Container& WithMemory(const Aws::String& value) { SetMemory(value); return *this;} /** *

The hard limit (in MiB) of memory set for the container.

*/ inline Container& WithMemory(Aws::String&& value) { SetMemory(std::move(value)); return *this;} /** *

The hard limit (in MiB) of memory set for the container.

*/ inline Container& WithMemory(const char* value) { SetMemory(value); return *this;} /** *

The soft limit (in MiB) of memory set for the container.

*/ inline const Aws::String& GetMemoryReservation() const{ return m_memoryReservation; } /** *

The soft limit (in MiB) of memory set for the container.

*/ inline bool MemoryReservationHasBeenSet() const { return m_memoryReservationHasBeenSet; } /** *

The soft limit (in MiB) of memory set for the container.

*/ inline void SetMemoryReservation(const Aws::String& value) { m_memoryReservationHasBeenSet = true; m_memoryReservation = value; } /** *

The soft limit (in MiB) of memory set for the container.

*/ inline void SetMemoryReservation(Aws::String&& value) { m_memoryReservationHasBeenSet = true; m_memoryReservation = std::move(value); } /** *

The soft limit (in MiB) of memory set for the container.

*/ inline void SetMemoryReservation(const char* value) { m_memoryReservationHasBeenSet = true; m_memoryReservation.assign(value); } /** *

The soft limit (in MiB) of memory set for the container.

*/ inline Container& WithMemoryReservation(const Aws::String& value) { SetMemoryReservation(value); return *this;} /** *

The soft limit (in MiB) of memory set for the container.

*/ inline Container& WithMemoryReservation(Aws::String&& value) { SetMemoryReservation(std::move(value)); return *this;} /** *

The soft limit (in MiB) of memory set for the container.

*/ inline Container& WithMemoryReservation(const char* value) { SetMemoryReservation(value); return *this;} /** *

The IDs of each GPU assigned to the container.

*/ inline const Aws::Vector& GetGpuIds() const{ return m_gpuIds; } /** *

The IDs of each GPU assigned to the container.

*/ inline bool GpuIdsHasBeenSet() const { return m_gpuIdsHasBeenSet; } /** *

The IDs of each GPU assigned to the container.

*/ inline void SetGpuIds(const Aws::Vector& value) { m_gpuIdsHasBeenSet = true; m_gpuIds = value; } /** *

The IDs of each GPU assigned to the container.

*/ inline void SetGpuIds(Aws::Vector&& value) { m_gpuIdsHasBeenSet = true; m_gpuIds = std::move(value); } /** *

The IDs of each GPU assigned to the container.

*/ inline Container& WithGpuIds(const Aws::Vector& value) { SetGpuIds(value); return *this;} /** *

The IDs of each GPU assigned to the container.

*/ inline Container& WithGpuIds(Aws::Vector&& value) { SetGpuIds(std::move(value)); return *this;} /** *

The IDs of each GPU assigned to the container.

*/ inline Container& AddGpuIds(const Aws::String& value) { m_gpuIdsHasBeenSet = true; m_gpuIds.push_back(value); return *this; } /** *

The IDs of each GPU assigned to the container.

*/ inline Container& AddGpuIds(Aws::String&& value) { m_gpuIdsHasBeenSet = true; m_gpuIds.push_back(std::move(value)); return *this; } /** *

The IDs of each GPU assigned to the container.

*/ inline Container& AddGpuIds(const char* value) { m_gpuIdsHasBeenSet = true; m_gpuIds.push_back(value); return *this; } private: Aws::String m_containerArn; bool m_containerArnHasBeenSet = false; Aws::String m_taskArn; bool m_taskArnHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_image; bool m_imageHasBeenSet = false; Aws::String m_imageDigest; bool m_imageDigestHasBeenSet = false; Aws::String m_runtimeId; bool m_runtimeIdHasBeenSet = false; Aws::String m_lastStatus; bool m_lastStatusHasBeenSet = false; int m_exitCode; bool m_exitCodeHasBeenSet = false; Aws::String m_reason; bool m_reasonHasBeenSet = false; Aws::Vector m_networkBindings; bool m_networkBindingsHasBeenSet = false; Aws::Vector m_networkInterfaces; bool m_networkInterfacesHasBeenSet = false; HealthStatus m_healthStatus; bool m_healthStatusHasBeenSet = false; Aws::Vector m_managedAgents; bool m_managedAgentsHasBeenSet = false; Aws::String m_cpu; bool m_cpuHasBeenSet = false; Aws::String m_memory; bool m_memoryHasBeenSet = false; Aws::String m_memoryReservation; bool m_memoryReservationHasBeenSet = false; Aws::Vector m_gpuIds; bool m_gpuIdsHasBeenSet = false; }; } // namespace Model } // namespace ECS } // namespace Aws