| Copyright | (c) 2013-2018 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | None |
| Language | Haskell2010 |
Network.AWS.ECS.StopTask
Description
Stops a running task.
When StopTask is called on a task, the equivalent of docker stop is issued to the containers running in the task. This results in a SIGTERM and a default 30-second timeout, after which SIGKILL is sent and the containers are forcibly stopped. If the container handles the SIGTERM gracefully and exits within 30 seconds from receiving it, no SIGKILL is sent.
- stopTask :: Text -> StopTask
- data StopTask
- stCluster :: Lens' StopTask (Maybe Text)
- stReason :: Lens' StopTask (Maybe Text)
- stTask :: Lens' StopTask Text
- stopTaskResponse :: Int -> StopTaskResponse
- data StopTaskResponse
- srsTask :: Lens' StopTaskResponse (Maybe Task)
- srsResponseStatus :: Lens' StopTaskResponse Int
Creating a Request
Creates a value of StopTask with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
stCluster- 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.stReason- An optional message specified when a task is stopped. For example, if you are using a custom scheduler, you can use this parameter to specify the reason for stopping the task here, and the message appears in subsequentDescribeTasksAPI operations on this task. Up to 255 characters are allowed in this message.stTask- The task ID or full ARN entry of the task to stop.
See: stopTask smart constructor.
Instances
Request Lenses
stCluster :: Lens' StopTask (Maybe Text) Source #
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.
stReason :: Lens' StopTask (Maybe Text) Source #
An optional message specified when a task is stopped. For example, if you are using a custom scheduler, you can use this parameter to specify the reason for stopping the task here, and the message appears in subsequent DescribeTasks API operations on this task. Up to 255 characters are allowed in this message.
Destructuring the Response
Arguments
| :: Int | |
| -> StopTaskResponse |
Creates a value of StopTaskResponse with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
srsTask- The task that was stopped.srsResponseStatus- -- | The response status code.
data StopTaskResponse Source #
See: stopTaskResponse smart constructor.
Response Lenses
srsResponseStatus :: Lens' StopTaskResponse Int Source #
- - | The response status code.