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

Contents

Description

Stops an Amazon EBS-backed instance.

We don't charge hourly usage for a stopped instance, or data transfer fees; however, your root partition Amazon EBS volume remains, continues to persist your data, and you are charged for Amazon EBS volume usage. Each time you transition an instance from stopped to started, Amazon EC2 charges a full instance hour, even if transitions happen multiple times within a single hour.

You can't start or stop Spot instances, and you can't stop instance store-backed instances.

When you stop an instance, we shut it down. You can restart your instance at any time. Before stopping an instance, make sure it is in a state from which it can be restarted. Stopping an instance does not preserve data stored in RAM.

Stopping an instance is different to rebooting or terminating 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, the root device and any other devices attached during the instance launch are automatically deleted. For more information about the differences between rebooting, stopping, and terminating instances, see Instance Lifecycle in the Amazon Elastic Compute Cloud User Guide .

When you stop an instance, we attempt to shut it down forcibly after a short while. If your instance appears stuck in the stopping state after a period of time, there may be an issue with the underlying host computer. For more information, see Troubleshooting Stopping Your Instance in the Amazon Elastic Compute Cloud User Guide .

Synopsis

Creating a Request

stopInstances :: StopInstances #

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

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

  • siForce - Forces the instances to stop. The instances do not have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances. Default: false
  • siDryRun - 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 .
  • siInstanceIds - One or more instance IDs.

data StopInstances #

Contains the parameters for StopInstances.

See: stopInstances smart constructor.

Instances

Eq StopInstances # 
Data StopInstances # 

Methods

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

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

toConstr :: StopInstances -> Constr #

dataTypeOf :: StopInstances -> DataType #

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

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

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

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

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

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

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

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

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

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

Read StopInstances # 
Show StopInstances # 
Generic StopInstances # 

Associated Types

type Rep StopInstances :: * -> * #

Hashable StopInstances # 
NFData StopInstances # 

Methods

rnf :: StopInstances -> () #

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

Request Lenses

siForce :: Lens' StopInstances (Maybe Bool) #

Forces the instances to stop. The instances do not have an opportunity to flush file system caches or file system metadata. If you use this option, you must perform file system check and repair procedures. This option is not recommended for Windows instances. Default: false

siDryRun :: Lens' StopInstances (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 .

siInstanceIds :: Lens' StopInstances [Text] #

One or more instance IDs.

Destructuring the Response

stopInstancesResponse #

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

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

data StopInstancesResponse #

Contains the output of StopInstances.

See: stopInstancesResponse smart constructor.

Instances

Eq StopInstancesResponse # 
Data StopInstancesResponse # 

Methods

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

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

toConstr :: StopInstancesResponse -> Constr #

dataTypeOf :: StopInstancesResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read StopInstancesResponse # 
Show StopInstancesResponse # 
Generic StopInstancesResponse # 
NFData StopInstancesResponse # 

Methods

rnf :: StopInstancesResponse -> () #

type Rep StopInstancesResponse # 
type Rep StopInstancesResponse = D1 (MetaData "StopInstancesResponse" "Network.AWS.EC2.StopInstances" "amazonka-ec2-1.4.5-C4CR35JggG2GhWFrIiKGhu" False) (C1 (MetaCons "StopInstancesResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_sirsStoppingInstances") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [InstanceStateChange]))) (S1 (MetaSel (Just Symbol "_sirsResponseStatus") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int))))

Response Lenses

sirsStoppingInstances :: Lens' StopInstancesResponse [InstanceStateChange] #

Information about one or more stopped instances.

sirsResponseStatus :: Lens' StopInstancesResponse Int #

  • - | The response status code.