-image_id The id of the image, either a string scalar or an arrayref. -executable_by Filter by images executable by the indicated user account, or one of the aliases "self" or "all". -owner Filter by owner account number or one of the aliases "self", "aws-marketplace", "amazon" or "all". -filter Tags and other filters to applyIf there are no other arguments, you may omit the -filter argument name and call describe_images() with a single hashref consisting of the search filters you wish to apply. The full list of image filters can be found at: http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/ApiReference-query-DescribeImages.html
-instance_id ID of the instance to create an image from. (required) -name Name for the image that will be created. (required) -description Description of the new image. -no_reboot If true, don't reboot the instance. -block_device_mapping Block device mapping as a scalar or array ref. See run_instances() for the syntax. -block_devices Alias of the above
-name Name for the image that will be created.Arguments required for an EBS-backed image:
-root_device_name The root device name, e.g. /dev/sda1 -block_device_mapping The block device mapping strings, including the snapshot ID for the root volume. This can be either a scalar string or an arrayref. See run_instances() for a description of the syntax. -block_devices Alias of the above.Arguments required for an instance-store image:
-image_location Full path to the AMI manifest in Amazon S3 storage.Common optional arguments:
-description Description of the AMI -architecture Architecture of the image ("i386" or "x86_64") -kernel_id ID of the kernel to use -ramdisk_id ID of the RAM disk to use -virtualization_type Type of virtualization ("paravirtual" or "hvm") Default is "paravirtual" -sriov_net_support Set to "simple" to enable enhanced networking for the AMIWhile you do not have to specify the kernel ID, it is strongly recommended that you do so. Otherwise the kernel will have to be specified for run_instances(). Note: Immediately after registering the image you can add tags to it and use modify_image_attribute to change launch permissions, etc.
description -- scalar kernel -- scalar ramdisk -- scalar launchPermission -- list of scalar productCodes -- array blockDeviceMapping -- list of hashref sriovNetSupport -- scalarAll of these values can be retrieved more conveniently from the VM::EC2::Image object returned from describe_images(), so there is no attempt to parse the results of this call into Perl objects. In particular, 'blockDeviceMapping' is returned as a raw hashrefs (there also seems to be an AWS bug that causes fetching this attribute to return an AuthFailure error). Please see the VM::EC2::Image launchPermissions() and blockDeviceMapping() methods for more convenient ways to get this data.
-launch_add_user -- scalar or arrayref of UserIds to grant launch permissions to -launch_add_group -- scalar or arrayref of Groups to remove launch permissions from (only currently valid value is "all") -launch_remove_user -- scalar or arrayref of UserIds to remove from launch permissions -launch_remove_group -- scalar or arrayref of Groups to remove from launch permissions -product_code -- scalar or array of product codes to add -description -- scalar new descriptionYou can abbreviate the launch permission arguments to -add_user, -add_group, -remove_user, -remove_group, etc. Only one attribute can be changed in a single request. For example:
$ec2->modify_image_attribute('ami-12345',-product_code=>['abcde','ghijk']);The result code is true if the attribute was successfully modified, false otherwise. In the latter case, $ec2-> error() will provide the error message. To make an image public, specify -launch_add_group=>'all':
$ec2->modify_image_attribute('i-12345',-launch_add_group=>'all');Also see VM::EC2::Image for shortcut methods. For example:
$image = $ec2->copy_image(-source_region => $src, -source_image_id => $id, -name => $name, -description => $desc, -client_token => $token)Initiates the copy of an AMI from the specified source region to the region in which the API call is executed. Required arguments:
-source_region -- The ID of the AWS region that contains the AMI to be copied (source). -source_image_id -- The ID of the Amazon EC2 AMI to copy.Optional arguments:
-name -- The name of the new EC2 AMI in the destination region. -description -- A description of the new AMI in the destination region. -client_token -- Unique, case-sensitive identifier you provide to ensure idempotency of the request.Returns a VM::EC2::Image object on success;