amazonka-ec2-1.6.1: Amazon Elastic Compute Cloud SDK.

Copyright(c) 2013-2018 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.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 Source #

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

Contains the parameters for TerminateInstances.

See: terminateInstances smart constructor.

Instances
Eq TerminateInstances Source # 
Instance details

Defined in Network.AWS.EC2.TerminateInstances

Data TerminateInstances Source # 
Instance details

Defined in Network.AWS.EC2.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 Source # 
Instance details

Defined in Network.AWS.EC2.TerminateInstances

Show TerminateInstances Source # 
Instance details

Defined in Network.AWS.EC2.TerminateInstances

Generic TerminateInstances Source # 
Instance details

Defined in Network.AWS.EC2.TerminateInstances

Associated Types

type Rep TerminateInstances :: Type -> Type #

Hashable TerminateInstances Source # 
Instance details

Defined in Network.AWS.EC2.TerminateInstances

AWSRequest TerminateInstances Source # 
Instance details

Defined in Network.AWS.EC2.TerminateInstances

Associated Types

type Rs TerminateInstances :: Type #

ToHeaders TerminateInstances Source # 
Instance details

Defined in Network.AWS.EC2.TerminateInstances

ToPath TerminateInstances Source # 
Instance details

Defined in Network.AWS.EC2.TerminateInstances

ToQuery TerminateInstances Source # 
Instance details

Defined in Network.AWS.EC2.TerminateInstances

NFData TerminateInstances Source # 
Instance details

Defined in Network.AWS.EC2.TerminateInstances

Methods

rnf :: TerminateInstances -> () #

type Rep TerminateInstances Source # 
Instance details

Defined in Network.AWS.EC2.TerminateInstances

type Rep TerminateInstances = D1 (MetaData "TerminateInstances" "Network.AWS.EC2.TerminateInstances" "amazonka-ec2-1.6.1-GgG1M0FWcBrE5I5IM2QktE" False) (C1 (MetaCons "TerminateInstances'" PrefixI True) (S1 (MetaSel (Just "_tiDryRun") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 (MetaSel (Just "_tiInstanceIds") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [Text])))
type Rs TerminateInstances Source # 
Instance details

Defined in Network.AWS.EC2.TerminateInstances

Request Lenses

tiDryRun :: Lens' TerminateInstances (Maybe Bool) Source #

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

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

Destructuring the Response

terminateInstancesResponse Source #

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

Contains the output of TerminateInstances.

See: terminateInstancesResponse smart constructor.

Instances
Eq TerminateInstancesResponse Source # 
Instance details

Defined in Network.AWS.EC2.TerminateInstances

Data TerminateInstancesResponse Source # 
Instance details

Defined in Network.AWS.EC2.TerminateInstances

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

Defined in Network.AWS.EC2.TerminateInstances

Show TerminateInstancesResponse Source # 
Instance details

Defined in Network.AWS.EC2.TerminateInstances

Generic TerminateInstancesResponse Source # 
Instance details

Defined in Network.AWS.EC2.TerminateInstances

Associated Types

type Rep TerminateInstancesResponse :: Type -> Type #

NFData TerminateInstancesResponse Source # 
Instance details

Defined in Network.AWS.EC2.TerminateInstances

type Rep TerminateInstancesResponse Source # 
Instance details

Defined in Network.AWS.EC2.TerminateInstances

type Rep TerminateInstancesResponse = D1 (MetaData "TerminateInstancesResponse" "Network.AWS.EC2.TerminateInstances" "amazonka-ec2-1.6.1-GgG1M0FWcBrE5I5IM2QktE" False) (C1 (MetaCons "TerminateInstancesResponse'" PrefixI True) (S1 (MetaSel (Just "_tirsTerminatingInstances") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [InstanceStateChange])) :*: S1 (MetaSel (Just "_tirsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))

Response Lenses

tirsTerminatingInstances :: Lens' TerminateInstancesResponse [InstanceStateChange] Source #

Information about one or more terminated instances.