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

Contents

Description

Creates an Amazon EBS-backed AMI from an Amazon EBS-backed instance that is either running or stopped.

If you customized your instance with instance store volumes or EBS volumes in addition to the root device volume, the new AMI contains block device mapping information for those volumes. When you launch an instance from this new AMI, the instance automatically launches with those additional volumes.

For more information, see Creating Amazon EBS-Backed Linux AMIs in the Amazon Elastic Compute Cloud User Guide .

Synopsis

Creating a Request

createImage #

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

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

  • ciiNoReboot - By default, Amazon EC2 attempts to shut down and reboot the instance before creating the image. If the 'No Reboot' option is set, Amazon EC2 doesn't shut down the instance before creating the image. When this option is used, file system integrity on the created image can't be guaranteed.
  • ciiDescription - A description for the new image.
  • ciiBlockDeviceMappings - Information about one or more block device mappings.
  • ciiDryRun - 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 .
  • ciiInstanceId - The ID of the instance.
  • ciiName - A name for the new image. Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)

data CreateImage #

Contains the parameters for CreateImage.

See: createImage smart constructor.

Instances

Eq CreateImage # 
Data CreateImage # 

Methods

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

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

toConstr :: CreateImage -> Constr #

dataTypeOf :: CreateImage -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CreateImage # 
Show CreateImage # 
Generic CreateImage # 

Associated Types

type Rep CreateImage :: * -> * #

Hashable CreateImage # 
NFData CreateImage # 

Methods

rnf :: CreateImage -> () #

AWSRequest CreateImage # 
ToQuery CreateImage # 
ToPath CreateImage # 
ToHeaders CreateImage # 

Methods

toHeaders :: CreateImage -> [Header] #

type Rep CreateImage # 
type Rs CreateImage # 

Request Lenses

ciiNoReboot :: Lens' CreateImage (Maybe Bool) #

By default, Amazon EC2 attempts to shut down and reboot the instance before creating the image. If the 'No Reboot' option is set, Amazon EC2 doesn't shut down the instance before creating the image. When this option is used, file system integrity on the created image can't be guaranteed.

ciiDescription :: Lens' CreateImage (Maybe Text) #

A description for the new image.

ciiBlockDeviceMappings :: Lens' CreateImage [BlockDeviceMapping] #

Information about one or more block device mappings.

ciiDryRun :: Lens' CreateImage (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 .

ciiInstanceId :: Lens' CreateImage Text #

The ID of the instance.

ciiName :: Lens' CreateImage Text #

A name for the new image. Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)

Destructuring the Response

createImageResponse #

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

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

data CreateImageResponse #

Contains the output of CreateImage.

See: createImageResponse smart constructor.

Instances

Eq CreateImageResponse # 
Data CreateImageResponse # 

Methods

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

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

toConstr :: CreateImageResponse -> Constr #

dataTypeOf :: CreateImageResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CreateImageResponse # 
Show CreateImageResponse # 
Generic CreateImageResponse # 
NFData CreateImageResponse # 

Methods

rnf :: CreateImageResponse -> () #

type Rep CreateImageResponse # 
type Rep CreateImageResponse = D1 (MetaData "CreateImageResponse" "Network.AWS.EC2.CreateImage" "amazonka-ec2-1.4.5-C4CR35JggG2GhWFrIiKGhu" False) (C1 (MetaCons "CreateImageResponse'" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_cirsImageId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))) (S1 (MetaSel (Just Symbol "_cirsResponseStatus") NoSourceUnpackedness SourceStrict DecidedUnpack) (Rec0 Int))))

Response Lenses

cirsImageId :: Lens' CreateImageResponse (Maybe Text) #

The ID of the new AMI.

cirsResponseStatus :: Lens' CreateImageResponse Int #

  • - | The response status code.