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

Copyright(c) 2013-2017 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@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 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.

Synopsis

Creating a Request

stopTask Source #

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 Source #

See: stopTask smart constructor.

Instances

Eq StopTask Source # 
Data StopTask Source # 

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 Source # 
Show StopTask Source # 
Generic StopTask Source # 

Associated Types

type Rep StopTask :: * -> * #

Methods

from :: StopTask -> Rep StopTask x #

to :: Rep StopTask x -> StopTask #

Hashable StopTask Source # 

Methods

hashWithSalt :: Int -> StopTask -> Int #

hash :: StopTask -> Int #

ToJSON StopTask Source # 
NFData StopTask Source # 

Methods

rnf :: StopTask -> () #

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

Methods

toHeaders :: StopTask -> [Header] #

type Rep StopTask Source # 
type Rep StopTask = D1 (MetaData "StopTask" "Network.AWS.ECS.StopTask" "amazonka-ecs-1.5.0-EwatFke974vDkurbaNzIje" 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 Source # 

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

stTask :: Lens' StopTask Text Source #

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

Destructuring the Response

stopTaskResponse Source #

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 Source #

See: stopTaskResponse smart constructor.

Instances

Eq StopTaskResponse Source # 
Data StopTaskResponse Source # 

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 Source # 
Show StopTaskResponse Source # 
Generic StopTaskResponse Source # 
NFData StopTaskResponse Source # 

Methods

rnf :: StopTaskResponse -> () #

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

Response Lenses

srsTask :: Lens' StopTaskResponse (Maybe Task) Source #

The task that was stopped.

srsResponseStatus :: Lens' StopTaskResponse Int Source #

  • - | The response status code.