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 |
Registers an AMI. When you're creating an AMI, this is the final step you must complete before you can launch an instance from the AMI. For more information about creating AMIs, see Creating Your Own AMIs in the Amazon Elastic Compute Cloud User Guide.
For Amazon EBS-backed instances, CreateImage creates and registers the AMI in a single request, so you don't have to register the AMI yourself.
You can also use RegisterImage
to create an Amazon EBS-backed Linux
AMI from a snapshot of a root device volume. For more information, see
Launching an Instance from a Snapshot
in the Amazon Elastic Compute Cloud User Guide.
Some Linux distributions, such as Red Hat Enterprise Linux (RHEL) and
SUSE Linux Enterprise Server (SLES), use the EC2 billingProduct
code
associated with an AMI to verify subscription status for package
updates. Creating an AMI from an EBS snapshot does not maintain this
billing code, and subsequent instances launched from such an AMI will
not be able to connect to package update infrastructure.
Similarly, although you can create a Windows AMI from a snapshot, you can't successfully launch an instance from the AMI.
To create Windows AMIs or to create AMIs for Linux operating systems that must retain AMI billing codes to work properly, see CreateImage.
If needed, you can deregister an AMI at any time. Any modifications you make to an AMI backed by an instance store volume invalidates its registration. If you make changes to an image, deregister the previous image and register the new image.
You can't register an image where a secondary (non-root) snapshot has AWS Marketplace product codes.
See: AWS API Reference for RegisterImage.
- registerImage :: Text -> RegisterImage
- data RegisterImage
- riVirtualizationType :: Lens' RegisterImage (Maybe Text)
- riImageLocation :: Lens' RegisterImage (Maybe Text)
- riRAMDiskId :: Lens' RegisterImage (Maybe Text)
- riKernelId :: Lens' RegisterImage (Maybe Text)
- riRootDeviceName :: Lens' RegisterImage (Maybe Text)
- riSRIOVNetSupport :: Lens' RegisterImage (Maybe Text)
- riArchitecture :: Lens' RegisterImage (Maybe ArchitectureValues)
- riDescription :: Lens' RegisterImage (Maybe Text)
- riBlockDeviceMappings :: Lens' RegisterImage [BlockDeviceMapping]
- riDryRun :: Lens' RegisterImage (Maybe Bool)
- riName :: Lens' RegisterImage Text
- registerImageResponse :: Int -> RegisterImageResponse
- data RegisterImageResponse
- rirsImageId :: Lens' RegisterImageResponse (Maybe Text)
- rirsResponseStatus :: Lens' RegisterImageResponse Int
Creating a Request
:: Text | |
-> RegisterImage |
Creates a value of RegisterImage
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data RegisterImage Source
See: registerImage
smart constructor.
Request Lenses
riVirtualizationType :: Lens' RegisterImage (Maybe Text) Source
The type of virtualization.
Default: paravirtual
riImageLocation :: Lens' RegisterImage (Maybe Text) Source
The full path to your AMI manifest in Amazon S3 storage.
riRAMDiskId :: Lens' RegisterImage (Maybe Text) Source
The ID of the RAM disk.
riKernelId :: Lens' RegisterImage (Maybe Text) Source
The ID of the kernel.
riRootDeviceName :: Lens' RegisterImage (Maybe Text) Source
The name of the root device (for example, '\/dev\/sda1', or '\/dev\/xvda').
riSRIOVNetSupport :: Lens' RegisterImage (Maybe Text) Source
Set to simple
to enable enhanced networking for the AMI and any
instances that you launch from the AMI.
There is no way to disable enhanced networking at this time.
This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.
riArchitecture :: Lens' RegisterImage (Maybe ArchitectureValues) Source
The architecture of the AMI.
Default: For Amazon EBS-backed AMIs, i386
. For instance store-backed
AMIs, the architecture specified in the manifest file.
riDescription :: Lens' RegisterImage (Maybe Text) Source
A description for your AMI.
riBlockDeviceMappings :: Lens' RegisterImage [BlockDeviceMapping] Source
One or more block device mapping entries.
riDryRun :: Lens' RegisterImage (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
.
riName :: Lens' RegisterImage Text Source
A name for your AMI.
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 RegisterImageResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data RegisterImageResponse Source
See: registerImageResponse
smart constructor.
Response Lenses
rirsImageId :: Lens' RegisterImageResponse (Maybe Text) Source
The ID of the newly registered AMI.
rirsResponseStatus :: Lens' RegisterImageResponse Int Source
The response status code.