amazonka-ecs-1.4.5: Amazon EC2 Container Service SDK.

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

Network.AWS.ECS.StopTask

Contents

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 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.

Synopsis

Creating a Request

stopTask #

Arguments

:: Text

stTask

-> StopTask 

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 will appear in subsequent DescribeTasks API operations on this task. Up to 255 characters are allowed in this message.
  • stTask - The task ID or full Amazon Resource Name (ARN) entry of the task to stop.

data StopTask #

See: stopTask smart constructor.

Instances

Eq StopTask # 
Data StopTask # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StopTask -> c StopTask #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c StopTask #

toConstr :: StopTask -> Constr #

dataTypeOf :: StopTask -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c StopTask) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StopTask) #

gmapT :: (forall b. Data b => b -> b) -> StopTask -> StopTask #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StopTask -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StopTask -> r #

gmapQ :: (forall d. Data d => d -> u) -> StopTask -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> StopTask -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> StopTask -> m StopTask #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StopTask -> m StopTask #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StopTask -> m StopTask #

Read StopTask # 
Show StopTask # 
Generic StopTask # 

Associated Types

type Rep StopTask :: * -> * #

Methods

from :: StopTask -> Rep StopTask x #

to :: Rep StopTask x -> StopTask #

Hashable StopTask # 

Methods

hashWithSalt :: Int -> StopTask -> Int #

hash :: StopTask -> Int #

ToJSON StopTask # 
NFData StopTask # 

Methods

rnf :: StopTask -> () #

AWSRequest StopTask # 
ToQuery StopTask # 
ToPath StopTask # 
ToHeaders StopTask # 

Methods

toHeaders :: StopTask -> [Header] #

type Rep StopTask # 
type Rep StopTask = D1 (MetaData "StopTask" "Network.AWS.ECS.StopTask" "amazonka-ecs-1.4.5-1D9d7zfufpXJ1qZUbuOrWH" False) (C1 (MetaCons "StopTask'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_stCluster") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) ((:*:) (S1 (MetaSel (Just Symbol "_stReason") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_stTask") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text)))))
type Rs StopTask # 

Request Lenses

stCluster :: Lens' StopTask (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.

stReason :: Lens' StopTask (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 will appear in subsequent DescribeTasks API operations on this task. Up to 255 characters are allowed in this message.

stTask :: Lens' StopTask Text #

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

Destructuring the Response

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:

data StopTaskResponse #

See: stopTaskResponse smart constructor.

Instances

Eq StopTaskResponse # 
Data StopTaskResponse # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> StopTaskResponse -> c StopTaskResponse #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c StopTaskResponse #

toConstr :: StopTaskResponse -> Constr #

dataTypeOf :: StopTaskResponse -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c StopTaskResponse) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c StopTaskResponse) #

gmapT :: (forall b. Data b => b -> b) -> StopTaskResponse -> StopTaskResponse #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> StopTaskResponse -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> StopTaskResponse -> r #

gmapQ :: (forall d. Data d => d -> u) -> StopTaskResponse -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> StopTaskResponse -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> StopTaskResponse -> m StopTaskResponse #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> StopTaskResponse -> m StopTaskResponse #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> StopTaskResponse -> m StopTaskResponse #

Read StopTaskResponse # 
Show StopTaskResponse # 
Generic StopTaskResponse # 
NFData StopTaskResponse # 

Methods

rnf :: StopTaskResponse -> () #

type Rep StopTaskResponse # 
type Rep StopTaskResponse = D1 (MetaData "StopTaskResponse" "Network.AWS.ECS.StopTask" "amazonka-ecs-1.4.5-1D9d7zfufpXJ1qZUbuOrWH" False) (C1 (MetaCons "StopTaskResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_srsTask") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Task))) (S1 (MetaSel (Just Symbol "_srsResponseStatus") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int))))

Response Lenses

srsTask :: Lens' StopTaskResponse (Maybe Task) #

The task that was stopped.

srsResponseStatus :: Lens' StopTaskResponse Int #

  • - | The response status code.