1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
impl super::Client {
    /// Constructs a fluent builder for the [`UpdateTaskProtection`](crate::operation::update_task_protection::builders::UpdateTaskProtectionFluentBuilder) operation.
    ///
    /// - The fluent builder is configurable:
    ///   - [`cluster(impl ::std::convert::Into<String>)`](crate::operation::update_task_protection::builders::UpdateTaskProtectionFluentBuilder::cluster) / [`set_cluster(Option<String>)`](crate::operation::update_task_protection::builders::UpdateTaskProtectionFluentBuilder::set_cluster): <p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task sets exist in.</p>
    ///   - [`tasks(Vec<String>)`](crate::operation::update_task_protection::builders::UpdateTaskProtectionFluentBuilder::tasks) / [`set_tasks(Option<Vec<String>>)`](crate::operation::update_task_protection::builders::UpdateTaskProtectionFluentBuilder::set_tasks): <p>A list of up to 10 task IDs or full ARN entries.</p>
    ///   - [`protection_enabled(bool)`](crate::operation::update_task_protection::builders::UpdateTaskProtectionFluentBuilder::protection_enabled) / [`set_protection_enabled(Option<bool>)`](crate::operation::update_task_protection::builders::UpdateTaskProtectionFluentBuilder::set_protection_enabled): <p>Specify <code>true</code> to mark a task for protection and <code>false</code> to unset protection, making it eligible for termination.</p>
    ///   - [`expires_in_minutes(i32)`](crate::operation::update_task_protection::builders::UpdateTaskProtectionFluentBuilder::expires_in_minutes) / [`set_expires_in_minutes(Option<i32>)`](crate::operation::update_task_protection::builders::UpdateTaskProtectionFluentBuilder::set_expires_in_minutes): <p>If you set <code>protectionEnabled</code> to <code>true</code>, 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, <code>protectionEnabled</code> will be reset to <code>false</code>.</p>  <p>If you don’t specify the time, then the task is automatically protected for 120 minutes (2 hours).</p>
    /// - On success, responds with [`UpdateTaskProtectionOutput`](crate::operation::update_task_protection::UpdateTaskProtectionOutput) with field(s):
    ///   - [`protected_tasks(Option<Vec<ProtectedTask>>)`](crate::operation::update_task_protection::UpdateTaskProtectionOutput::protected_tasks): <p>A list of tasks with the following information.</p>  <ul>   <li> <p> <code>taskArn</code>: The task ARN.</p> </li>   <li> <p> <code>protectionEnabled</code>: The protection status of the task. If scale-in protection is turned on for a task, the value is <code>true</code>. Otherwise, it is <code>false</code>.</p> </li>   <li> <p> <code>expirationDate</code>: The epoch time when protection for the task will expire.</p> </li>  </ul>
    ///   - [`failures(Option<Vec<Failure>>)`](crate::operation::update_task_protection::UpdateTaskProtectionOutput::failures): <p>Any failures associated with the call.</p>
    /// - On failure, responds with [`SdkError<UpdateTaskProtectionError>`](crate::operation::update_task_protection::UpdateTaskProtectionError)
    pub fn update_task_protection(&self) -> crate::operation::update_task_protection::builders::UpdateTaskProtectionFluentBuilder {
        crate::operation::update_task_protection::builders::UpdateTaskProtectionFluentBuilder::new(self.handle.clone())
    }
}