/** * 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 { /** *

The details of an Amazon ECS service deployment. This is used only when a * service uses the ECS deployment controller type.

See * Also:

AWS API * Reference

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

The ID of the deployment.

*/ inline const Aws::String& GetId() const{ return m_id; } /** *

The ID of the deployment.

*/ inline bool IdHasBeenSet() const { return m_idHasBeenSet; } /** *

The ID of the deployment.

*/ inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; } /** *

The ID of the deployment.

*/ inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); } /** *

The ID of the deployment.

*/ inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); } /** *

The ID of the deployment.

*/ inline Deployment& WithId(const Aws::String& value) { SetId(value); return *this;} /** *

The ID of the deployment.

*/ inline Deployment& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;} /** *

The ID of the deployment.

*/ inline Deployment& WithId(const char* value) { SetId(value); return *this;} /** *

The status of the deployment. The following describes each state:

*
PRIMARY

The most recent deployment of a service.

*
ACTIVE

A service deployment that still has running tasks, but * are in the process of being replaced with a new PRIMARY * deployment.

INACTIVE

A deployment that has been * completely replaced.

*/ inline const Aws::String& GetStatus() const{ return m_status; } /** *

The status of the deployment. The following describes each state:

*
PRIMARY

The most recent deployment of a service.

*
ACTIVE

A service deployment that still has running tasks, but * are in the process of being replaced with a new PRIMARY * deployment.

INACTIVE

A deployment that has been * completely replaced.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The status of the deployment. The following describes each state:

*
PRIMARY

The most recent deployment of a service.

*
ACTIVE

A service deployment that still has running tasks, but * are in the process of being replaced with a new PRIMARY * deployment.

INACTIVE

A deployment that has been * completely replaced.

*/ inline void SetStatus(const Aws::String& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The status of the deployment. The following describes each state:

*
PRIMARY

The most recent deployment of a service.

*
ACTIVE

A service deployment that still has running tasks, but * are in the process of being replaced with a new PRIMARY * deployment.

INACTIVE

A deployment that has been * completely replaced.

*/ inline void SetStatus(Aws::String&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The status of the deployment. The following describes each state:

*
PRIMARY

The most recent deployment of a service.

*
ACTIVE

A service deployment that still has running tasks, but * are in the process of being replaced with a new PRIMARY * deployment.

INACTIVE

A deployment that has been * completely replaced.

*/ inline void SetStatus(const char* value) { m_statusHasBeenSet = true; m_status.assign(value); } /** *

The status of the deployment. The following describes each state:

*
PRIMARY

The most recent deployment of a service.

*
ACTIVE

A service deployment that still has running tasks, but * are in the process of being replaced with a new PRIMARY * deployment.

INACTIVE

A deployment that has been * completely replaced.

*/ inline Deployment& WithStatus(const Aws::String& value) { SetStatus(value); return *this;} /** *

The status of the deployment. The following describes each state:

*
PRIMARY

The most recent deployment of a service.

*
ACTIVE

A service deployment that still has running tasks, but * are in the process of being replaced with a new PRIMARY * deployment.

INACTIVE

A deployment that has been * completely replaced.

*/ inline Deployment& WithStatus(Aws::String&& value) { SetStatus(std::move(value)); return *this;} /** *

The status of the deployment. The following describes each state:

*
PRIMARY

The most recent deployment of a service.

*
ACTIVE

A service deployment that still has running tasks, but * are in the process of being replaced with a new PRIMARY * deployment.

INACTIVE

A deployment that has been * completely replaced.

*/ inline Deployment& WithStatus(const char* value) { SetStatus(value); return *this;} /** *

The most recent task definition that was specified for the tasks in the * service to use.

*/ inline const Aws::String& GetTaskDefinition() const{ return m_taskDefinition; } /** *

The most recent task definition that was specified for the tasks in the * service to use.

*/ inline bool TaskDefinitionHasBeenSet() const { return m_taskDefinitionHasBeenSet; } /** *

The most recent task definition that was specified for the tasks in the * service to use.

*/ inline void SetTaskDefinition(const Aws::String& value) { m_taskDefinitionHasBeenSet = true; m_taskDefinition = value; } /** *

The most recent task definition that was specified for the tasks in the * service to use.

*/ inline void SetTaskDefinition(Aws::String&& value) { m_taskDefinitionHasBeenSet = true; m_taskDefinition = std::move(value); } /** *

The most recent task definition that was specified for the tasks in the * service to use.

*/ inline void SetTaskDefinition(const char* value) { m_taskDefinitionHasBeenSet = true; m_taskDefinition.assign(value); } /** *

The most recent task definition that was specified for the tasks in the * service to use.

*/ inline Deployment& WithTaskDefinition(const Aws::String& value) { SetTaskDefinition(value); return *this;} /** *

The most recent task definition that was specified for the tasks in the * service to use.

*/ inline Deployment& WithTaskDefinition(Aws::String&& value) { SetTaskDefinition(std::move(value)); return *this;} /** *

The most recent task definition that was specified for the tasks in the * service to use.

*/ inline Deployment& WithTaskDefinition(const char* value) { SetTaskDefinition(value); return *this;} /** *

The most recent desired count of tasks that was specified for the service to * deploy or maintain.

*/ inline int GetDesiredCount() const{ return m_desiredCount; } /** *

The most recent desired count of tasks that was specified for the service to * deploy or maintain.

*/ inline bool DesiredCountHasBeenSet() const { return m_desiredCountHasBeenSet; } /** *

The most recent desired count of tasks that was specified for the service to * deploy or maintain.

*/ inline void SetDesiredCount(int value) { m_desiredCountHasBeenSet = true; m_desiredCount = value; } /** *

The most recent desired count of tasks that was specified for the service to * deploy or maintain.

*/ inline Deployment& WithDesiredCount(int value) { SetDesiredCount(value); return *this;} /** *

The number of tasks in the deployment that are in the PENDING * status.

*/ inline int GetPendingCount() const{ return m_pendingCount; } /** *

The number of tasks in the deployment that are in the PENDING * status.

*/ inline bool PendingCountHasBeenSet() const { return m_pendingCountHasBeenSet; } /** *

The number of tasks in the deployment that are in the PENDING * status.

*/ inline void SetPendingCount(int value) { m_pendingCountHasBeenSet = true; m_pendingCount = value; } /** *

The number of tasks in the deployment that are in the PENDING * status.

*/ inline Deployment& WithPendingCount(int value) { SetPendingCount(value); return *this;} /** *

The number of tasks in the deployment that are in the RUNNING * status.

*/ inline int GetRunningCount() const{ return m_runningCount; } /** *

The number of tasks in the deployment that are in the RUNNING * status.

*/ inline bool RunningCountHasBeenSet() const { return m_runningCountHasBeenSet; } /** *

The number of tasks in the deployment that are in the RUNNING * status.

*/ inline void SetRunningCount(int value) { m_runningCountHasBeenSet = true; m_runningCount = value; } /** *

The number of tasks in the deployment that are in the RUNNING * status.

*/ inline Deployment& WithRunningCount(int value) { SetRunningCount(value); return *this;} /** *

The Unix timestamp for when the service deployment was created.

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

The Unix timestamp for when the service deployment was created.

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

The Unix timestamp for when the service deployment was created.

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

The Unix timestamp for when the service deployment was created.

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

The Unix timestamp for when the service deployment was created.

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

The Unix timestamp for when the service deployment was created.

*/ inline Deployment& WithCreatedAt(Aws::Utils::DateTime&& value) { SetCreatedAt(std::move(value)); return *this;} /** *

The Unix timestamp for when the service deployment was last updated.

*/ inline const Aws::Utils::DateTime& GetUpdatedAt() const{ return m_updatedAt; } /** *

The Unix timestamp for when the service deployment was last updated.

*/ inline bool UpdatedAtHasBeenSet() const { return m_updatedAtHasBeenSet; } /** *

The Unix timestamp for when the service deployment was last updated.

*/ inline void SetUpdatedAt(const Aws::Utils::DateTime& value) { m_updatedAtHasBeenSet = true; m_updatedAt = value; } /** *

The Unix timestamp for when the service deployment was last updated.

*/ inline void SetUpdatedAt(Aws::Utils::DateTime&& value) { m_updatedAtHasBeenSet = true; m_updatedAt = std::move(value); } /** *

The Unix timestamp for when the service deployment was last updated.

*/ inline Deployment& WithUpdatedAt(const Aws::Utils::DateTime& value) { SetUpdatedAt(value); return *this;} /** *

The Unix timestamp for when the service deployment was last updated.

*/ inline Deployment& WithUpdatedAt(Aws::Utils::DateTime&& value) { SetUpdatedAt(std::move(value)); return *this;} /** *

The capacity provider strategy that the deployment is using.

*/ inline const Aws::Vector& GetCapacityProviderStrategy() const{ return m_capacityProviderStrategy; } /** *

The capacity provider strategy that the deployment is using.

*/ inline bool CapacityProviderStrategyHasBeenSet() const { return m_capacityProviderStrategyHasBeenSet; } /** *

The capacity provider strategy that the deployment is using.

*/ inline void SetCapacityProviderStrategy(const Aws::Vector& value) { m_capacityProviderStrategyHasBeenSet = true; m_capacityProviderStrategy = value; } /** *

The capacity provider strategy that the deployment is using.

*/ inline void SetCapacityProviderStrategy(Aws::Vector&& value) { m_capacityProviderStrategyHasBeenSet = true; m_capacityProviderStrategy = std::move(value); } /** *

The capacity provider strategy that the deployment is using.

*/ inline Deployment& WithCapacityProviderStrategy(const Aws::Vector& value) { SetCapacityProviderStrategy(value); return *this;} /** *

The capacity provider strategy that the deployment is using.

*/ inline Deployment& WithCapacityProviderStrategy(Aws::Vector&& value) { SetCapacityProviderStrategy(std::move(value)); return *this;} /** *

The capacity provider strategy that the deployment is using.

*/ inline Deployment& AddCapacityProviderStrategy(const CapacityProviderStrategyItem& value) { m_capacityProviderStrategyHasBeenSet = true; m_capacityProviderStrategy.push_back(value); return *this; } /** *

The capacity provider strategy that the deployment is using.

*/ inline Deployment& AddCapacityProviderStrategy(CapacityProviderStrategyItem&& value) { m_capacityProviderStrategyHasBeenSet = true; m_capacityProviderStrategy.push_back(std::move(value)); return *this; } /** *

The launch type the tasks in the service are using. For more information, see * Amazon * ECS Launch Types in the Amazon Elastic Container Service Developer * Guide.

*/ inline const LaunchType& GetLaunchType() const{ return m_launchType; } /** *

The launch type the tasks in the service are using. For more information, see * Amazon * ECS Launch Types in the Amazon Elastic Container Service Developer * Guide.

*/ inline bool LaunchTypeHasBeenSet() const { return m_launchTypeHasBeenSet; } /** *

The launch type the tasks in the service are using. For more information, see * Amazon * ECS Launch Types in the Amazon Elastic Container Service Developer * Guide.

*/ inline void SetLaunchType(const LaunchType& value) { m_launchTypeHasBeenSet = true; m_launchType = value; } /** *

The launch type the tasks in the service are using. For more information, see * Amazon * ECS Launch Types in the Amazon Elastic Container Service Developer * Guide.

*/ inline void SetLaunchType(LaunchType&& value) { m_launchTypeHasBeenSet = true; m_launchType = std::move(value); } /** *

The launch type the tasks in the service are using. For more information, see * Amazon * ECS Launch Types in the Amazon Elastic Container Service Developer * Guide.

*/ inline Deployment& WithLaunchType(const LaunchType& value) { SetLaunchType(value); return *this;} /** *

The launch type the tasks in the service are using. For more information, see * Amazon * ECS Launch Types in the Amazon Elastic Container Service Developer * Guide.

*/ inline Deployment& WithLaunchType(LaunchType&& value) { SetLaunchType(std::move(value)); return *this;} /** *

The platform version on which your tasks in the service are running. A * platform version is only specified for tasks using the Fargate launch type. If * one is not specified, the LATEST platform version is used by * default. For more information, see AWS * Fargate Platform Versions in the Amazon Elastic Container Service * Developer Guide.

*/ inline const Aws::String& GetPlatformVersion() const{ return m_platformVersion; } /** *

The platform version on which your tasks in the service are running. A * platform version is only specified for tasks using the Fargate launch type. If * one is not specified, the LATEST platform version is used by * default. For more information, see AWS * Fargate Platform Versions in the Amazon Elastic Container Service * Developer Guide.

*/ inline bool PlatformVersionHasBeenSet() const { return m_platformVersionHasBeenSet; } /** *

The platform version on which your tasks in the service are running. A * platform version is only specified for tasks using the Fargate launch type. If * one is not specified, the LATEST platform version is used by * default. For more information, see AWS * Fargate Platform Versions in the Amazon Elastic Container Service * Developer Guide.

*/ inline void SetPlatformVersion(const Aws::String& value) { m_platformVersionHasBeenSet = true; m_platformVersion = value; } /** *

The platform version on which your tasks in the service are running. A * platform version is only specified for tasks using the Fargate launch type. If * one is not specified, the LATEST platform version is used by * default. For more information, see AWS * Fargate Platform Versions in the Amazon Elastic Container Service * Developer Guide.

*/ inline void SetPlatformVersion(Aws::String&& value) { m_platformVersionHasBeenSet = true; m_platformVersion = std::move(value); } /** *

The platform version on which your tasks in the service are running. A * platform version is only specified for tasks using the Fargate launch type. If * one is not specified, the LATEST platform version is used by * default. For more information, see AWS * Fargate Platform Versions in the Amazon Elastic Container Service * Developer Guide.

*/ inline void SetPlatformVersion(const char* value) { m_platformVersionHasBeenSet = true; m_platformVersion.assign(value); } /** *

The platform version on which your tasks in the service are running. A * platform version is only specified for tasks using the Fargate launch type. If * one is not specified, the LATEST platform version is used by * default. For more information, see AWS * Fargate Platform Versions in the Amazon Elastic Container Service * Developer Guide.

*/ inline Deployment& WithPlatformVersion(const Aws::String& value) { SetPlatformVersion(value); return *this;} /** *

The platform version on which your tasks in the service are running. A * platform version is only specified for tasks using the Fargate launch type. If * one is not specified, the LATEST platform version is used by * default. For more information, see AWS * Fargate Platform Versions in the Amazon Elastic Container Service * Developer Guide.

*/ inline Deployment& WithPlatformVersion(Aws::String&& value) { SetPlatformVersion(std::move(value)); return *this;} /** *

The platform version on which your tasks in the service are running. A * platform version is only specified for tasks using the Fargate launch type. If * one is not specified, the LATEST platform version is used by * default. For more information, see AWS * Fargate Platform Versions in the Amazon Elastic Container Service * Developer Guide.

*/ inline Deployment& WithPlatformVersion(const char* value) { SetPlatformVersion(value); return *this;} /** *

The VPC subnet and security group configuration for tasks that receive their * own elastic network interface by using the awsvpc networking * mode.

*/ inline const NetworkConfiguration& GetNetworkConfiguration() const{ return m_networkConfiguration; } /** *

The VPC subnet and security group configuration for tasks that receive their * own elastic network interface by using the awsvpc networking * mode.

*/ inline bool NetworkConfigurationHasBeenSet() const { return m_networkConfigurationHasBeenSet; } /** *

The VPC subnet and security group configuration for tasks that receive their * own elastic network interface by using the awsvpc networking * mode.

*/ inline void SetNetworkConfiguration(const NetworkConfiguration& value) { m_networkConfigurationHasBeenSet = true; m_networkConfiguration = value; } /** *

The VPC subnet and security group configuration for tasks that receive their * own elastic network interface by using the awsvpc networking * mode.

*/ inline void SetNetworkConfiguration(NetworkConfiguration&& value) { m_networkConfigurationHasBeenSet = true; m_networkConfiguration = std::move(value); } /** *

The VPC subnet and security group configuration for tasks that receive their * own elastic network interface by using the awsvpc networking * mode.

*/ inline Deployment& WithNetworkConfiguration(const NetworkConfiguration& value) { SetNetworkConfiguration(value); return *this;} /** *

The VPC subnet and security group configuration for tasks that receive their * own elastic network interface by using the awsvpc networking * mode.

*/ inline Deployment& WithNetworkConfiguration(NetworkConfiguration&& value) { SetNetworkConfiguration(std::move(value)); return *this;} private: Aws::String m_id; bool m_idHasBeenSet; Aws::String m_status; bool m_statusHasBeenSet; Aws::String m_taskDefinition; bool m_taskDefinitionHasBeenSet; int m_desiredCount; bool m_desiredCountHasBeenSet; int m_pendingCount; bool m_pendingCountHasBeenSet; int m_runningCount; bool m_runningCountHasBeenSet; Aws::Utils::DateTime m_createdAt; bool m_createdAtHasBeenSet; Aws::Utils::DateTime m_updatedAt; bool m_updatedAtHasBeenSet; Aws::Vector m_capacityProviderStrategy; bool m_capacityProviderStrategyHasBeenSet; LaunchType m_launchType; bool m_launchTypeHasBeenSet; Aws::String m_platformVersion; bool m_platformVersionHasBeenSet; NetworkConfiguration m_networkConfiguration; bool m_networkConfigurationHasBeenSet; }; } // namespace Model } // namespace ECS } // namespace Aws