libZSservicesZSamazonka-ecsZSamazonka-ecs
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.ECS.StopTask

Description

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

Creating a Request

data StopTask Source #

See: newStopTask smart constructor.

Constructors

StopTask' 

Fields

  • cluster :: Maybe Text

    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.

  • reason :: Maybe Text

    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.

  • task :: Text

    The task ID or full Amazon Resource Name (ARN) of the task to stop.

Instances

Instances details
Eq StopTask Source # 
Instance details

Defined in Amazonka.ECS.StopTask

Read StopTask Source # 
Instance details

Defined in Amazonka.ECS.StopTask

Show StopTask Source # 
Instance details

Defined in Amazonka.ECS.StopTask

Generic StopTask Source # 
Instance details

Defined in Amazonka.ECS.StopTask

Associated Types

type Rep StopTask :: Type -> Type #

Methods

from :: StopTask -> Rep StopTask x #

to :: Rep StopTask x -> StopTask #

NFData StopTask Source # 
Instance details

Defined in Amazonka.ECS.StopTask

Methods

rnf :: StopTask -> () #

Hashable StopTask Source # 
Instance details

Defined in Amazonka.ECS.StopTask

Methods

hashWithSalt :: Int -> StopTask -> Int #

hash :: StopTask -> Int #

ToJSON StopTask Source # 
Instance details

Defined in Amazonka.ECS.StopTask

AWSRequest StopTask Source # 
Instance details

Defined in Amazonka.ECS.StopTask

Associated Types

type AWSResponse StopTask #

ToHeaders StopTask Source # 
Instance details

Defined in Amazonka.ECS.StopTask

Methods

toHeaders :: StopTask -> [Header] #

ToPath StopTask Source # 
Instance details

Defined in Amazonka.ECS.StopTask

ToQuery StopTask Source # 
Instance details

Defined in Amazonka.ECS.StopTask

type Rep StopTask Source # 
Instance details

Defined in Amazonka.ECS.StopTask

type Rep StopTask = D1 ('MetaData "StopTask" "Amazonka.ECS.StopTask" "libZSservicesZSamazonka-ecsZSamazonka-ecs" 'False) (C1 ('MetaCons "StopTask'" 'PrefixI 'True) (S1 ('MetaSel ('Just "cluster") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "reason") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "task") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))))
type AWSResponse StopTask Source # 
Instance details

Defined in Amazonka.ECS.StopTask

newStopTask Source #

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.

Constructors

StopTaskResponse' 

Fields

Instances

Instances details
Eq StopTaskResponse Source # 
Instance details

Defined in Amazonka.ECS.StopTask

Read StopTaskResponse Source # 
Instance details

Defined in Amazonka.ECS.StopTask

Show StopTaskResponse Source # 
Instance details

Defined in Amazonka.ECS.StopTask

Generic StopTaskResponse Source # 
Instance details

Defined in Amazonka.ECS.StopTask

Associated Types

type Rep StopTaskResponse :: Type -> Type #

NFData StopTaskResponse Source # 
Instance details

Defined in Amazonka.ECS.StopTask

Methods

rnf :: StopTaskResponse -> () #

type Rep StopTaskResponse Source # 
Instance details

Defined in Amazonka.ECS.StopTask

type Rep StopTaskResponse = D1 ('MetaData "StopTaskResponse" "Amazonka.ECS.StopTask" "libZSservicesZSamazonka-ecsZSamazonka-ecs" 'False) (C1 ('MetaCons "StopTaskResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "task") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Task)) :*: S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))

newStopTaskResponse Source #

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_httpStatus :: Lens' StopTaskResponse Int Source #

The response's http status code.