/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace ECS { namespace Model { /** */ class UpdateTaskProtectionRequest : public ECSRequest { public: AWS_ECS_API UpdateTaskProtectionRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "UpdateTaskProtection"; } AWS_ECS_API Aws::String SerializePayload() const override; AWS_ECS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

The short name or full Amazon Resource Name (ARN) of the cluster that hosts * the service that the task sets exist in.

*/ inline const Aws::String& GetCluster() const{ return m_cluster; } /** *

The short name or full Amazon Resource Name (ARN) of the cluster that hosts * the service that the task sets exist in.

*/ inline bool ClusterHasBeenSet() const { return m_clusterHasBeenSet; } /** *

The short name or full Amazon Resource Name (ARN) of the cluster that hosts * the service that the task sets exist in.

*/ inline void SetCluster(const Aws::String& value) { m_clusterHasBeenSet = true; m_cluster = value; } /** *

The short name or full Amazon Resource Name (ARN) of the cluster that hosts * the service that the task sets exist in.

*/ inline void SetCluster(Aws::String&& value) { m_clusterHasBeenSet = true; m_cluster = std::move(value); } /** *

The short name or full Amazon Resource Name (ARN) of the cluster that hosts * the service that the task sets exist in.

*/ inline void SetCluster(const char* value) { m_clusterHasBeenSet = true; m_cluster.assign(value); } /** *

The short name or full Amazon Resource Name (ARN) of the cluster that hosts * the service that the task sets exist in.

*/ inline UpdateTaskProtectionRequest& WithCluster(const Aws::String& value) { SetCluster(value); return *this;} /** *

The short name or full Amazon Resource Name (ARN) of the cluster that hosts * the service that the task sets exist in.

*/ inline UpdateTaskProtectionRequest& WithCluster(Aws::String&& value) { SetCluster(std::move(value)); return *this;} /** *

The short name or full Amazon Resource Name (ARN) of the cluster that hosts * the service that the task sets exist in.

*/ inline UpdateTaskProtectionRequest& WithCluster(const char* value) { SetCluster(value); return *this;} /** *

A list of up to 10 task IDs or full ARN entries.

*/ inline const Aws::Vector& GetTasks() const{ return m_tasks; } /** *

A list of up to 10 task IDs or full ARN entries.

*/ inline bool TasksHasBeenSet() const { return m_tasksHasBeenSet; } /** *

A list of up to 10 task IDs or full ARN entries.

*/ inline void SetTasks(const Aws::Vector& value) { m_tasksHasBeenSet = true; m_tasks = value; } /** *

A list of up to 10 task IDs or full ARN entries.

*/ inline void SetTasks(Aws::Vector&& value) { m_tasksHasBeenSet = true; m_tasks = std::move(value); } /** *

A list of up to 10 task IDs or full ARN entries.

*/ inline UpdateTaskProtectionRequest& WithTasks(const Aws::Vector& value) { SetTasks(value); return *this;} /** *

A list of up to 10 task IDs or full ARN entries.

*/ inline UpdateTaskProtectionRequest& WithTasks(Aws::Vector&& value) { SetTasks(std::move(value)); return *this;} /** *

A list of up to 10 task IDs or full ARN entries.

*/ inline UpdateTaskProtectionRequest& AddTasks(const Aws::String& value) { m_tasksHasBeenSet = true; m_tasks.push_back(value); return *this; } /** *

A list of up to 10 task IDs or full ARN entries.

*/ inline UpdateTaskProtectionRequest& AddTasks(Aws::String&& value) { m_tasksHasBeenSet = true; m_tasks.push_back(std::move(value)); return *this; } /** *

A list of up to 10 task IDs or full ARN entries.

*/ inline UpdateTaskProtectionRequest& AddTasks(const char* value) { m_tasksHasBeenSet = true; m_tasks.push_back(value); return *this; } /** *

Specify true to mark a task for protection and * false to unset protection, making it eligible for termination.

*/ inline bool GetProtectionEnabled() const{ return m_protectionEnabled; } /** *

Specify true to mark a task for protection and * false to unset protection, making it eligible for termination.

*/ inline bool ProtectionEnabledHasBeenSet() const { return m_protectionEnabledHasBeenSet; } /** *

Specify true to mark a task for protection and * false to unset protection, making it eligible for termination.

*/ inline void SetProtectionEnabled(bool value) { m_protectionEnabledHasBeenSet = true; m_protectionEnabled = value; } /** *

Specify true to mark a task for protection and * false to unset protection, making it eligible for termination.

*/ inline UpdateTaskProtectionRequest& WithProtectionEnabled(bool value) { SetProtectionEnabled(value); return *this;} /** *

If you set protectionEnabled to true, you can * specify the duration for task protection in minutes. You can specify a value * from 1 minute to up to 2,880 minutes (48 hours). During this time, your task * will not be terminated by scale-in events from Service Auto Scaling or * deployments. After this time period lapses, protectionEnabled will * be reset to false.

If you don’t specify the time, then the * task is automatically protected for 120 minutes (2 hours).

*/ inline int GetExpiresInMinutes() const{ return m_expiresInMinutes; } /** *

If you set protectionEnabled to true, you can * specify the duration for task protection in minutes. You can specify a value * from 1 minute to up to 2,880 minutes (48 hours). During this time, your task * will not be terminated by scale-in events from Service Auto Scaling or * deployments. After this time period lapses, protectionEnabled will * be reset to false.

If you don’t specify the time, then the * task is automatically protected for 120 minutes (2 hours).

*/ inline bool ExpiresInMinutesHasBeenSet() const { return m_expiresInMinutesHasBeenSet; } /** *

If you set protectionEnabled to true, you can * specify the duration for task protection in minutes. You can specify a value * from 1 minute to up to 2,880 minutes (48 hours). During this time, your task * will not be terminated by scale-in events from Service Auto Scaling or * deployments. After this time period lapses, protectionEnabled will * be reset to false.

If you don’t specify the time, then the * task is automatically protected for 120 minutes (2 hours).

*/ inline void SetExpiresInMinutes(int value) { m_expiresInMinutesHasBeenSet = true; m_expiresInMinutes = value; } /** *

If you set protectionEnabled to true, you can * specify the duration for task protection in minutes. You can specify a value * from 1 minute to up to 2,880 minutes (48 hours). During this time, your task * will not be terminated by scale-in events from Service Auto Scaling or * deployments. After this time period lapses, protectionEnabled will * be reset to false.

If you don’t specify the time, then the * task is automatically protected for 120 minutes (2 hours).

*/ inline UpdateTaskProtectionRequest& WithExpiresInMinutes(int value) { SetExpiresInMinutes(value); return *this;} private: Aws::String m_cluster; bool m_clusterHasBeenSet = false; Aws::Vector m_tasks; bool m_tasksHasBeenSet = false; bool m_protectionEnabled; bool m_protectionEnabledHasBeenSet = false; int m_expiresInMinutes; bool m_expiresInMinutesHasBeenSet = false; }; } // namespace Model } // namespace ECS } // namespace Aws