amazonka-ec2-1.4.5: Amazon Elastic Compute Cloud 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.EC2.TerminateInstances

Contents

Description

Shuts down one or more instances. This operation is idempotent; if you terminate an instance more than once, each call succeeds.

If you specify multiple instances and the request fails (for example, because of a single incorrect instance ID), none of the instances are terminated.

Terminated instances remain visible after termination (for approximately one hour).

By default, Amazon EC2 deletes all EBS volumes that were attached when the instance launched. Volumes attached after instance launch continue running.

You can stop, start, and terminate EBS-backed instances. You can only terminate instance store-backed instances. What happens to an instance differs if you stop it or terminate it. For example, when you stop an instance, the root device and any other devices attached to the instance persist. When you terminate an instance, any attached EBS volumes with the DeleteOnTermination block device mapping parameter set to true are automatically deleted. For more information about the differences between stopping and terminating instances, see Instance Lifecycle in the Amazon Elastic Compute Cloud User Guide .

For more information about troubleshooting, see Troubleshooting Terminating Your Instance in the Amazon Elastic Compute Cloud User Guide .

Synopsis

Creating a Request

terminateInstances :: TerminateInstances #

Creates a value of TerminateInstances with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

  • tiDryRun - Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .
  • tiInstanceIds - One or more instance IDs. Constraints: Up to 1000 instance IDs. We recommend breaking up this request into smaller batches.

data TerminateInstances #

Contains the parameters for TerminateInstances.

See: terminateInstances smart constructor.

Instances

Eq TerminateInstances # 
Data TerminateInstances # 

Methods

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

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

toConstr :: TerminateInstances -> Constr #

dataTypeOf :: TerminateInstances -> DataType #

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

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

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

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

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

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

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

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

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

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

Read TerminateInstances # 
Show TerminateInstances # 
Generic TerminateInstances # 
Hashable TerminateInstances # 
NFData TerminateInstances # 

Methods

rnf :: TerminateInstances -> () #

AWSRequest TerminateInstances # 
ToQuery TerminateInstances # 
ToPath TerminateInstances # 
ToHeaders TerminateInstances # 
type Rep TerminateInstances # 
type Rep TerminateInstances = D1 (MetaData "TerminateInstances" "Network.AWS.EC2.TerminateInstances" "amazonka-ec2-1.4.5-C4CR35JggG2GhWFrIiKGhu" False) (C1 (MetaCons "TerminateInstances'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_tiDryRun") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool))) (S1 (MetaSel (Just Symbol "_tiInstanceIds") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [Text]))))
type Rs TerminateInstances # 

Request Lenses

tiDryRun :: Lens' TerminateInstances (Maybe Bool) #

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation . Otherwise, it is UnauthorizedOperation .

tiInstanceIds :: Lens' TerminateInstances [Text] #

One or more instance IDs. Constraints: Up to 1000 instance IDs. We recommend breaking up this request into smaller batches.

Destructuring the Response

terminateInstancesResponse #

Creates a value of TerminateInstancesResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

data TerminateInstancesResponse #

Contains the output of TerminateInstances.

See: terminateInstancesResponse smart constructor.

Instances

Eq TerminateInstancesResponse # 
Data TerminateInstancesResponse # 

Methods

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

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

toConstr :: TerminateInstancesResponse -> Constr #

dataTypeOf :: TerminateInstancesResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read TerminateInstancesResponse # 
Show TerminateInstancesResponse # 
Generic TerminateInstancesResponse # 
NFData TerminateInstancesResponse # 
type Rep TerminateInstancesResponse # 
type Rep TerminateInstancesResponse = D1 (MetaData "TerminateInstancesResponse" "Network.AWS.EC2.TerminateInstances" "amazonka-ec2-1.4.5-C4CR35JggG2GhWFrIiKGhu" False) (C1 (MetaCons "TerminateInstancesResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_tirsTerminatingInstances") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [InstanceStateChange]))) (S1 (MetaSel (Just Symbol "_tirsResponseStatus") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int))))

Response Lenses

tirsTerminatingInstances :: Lens' TerminateInstancesResponse [InstanceStateChange] #

Information about one or more terminated instances.

tirsResponseStatus :: Lens' TerminateInstancesResponse Int #

  • - | The response status code.