Copyright | (c) 2013-2015 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
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.
See: AWS API Reference for CreateImage.
- createImage :: Text -> Text -> CreateImage
- data CreateImage
- ciiNoReboot :: Lens' CreateImage (Maybe Bool)
- ciiBlockDeviceMappings :: Lens' CreateImage [BlockDeviceMapping]
- ciiDryRun :: Lens' CreateImage (Maybe Bool)
- ciiDescription :: Lens' CreateImage (Maybe Text)
- ciiInstanceId :: Lens' CreateImage Text
- ciiName :: Lens' CreateImage Text
- createImageResponse :: Int -> CreateImageResponse
- data CreateImageResponse
- cirsImageId :: Lens' CreateImageResponse (Maybe Text)
- cirsStatus :: Lens' CreateImageResponse Int
Creating a Request
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:
data CreateImage Source
See: createImage
smart constructor.
Request Lenses
ciiNoReboot :: Lens' CreateImage (Maybe Bool) Source
By default, this parameter is set to false
, which means Amazon EC2
attempts to shut down the instance cleanly before image creation and
then reboots the instance. When the parameter is set to true
, 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.
ciiBlockDeviceMappings :: Lens' CreateImage [BlockDeviceMapping] Source
Information about one or more block device mappings.
ciiDryRun :: Lens' CreateImage (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
.
ciiDescription :: Lens' CreateImage (Maybe Text) Source
A description for the new image.
ciiInstanceId :: Lens' CreateImage Text Source
The ID of the instance.
ciiName :: Lens' CreateImage Text Source
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
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 Source
See: createImageResponse
smart constructor.
Response Lenses
cirsImageId :: Lens' CreateImageResponse (Maybe Text) Source
The ID of the new AMI.
cirsStatus :: Lens' CreateImageResponse Int Source
The response status code.