aws_sdk_ecs/client/stop_task.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 [`StopTask`](crate::operation::stop_task::builders::StopTaskFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`cluster(impl Into<String>)`](crate::operation::stop_task::builders::StopTaskFluentBuilder::cluster) / [`set_cluster(Option<String>)`](crate::operation::stop_task::builders::StopTaskFluentBuilder::set_cluster):<br>required: **false**<br><p>The short name or full Amazon Resource Name (ARN) of the cluster that hosts the task to stop. If you do not specify a cluster, the default cluster is assumed.</p><br>
7 /// - [`task(impl Into<String>)`](crate::operation::stop_task::builders::StopTaskFluentBuilder::task) / [`set_task(Option<String>)`](crate::operation::stop_task::builders::StopTaskFluentBuilder::set_task):<br>required: **true**<br><p>Thefull Amazon Resource Name (ARN) of the task.</p><br>
8 /// - [`reason(impl Into<String>)`](crate::operation::stop_task::builders::StopTaskFluentBuilder::reason) / [`set_reason(Option<String>)`](crate::operation::stop_task::builders::StopTaskFluentBuilder::set_reason):<br>required: **false**<br><p>An optional message specified when a task is stopped. For example, if you're using a custom scheduler, you can use this parameter to specify the reason for stopping the task here, and the message appears in subsequent <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_DescribeTasks.html">DescribeTasks</a>> API operations on this task.</p><br>
9 /// - On success, responds with [`StopTaskOutput`](crate::operation::stop_task::StopTaskOutput) with field(s):
10 /// - [`task(Option<Task>)`](crate::operation::stop_task::StopTaskOutput::task): <p>The task that was stopped.</p>
11 /// - On failure, responds with [`SdkError<StopTaskError>`](crate::operation::stop_task::StopTaskError)
12 pub fn stop_task(&self) -> crate::operation::stop_task::builders::StopTaskFluentBuilder {
13 crate::operation::stop_task::builders::StopTaskFluentBuilder::new(self.handle.clone())
14 }
15}