amazonka-ec2-1.6.1: Amazon Elastic Compute Cloud SDK.

Copyright(c) 2013-2018 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.RegisterImage

Contents

Description

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 .

You can also use RegisterImage to create an Amazon EBS-backed Linux AMI from a snapshot of a root device volume. You specify the snapshot using the block device mapping. For more information, see Launching a Linux Instance from a Backup in the Amazon Elastic Compute Cloud User Guide .

You can't register an image where a secondary (non-root) snapshot has AWS Marketplace product codes.

Some Linux distributions, such as Red Hat Enterprise Linux (RHEL) and SUSE Linux Enterprise Server (SLES), use the EC2 billing product code associated with an AMI to verify the 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. To create an AMI that must retain billing codes, 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.

Synopsis

Creating a Request

registerImage #

Arguments

:: Text

riName

-> 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:

  • riVirtualizationType - The type of virtualization (hvm | paravirtual ). Default: paravirtual
  • riImageLocation - The full path to your AMI manifest in Amazon S3 storage.
  • riEnaSupport - Set to true to enable enhanced networking with ENA for the AMI and any instances that you launch from the AMI. This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.
  • riBillingProducts - The billing product codes. Your account must be authorized to specify billing product codes. Otherwise, you can use the AWS Marketplace to bill for the use of an AMI.
  • riRAMDiskId - The ID of the RAM disk.
  • riKernelId - The ID of the kernel.
  • riRootDeviceName - The device name of the root device volume (for example, devsda1 ).
  • riSRIOVNetSupport - Set to simple to enable enhanced networking with the Intel 82599 Virtual Function interface for the AMI and any instances that you launch from the AMI. There is no way to disable sriovNetSupport 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 - 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 - A description for your AMI.
  • riBlockDeviceMappings - One or more block device mapping entries.
  • riDryRun - 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 - A name for your AMI. Constraints: 3-128 alphanumeric characters, parentheses (()), square brackets ([]), spaces ( ), periods (.), slashes (/), dashes (-), single quotes ('), at-signs (@), or underscores(_)

data RegisterImage #

Contains the parameters for RegisterImage.

See: registerImage smart constructor.

Instances
Eq RegisterImage # 
Instance details

Defined in Network.AWS.EC2.RegisterImage

Data RegisterImage # 
Instance details

Defined in Network.AWS.EC2.RegisterImage

Methods

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

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

toConstr :: RegisterImage -> Constr #

dataTypeOf :: RegisterImage -> DataType #

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

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

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

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

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

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

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

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

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

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

Read RegisterImage # 
Instance details

Defined in Network.AWS.EC2.RegisterImage

Show RegisterImage # 
Instance details

Defined in Network.AWS.EC2.RegisterImage

Generic RegisterImage # 
Instance details

Defined in Network.AWS.EC2.RegisterImage

Associated Types

type Rep RegisterImage :: Type -> Type #

Hashable RegisterImage # 
Instance details

Defined in Network.AWS.EC2.RegisterImage

AWSRequest RegisterImage # 
Instance details

Defined in Network.AWS.EC2.RegisterImage

Associated Types

type Rs RegisterImage :: Type #

ToHeaders RegisterImage # 
Instance details

Defined in Network.AWS.EC2.RegisterImage

ToPath RegisterImage # 
Instance details

Defined in Network.AWS.EC2.RegisterImage

ToQuery RegisterImage # 
Instance details

Defined in Network.AWS.EC2.RegisterImage

NFData RegisterImage # 
Instance details

Defined in Network.AWS.EC2.RegisterImage

Methods

rnf :: RegisterImage -> () #

type Rep RegisterImage # 
Instance details

Defined in Network.AWS.EC2.RegisterImage

type Rep RegisterImage = D1 (MetaData "RegisterImage" "Network.AWS.EC2.RegisterImage" "amazonka-ec2-1.6.1-H98Zd65xIYr2z4e5UhW9ck" False) (C1 (MetaCons "RegisterImage'" PrefixI True) (((S1 (MetaSel (Just "_riVirtualizationType") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_riImageLocation") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_riEnaSupport") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool)))) :*: (S1 (MetaSel (Just "_riBillingProducts") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [Text])) :*: (S1 (MetaSel (Just "_riRAMDiskId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_riKernelId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text))))) :*: ((S1 (MetaSel (Just "_riRootDeviceName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 (MetaSel (Just "_riSRIOVNetSupport") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_riArchitecture") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe ArchitectureValues)))) :*: ((S1 (MetaSel (Just "_riDescription") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_riBlockDeviceMappings") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe [BlockDeviceMapping]))) :*: (S1 (MetaSel (Just "_riDryRun") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 (MetaSel (Just "_riName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))))))
type Rs RegisterImage # 
Instance details

Defined in Network.AWS.EC2.RegisterImage

Request Lenses

riVirtualizationType :: Lens' RegisterImage (Maybe Text) #

The type of virtualization (hvm | paravirtual ). Default: paravirtual

riImageLocation :: Lens' RegisterImage (Maybe Text) #

The full path to your AMI manifest in Amazon S3 storage.

riEnaSupport :: Lens' RegisterImage (Maybe Bool) #

Set to true to enable enhanced networking with ENA for the AMI and any instances that you launch from the AMI. This option is supported only for HVM AMIs. Specifying this option with a PV AMI can make instances launched from the AMI unreachable.

riBillingProducts :: Lens' RegisterImage [Text] #

The billing product codes. Your account must be authorized to specify billing product codes. Otherwise, you can use the AWS Marketplace to bill for the use of an AMI.

riRAMDiskId :: Lens' RegisterImage (Maybe Text) #

The ID of the RAM disk.

riKernelId :: Lens' RegisterImage (Maybe Text) #

The ID of the kernel.

riRootDeviceName :: Lens' RegisterImage (Maybe Text) #

The device name of the root device volume (for example, devsda1 ).

riSRIOVNetSupport :: Lens' RegisterImage (Maybe Text) #

Set to simple to enable enhanced networking with the Intel 82599 Virtual Function interface for the AMI and any instances that you launch from the AMI. There is no way to disable sriovNetSupport 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) #

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

A description for your AMI.

riBlockDeviceMappings :: Lens' RegisterImage [BlockDeviceMapping] #

One or more block device mapping entries.

riDryRun :: Lens' RegisterImage (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 .

riName :: Lens' RegisterImage Text #

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

registerImageResponse #

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 #

Contains the output of RegisterImage.

See: registerImageResponse smart constructor.

Instances
Eq RegisterImageResponse # 
Instance details

Defined in Network.AWS.EC2.RegisterImage

Data RegisterImageResponse # 
Instance details

Defined in Network.AWS.EC2.RegisterImage

Methods

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

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

toConstr :: RegisterImageResponse -> Constr #

dataTypeOf :: RegisterImageResponse -> DataType #

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

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

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

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

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

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

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

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

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

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

Read RegisterImageResponse # 
Instance details

Defined in Network.AWS.EC2.RegisterImage

Show RegisterImageResponse # 
Instance details

Defined in Network.AWS.EC2.RegisterImage

Generic RegisterImageResponse # 
Instance details

Defined in Network.AWS.EC2.RegisterImage

Associated Types

type Rep RegisterImageResponse :: Type -> Type #

NFData RegisterImageResponse # 
Instance details

Defined in Network.AWS.EC2.RegisterImage

Methods

rnf :: RegisterImageResponse -> () #

type Rep RegisterImageResponse # 
Instance details

Defined in Network.AWS.EC2.RegisterImage

type Rep RegisterImageResponse = D1 (MetaData "RegisterImageResponse" "Network.AWS.EC2.RegisterImage" "amazonka-ec2-1.6.1-H98Zd65xIYr2z4e5UhW9ck" False) (C1 (MetaCons "RegisterImageResponse'" PrefixI True) (S1 (MetaSel (Just "_rirsImageId") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Maybe Text)) :*: S1 (MetaSel (Just "_rirsResponseStatus") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Int)))

Response Lenses

rirsImageId :: Lens' RegisterImageResponse (Maybe Text) #

The ID of the newly registered AMI.

rirsResponseStatus :: Lens' RegisterImageResponse Int #

  • - | The response status code.