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

Describes the settings of a container that will be launched, or that is * launched, to an Amazon Lightsail container service.

See Also:

* AWS * API Reference

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

The name of the image used for the container.

Container images sourced * from your Lightsail container service, that are registered and stored on your * service, start with a colon (:). For example, if your container * service name is container-service-1, the container image label is * mystaticsite, and you want to use the third (3) * version of the registered container image, then you should specify * :container-service-1.mystaticsite.3. To use the latest version of a * container image, specify latest instead of a version number (for * example, :container-service-1.mystaticsite.latest). Lightsail will * automatically use the highest numbered version of the registered container * image.

Container images sourced from a public registry like Docker Hub * don't start with a colon. For example, nginx:latest or * nginx.

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

The name of the image used for the container.

Container images sourced * from your Lightsail container service, that are registered and stored on your * service, start with a colon (:). For example, if your container * service name is container-service-1, the container image label is * mystaticsite, and you want to use the third (3) * version of the registered container image, then you should specify * :container-service-1.mystaticsite.3. To use the latest version of a * container image, specify latest instead of a version number (for * example, :container-service-1.mystaticsite.latest). Lightsail will * automatically use the highest numbered version of the registered container * image.

Container images sourced from a public registry like Docker Hub * don't start with a colon. For example, nginx:latest or * nginx.

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

The name of the image used for the container.

Container images sourced * from your Lightsail container service, that are registered and stored on your * service, start with a colon (:). For example, if your container * service name is container-service-1, the container image label is * mystaticsite, and you want to use the third (3) * version of the registered container image, then you should specify * :container-service-1.mystaticsite.3. To use the latest version of a * container image, specify latest instead of a version number (for * example, :container-service-1.mystaticsite.latest). Lightsail will * automatically use the highest numbered version of the registered container * image.

Container images sourced from a public registry like Docker Hub * don't start with a colon. For example, nginx:latest or * nginx.

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

The name of the image used for the container.

Container images sourced * from your Lightsail container service, that are registered and stored on your * service, start with a colon (:). For example, if your container * service name is container-service-1, the container image label is * mystaticsite, and you want to use the third (3) * version of the registered container image, then you should specify * :container-service-1.mystaticsite.3. To use the latest version of a * container image, specify latest instead of a version number (for * example, :container-service-1.mystaticsite.latest). Lightsail will * automatically use the highest numbered version of the registered container * image.

Container images sourced from a public registry like Docker Hub * don't start with a colon. For example, nginx:latest or * nginx.

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

The name of the image used for the container.

Container images sourced * from your Lightsail container service, that are registered and stored on your * service, start with a colon (:). For example, if your container * service name is container-service-1, the container image label is * mystaticsite, and you want to use the third (3) * version of the registered container image, then you should specify * :container-service-1.mystaticsite.3. To use the latest version of a * container image, specify latest instead of a version number (for * example, :container-service-1.mystaticsite.latest). Lightsail will * automatically use the highest numbered version of the registered container * image.

Container images sourced from a public registry like Docker Hub * don't start with a colon. For example, nginx:latest or * nginx.

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

The name of the image used for the container.

Container images sourced * from your Lightsail container service, that are registered and stored on your * service, start with a colon (:). For example, if your container * service name is container-service-1, the container image label is * mystaticsite, and you want to use the third (3) * version of the registered container image, then you should specify * :container-service-1.mystaticsite.3. To use the latest version of a * container image, specify latest instead of a version number (for * example, :container-service-1.mystaticsite.latest). Lightsail will * automatically use the highest numbered version of the registered container * image.

Container images sourced from a public registry like Docker Hub * don't start with a colon. For example, nginx:latest or * nginx.

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

The name of the image used for the container.

Container images sourced * from your Lightsail container service, that are registered and stored on your * service, start with a colon (:). For example, if your container * service name is container-service-1, the container image label is * mystaticsite, and you want to use the third (3) * version of the registered container image, then you should specify * :container-service-1.mystaticsite.3. To use the latest version of a * container image, specify latest instead of a version number (for * example, :container-service-1.mystaticsite.latest). Lightsail will * automatically use the highest numbered version of the registered container * image.

Container images sourced from a public registry like Docker Hub * don't start with a colon. For example, nginx:latest or * nginx.

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

The name of the image used for the container.

Container images sourced * from your Lightsail container service, that are registered and stored on your * service, start with a colon (:). For example, if your container * service name is container-service-1, the container image label is * mystaticsite, and you want to use the third (3) * version of the registered container image, then you should specify * :container-service-1.mystaticsite.3. To use the latest version of a * container image, specify latest instead of a version number (for * example, :container-service-1.mystaticsite.latest). Lightsail will * automatically use the highest numbered version of the registered container * image.

Container images sourced from a public registry like Docker Hub * don't start with a colon. For example, nginx:latest or * nginx.

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

The launch command for the container.

*/ inline const Aws::Vector& GetCommand() const{ return m_command; } /** *

The launch command for the container.

*/ inline bool CommandHasBeenSet() const { return m_commandHasBeenSet; } /** *

The launch command for the container.

*/ inline void SetCommand(const Aws::Vector& value) { m_commandHasBeenSet = true; m_command = value; } /** *

The launch command for the container.

*/ inline void SetCommand(Aws::Vector&& value) { m_commandHasBeenSet = true; m_command = std::move(value); } /** *

The launch command for the container.

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

The launch command for the container.

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

The launch command for the container.

*/ inline Container& AddCommand(const Aws::String& value) { m_commandHasBeenSet = true; m_command.push_back(value); return *this; } /** *

The launch command for the container.

*/ inline Container& AddCommand(Aws::String&& value) { m_commandHasBeenSet = true; m_command.push_back(std::move(value)); return *this; } /** *

The launch command for the container.

*/ inline Container& AddCommand(const char* value) { m_commandHasBeenSet = true; m_command.push_back(value); return *this; } /** *

The environment variables of the container.

*/ inline const Aws::Map& GetEnvironment() const{ return m_environment; } /** *

The environment variables of the container.

*/ inline bool EnvironmentHasBeenSet() const { return m_environmentHasBeenSet; } /** *

The environment variables of the container.

*/ inline void SetEnvironment(const Aws::Map& value) { m_environmentHasBeenSet = true; m_environment = value; } /** *

The environment variables of the container.

*/ inline void SetEnvironment(Aws::Map&& value) { m_environmentHasBeenSet = true; m_environment = std::move(value); } /** *

The environment variables of the container.

*/ inline Container& WithEnvironment(const Aws::Map& value) { SetEnvironment(value); return *this;} /** *

The environment variables of the container.

*/ inline Container& WithEnvironment(Aws::Map&& value) { SetEnvironment(std::move(value)); return *this;} /** *

The environment variables of the container.

*/ inline Container& AddEnvironment(const Aws::String& key, const Aws::String& value) { m_environmentHasBeenSet = true; m_environment.emplace(key, value); return *this; } /** *

The environment variables of the container.

*/ inline Container& AddEnvironment(Aws::String&& key, const Aws::String& value) { m_environmentHasBeenSet = true; m_environment.emplace(std::move(key), value); return *this; } /** *

The environment variables of the container.

*/ inline Container& AddEnvironment(const Aws::String& key, Aws::String&& value) { m_environmentHasBeenSet = true; m_environment.emplace(key, std::move(value)); return *this; } /** *

The environment variables of the container.

*/ inline Container& AddEnvironment(Aws::String&& key, Aws::String&& value) { m_environmentHasBeenSet = true; m_environment.emplace(std::move(key), std::move(value)); return *this; } /** *

The environment variables of the container.

*/ inline Container& AddEnvironment(const char* key, Aws::String&& value) { m_environmentHasBeenSet = true; m_environment.emplace(key, std::move(value)); return *this; } /** *

The environment variables of the container.

*/ inline Container& AddEnvironment(Aws::String&& key, const char* value) { m_environmentHasBeenSet = true; m_environment.emplace(std::move(key), value); return *this; } /** *

The environment variables of the container.

*/ inline Container& AddEnvironment(const char* key, const char* value) { m_environmentHasBeenSet = true; m_environment.emplace(key, value); return *this; } /** *

The open firewall ports of the container.

*/ inline const Aws::Map& GetPorts() const{ return m_ports; } /** *

The open firewall ports of the container.

*/ inline bool PortsHasBeenSet() const { return m_portsHasBeenSet; } /** *

The open firewall ports of the container.

*/ inline void SetPorts(const Aws::Map& value) { m_portsHasBeenSet = true; m_ports = value; } /** *

The open firewall ports of the container.

*/ inline void SetPorts(Aws::Map&& value) { m_portsHasBeenSet = true; m_ports = std::move(value); } /** *

The open firewall ports of the container.

*/ inline Container& WithPorts(const Aws::Map& value) { SetPorts(value); return *this;} /** *

The open firewall ports of the container.

*/ inline Container& WithPorts(Aws::Map&& value) { SetPorts(std::move(value)); return *this;} /** *

The open firewall ports of the container.

*/ inline Container& AddPorts(const Aws::String& key, const ContainerServiceProtocol& value) { m_portsHasBeenSet = true; m_ports.emplace(key, value); return *this; } /** *

The open firewall ports of the container.

*/ inline Container& AddPorts(Aws::String&& key, const ContainerServiceProtocol& value) { m_portsHasBeenSet = true; m_ports.emplace(std::move(key), value); return *this; } /** *

The open firewall ports of the container.

*/ inline Container& AddPorts(const Aws::String& key, ContainerServiceProtocol&& value) { m_portsHasBeenSet = true; m_ports.emplace(key, std::move(value)); return *this; } /** *

The open firewall ports of the container.

*/ inline Container& AddPorts(Aws::String&& key, ContainerServiceProtocol&& value) { m_portsHasBeenSet = true; m_ports.emplace(std::move(key), std::move(value)); return *this; } /** *

The open firewall ports of the container.

*/ inline Container& AddPorts(const char* key, ContainerServiceProtocol&& value) { m_portsHasBeenSet = true; m_ports.emplace(key, std::move(value)); return *this; } /** *

The open firewall ports of the container.

*/ inline Container& AddPorts(const char* key, const ContainerServiceProtocol& value) { m_portsHasBeenSet = true; m_ports.emplace(key, value); return *this; } private: Aws::String m_image; bool m_imageHasBeenSet = false; Aws::Vector m_command; bool m_commandHasBeenSet = false; Aws::Map m_environment; bool m_environmentHasBeenSet = false; Aws::Map m_ports; bool m_portsHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws