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

Contents

Description

Stops an Amazon EBS-backed instance.

We don't charge usage for a stopped instance, or data transfer fees; however, your root partition Amazon EBS volume remains and continues to persist your data, and you are charged for Amazon EBS volume usage. Every time you start your Windows instance, Amazon EC2 charges you for a full instance hour. If you stop and restart your Windows instance, a new instance hour begins and Amazon EC2 charges you for another full instance hour even if you are still within the same 60-minute period when it was stopped. Every time you start your Linux instance, Amazon EC2 charges a one-minute minimum for instance usage, and thereafter charges per second for instance usage.

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

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

Contains the parameters for StopInstances.

See: stopInstances smart constructor.

Instances

Eq StopInstances Source # 
Data StopInstances Source # 

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

Associated Types

type Rep StopInstances :: * -> * #

Hashable StopInstances Source # 
NFData StopInstances Source # 

Methods

rnf :: StopInstances -> () #

AWSRequest StopInstances Source # 
ToQuery StopInstances Source # 
ToPath StopInstances Source # 
ToHeaders StopInstances Source # 
type Rep StopInstances Source # 
type Rep StopInstances = D1 (MetaData "StopInstances" "Network.AWS.EC2.StopInstances" "amazonka-ec2-1.5.0-8IdXK3SzsETDMW2aFpANS9" 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 Source # 

Request Lenses

siForce :: Lens' StopInstances (Maybe Bool) Source #

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

siInstanceIds :: Lens' StopInstances [Text] Source #

One or more instance IDs.

Destructuring the Response

stopInstancesResponse Source #

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

Contains the output of StopInstances.

See: stopInstancesResponse smart constructor.

Instances

Eq StopInstancesResponse Source # 
Data StopInstancesResponse Source # 

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

Methods

rnf :: StopInstancesResponse -> () #

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

Response Lenses

sirsStoppingInstances :: Lens' StopInstancesResponse [InstanceStateChange] Source #

Information about one or more stopped instances.

sirsResponseStatus :: Lens' StopInstancesResponse Int Source #

  • - | The response status code.