Copyright | (c) 2013-2021 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 |
Stops a running task. Any tags associated with the task will be deleted.
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
value and a default 30-second timeout, after which the
SIGKILL
value is sent and the containers are forcibly stopped. If the
container handles the SIGTERM
value gracefully and exits within 30
seconds from receiving it, no SIGKILL
value is sent.
The default 30-second timeout can be configured on the Amazon ECS
container agent with the ECS_CONTAINER_STOP_TIMEOUT
variable. For more
information, see
Amazon ECS Container Agent Configuration
in the Amazon Elastic Container Service Developer Guide.
Synopsis
- data StopTask = StopTask' {}
- newStopTask :: Text -> StopTask
- stopTask_cluster :: Lens' StopTask (Maybe Text)
- stopTask_reason :: Lens' StopTask (Maybe Text)
- stopTask_task :: Lens' StopTask Text
- data StopTaskResponse = StopTaskResponse' {
- task :: Maybe Task
- httpStatus :: Int
- newStopTaskResponse :: Int -> StopTaskResponse
- stopTaskResponse_task :: Lens' StopTaskResponse (Maybe Task)
- stopTaskResponse_httpStatus :: Lens' StopTaskResponse Int
Creating a Request
See: newStopTask
smart constructor.
StopTask' | |
|
Instances
Create a value of StopTask
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:cluster:StopTask'
, stopTask_cluster
- 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.
$sel:reason:StopTask'
, stopTask_reason
- 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.
$sel:task:StopTask'
, stopTask_task
- The task ID or full Amazon Resource Name (ARN) of the task to stop.
Request Lenses
stopTask_cluster :: 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.
stopTask_reason :: 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.
stopTask_task :: Lens' StopTask Text Source #
The task ID or full Amazon Resource Name (ARN) of the task to stop.
Destructuring the Response
data StopTaskResponse Source #
See: newStopTaskResponse
smart constructor.
StopTaskResponse' | |
|
Instances
Create a value of StopTaskResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:task:StopTask'
, stopTaskResponse_task
- The task that was stopped.
$sel:httpStatus:StopTaskResponse'
, stopTaskResponse_httpStatus
- The response's http status code.
Response Lenses
stopTaskResponse_task :: Lens' StopTaskResponse (Maybe Task) Source #
The task that was stopped.
stopTaskResponse_httpStatus :: Lens' StopTaskResponse Int Source #
The response's http status code.