aws_sdk_ecs/client/get_task_protection.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`GetTaskProtection`](crate::operation::get_task_protection::builders::GetTaskProtectionFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`cluster(impl Into<String>)`](crate::operation::get_task_protection::builders::GetTaskProtectionFluentBuilder::cluster) / [`set_cluster(Option<String>)`](crate::operation::get_task_protection::builders::GetTaskProtectionFluentBuilder::set_cluster):<br>required: **true**<br><p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the service that the task sets exist in.</p><br>
7 /// - [`tasks(impl Into<String>)`](crate::operation::get_task_protection::builders::GetTaskProtectionFluentBuilder::tasks) / [`set_tasks(Option<Vec::<String>>)`](crate::operation::get_task_protection::builders::GetTaskProtectionFluentBuilder::set_tasks):<br>required: **false**<br><p>A list of up to 100 task IDs or full ARN entries.</p><br>
8 /// - On success, responds with [`GetTaskProtectionOutput`](crate::operation::get_task_protection::GetTaskProtectionOutput) with field(s):
9 /// - [`protected_tasks(Option<Vec::<ProtectedTask>>)`](crate::operation::get_task_protection::GetTaskProtectionOutput::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>
10 /// - [`failures(Option<Vec::<Failure>>)`](crate::operation::get_task_protection::GetTaskProtectionOutput::failures): <p>Any failures associated with the call.</p>
11 /// - On failure, responds with [`SdkError<GetTaskProtectionError>`](crate::operation::get_task_protection::GetTaskProtectionError)
12 pub fn get_task_protection(&self) -> crate::operation::get_task_protection::builders::GetTaskProtectionFluentBuilder {
13 crate::operation::get_task_protection::builders::GetTaskProtectionFluentBuilder::new(self.handle.clone())
14 }
15}