/** * 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 Lightsail { namespace Model { /** *

Describes a container deployment configuration of an Amazon Lightsail * container service.

A deployment specifies the settings, such as the ports * and launch command, of containers that are deployed to your container * service.

See Also:

AWS * API Reference

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

The version number of the deployment.

*/ inline int GetVersion() const{ return m_version; } /** *

The version number of the deployment.

*/ inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; } /** *

The version number of the deployment.

*/ inline void SetVersion(int value) { m_versionHasBeenSet = true; m_version = value; } /** *

The version number of the deployment.

*/ inline ContainerServiceDeployment& WithVersion(int value) { SetVersion(value); return *this;} /** *

The state of the deployment.

A deployment can be in one of the * following states:

  • Activating - The deployment is * being created.

  • Active - The deployment was * successfully created, and it's currently running on the container service. The * container service can have only one deployment in an active state at a time.

    *
  • Inactive - The deployment was previously * successfully created, but it is not currently running on the container * service.

  • Failed - The deployment failed. Use the * GetContainerLog action to view the log events for the containers in * the deployment to try to determine the reason for the failure.

*/ inline const ContainerServiceDeploymentState& GetState() const{ return m_state; } /** *

The state of the deployment.

A deployment can be in one of the * following states:

  • Activating - The deployment is * being created.

  • Active - The deployment was * successfully created, and it's currently running on the container service. The * container service can have only one deployment in an active state at a time.

    *
  • Inactive - The deployment was previously * successfully created, but it is not currently running on the container * service.

  • Failed - The deployment failed. Use the * GetContainerLog action to view the log events for the containers in * the deployment to try to determine the reason for the failure.

*/ inline bool StateHasBeenSet() const { return m_stateHasBeenSet; } /** *

The state of the deployment.

A deployment can be in one of the * following states:

  • Activating - The deployment is * being created.

  • Active - The deployment was * successfully created, and it's currently running on the container service. The * container service can have only one deployment in an active state at a time.

    *
  • Inactive - The deployment was previously * successfully created, but it is not currently running on the container * service.

  • Failed - The deployment failed. Use the * GetContainerLog action to view the log events for the containers in * the deployment to try to determine the reason for the failure.

*/ inline void SetState(const ContainerServiceDeploymentState& value) { m_stateHasBeenSet = true; m_state = value; } /** *

The state of the deployment.

A deployment can be in one of the * following states:

  • Activating - The deployment is * being created.

  • Active - The deployment was * successfully created, and it's currently running on the container service. The * container service can have only one deployment in an active state at a time.

    *
  • Inactive - The deployment was previously * successfully created, but it is not currently running on the container * service.

  • Failed - The deployment failed. Use the * GetContainerLog action to view the log events for the containers in * the deployment to try to determine the reason for the failure.

*/ inline void SetState(ContainerServiceDeploymentState&& value) { m_stateHasBeenSet = true; m_state = std::move(value); } /** *

The state of the deployment.

A deployment can be in one of the * following states:

  • Activating - The deployment is * being created.

  • Active - The deployment was * successfully created, and it's currently running on the container service. The * container service can have only one deployment in an active state at a time.

    *
  • Inactive - The deployment was previously * successfully created, but it is not currently running on the container * service.

  • Failed - The deployment failed. Use the * GetContainerLog action to view the log events for the containers in * the deployment to try to determine the reason for the failure.

*/ inline ContainerServiceDeployment& WithState(const ContainerServiceDeploymentState& value) { SetState(value); return *this;} /** *

The state of the deployment.

A deployment can be in one of the * following states:

  • Activating - The deployment is * being created.

  • Active - The deployment was * successfully created, and it's currently running on the container service. The * container service can have only one deployment in an active state at a time.

    *
  • Inactive - The deployment was previously * successfully created, but it is not currently running on the container * service.

  • Failed - The deployment failed. Use the * GetContainerLog action to view the log events for the containers in * the deployment to try to determine the reason for the failure.

*/ inline ContainerServiceDeployment& WithState(ContainerServiceDeploymentState&& value) { SetState(std::move(value)); return *this;} /** *

An object that describes the configuration for the containers of the * deployment.

*/ inline const Aws::Map& GetContainers() const{ return m_containers; } /** *

An object that describes the configuration for the containers of the * deployment.

*/ inline bool ContainersHasBeenSet() const { return m_containersHasBeenSet; } /** *

An object that describes the configuration for the containers of the * deployment.

*/ inline void SetContainers(const Aws::Map& value) { m_containersHasBeenSet = true; m_containers = value; } /** *

An object that describes the configuration for the containers of the * deployment.

*/ inline void SetContainers(Aws::Map&& value) { m_containersHasBeenSet = true; m_containers = std::move(value); } /** *

An object that describes the configuration for the containers of the * deployment.

*/ inline ContainerServiceDeployment& WithContainers(const Aws::Map& value) { SetContainers(value); return *this;} /** *

An object that describes the configuration for the containers of the * deployment.

*/ inline ContainerServiceDeployment& WithContainers(Aws::Map&& value) { SetContainers(std::move(value)); return *this;} /** *

An object that describes the configuration for the containers of the * deployment.

*/ inline ContainerServiceDeployment& AddContainers(const Aws::String& key, const Container& value) { m_containersHasBeenSet = true; m_containers.emplace(key, value); return *this; } /** *

An object that describes the configuration for the containers of the * deployment.

*/ inline ContainerServiceDeployment& AddContainers(Aws::String&& key, const Container& value) { m_containersHasBeenSet = true; m_containers.emplace(std::move(key), value); return *this; } /** *

An object that describes the configuration for the containers of the * deployment.

*/ inline ContainerServiceDeployment& AddContainers(const Aws::String& key, Container&& value) { m_containersHasBeenSet = true; m_containers.emplace(key, std::move(value)); return *this; } /** *

An object that describes the configuration for the containers of the * deployment.

*/ inline ContainerServiceDeployment& AddContainers(Aws::String&& key, Container&& value) { m_containersHasBeenSet = true; m_containers.emplace(std::move(key), std::move(value)); return *this; } /** *

An object that describes the configuration for the containers of the * deployment.

*/ inline ContainerServiceDeployment& AddContainers(const char* key, Container&& value) { m_containersHasBeenSet = true; m_containers.emplace(key, std::move(value)); return *this; } /** *

An object that describes the configuration for the containers of the * deployment.

*/ inline ContainerServiceDeployment& AddContainers(const char* key, const Container& value) { m_containersHasBeenSet = true; m_containers.emplace(key, value); return *this; } /** *

An object that describes the endpoint of the deployment.

*/ inline const ContainerServiceEndpoint& GetPublicEndpoint() const{ return m_publicEndpoint; } /** *

An object that describes the endpoint of the deployment.

*/ inline bool PublicEndpointHasBeenSet() const { return m_publicEndpointHasBeenSet; } /** *

An object that describes the endpoint of the deployment.

*/ inline void SetPublicEndpoint(const ContainerServiceEndpoint& value) { m_publicEndpointHasBeenSet = true; m_publicEndpoint = value; } /** *

An object that describes the endpoint of the deployment.

*/ inline void SetPublicEndpoint(ContainerServiceEndpoint&& value) { m_publicEndpointHasBeenSet = true; m_publicEndpoint = std::move(value); } /** *

An object that describes the endpoint of the deployment.

*/ inline ContainerServiceDeployment& WithPublicEndpoint(const ContainerServiceEndpoint& value) { SetPublicEndpoint(value); return *this;} /** *

An object that describes the endpoint of the deployment.

*/ inline ContainerServiceDeployment& WithPublicEndpoint(ContainerServiceEndpoint&& value) { SetPublicEndpoint(std::move(value)); return *this;} /** *

The timestamp when the deployment was created.

*/ inline const Aws::Utils::DateTime& GetCreatedAt() const{ return m_createdAt; } /** *

The timestamp when the deployment was created.

*/ inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; } /** *

The timestamp when the deployment was created.

*/ inline void SetCreatedAt(const Aws::Utils::DateTime& value) { m_createdAtHasBeenSet = true; m_createdAt = value; } /** *

The timestamp when the deployment was created.

*/ inline void SetCreatedAt(Aws::Utils::DateTime&& value) { m_createdAtHasBeenSet = true; m_createdAt = std::move(value); } /** *

The timestamp when the deployment was created.

*/ inline ContainerServiceDeployment& WithCreatedAt(const Aws::Utils::DateTime& value) { SetCreatedAt(value); return *this;} /** *

The timestamp when the deployment was created.

*/ inline ContainerServiceDeployment& WithCreatedAt(Aws::Utils::DateTime&& value) { SetCreatedAt(std::move(value)); return *this;} private: int m_version; bool m_versionHasBeenSet = false; ContainerServiceDeploymentState m_state; bool m_stateHasBeenSet = false; Aws::Map m_containers; bool m_containersHasBeenSet = false; ContainerServiceEndpoint m_publicEndpoint; bool m_publicEndpointHasBeenSet = false; Aws::Utils::DateTime m_createdAt; bool m_createdAtHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws