'Register an image.
:type name: string
:param name: The name of the AMI.  Valid only for EBS-based images.
:type description: string
:param description: The description of the AMI.
:type image_location: string
:param image_location: Full path to your AMI manifest in
Amazon S3 storage.  Only used for S3-based AMI\'s.
:type architecture: string
:param architecture: The architecture of the AMI.  Valid choices are:
* i386
* x86_64
:type kernel_id: string
:param kernel_id: The ID of the kernel with which to launch
the instances
:type root_device_name: string
:param root_device_name: The root device name (e.g. /dev/sdh)
:type block_device_map: :class:`boto.ec2.blockdevicemapping.BlockDeviceMapping`
:param block_device_map: A BlockDeviceMapping data structure
describing the EBS volumes associated with the Image.
:type dry_run: bool
:param dry_run: Set to True if the operation should not actually run.
:type virtualization_type: string
:param virtualization_type: The virutalization_type of the image.
Valid choices are:
* paravirtual
* hvm
:type sriov_net_support: string
:param sriov_net_support: Advanced networking support.
Valid choices are:
* simple
:type snapshot_id: string
:param snapshot_id: A snapshot ID for the snapshot to be used
as root device for the image. Mutually exclusive with
block_device_map, requires root_device_name
:type delete_root_volume_on_termination: bool
:param delete_root_volume_on_termination: Whether to delete the root
volume of the image after instance termination. Only applies when
creating image from snapshot_id. Defaults to False.  Note that
leaving volumes behind after instance termination is not free.
:rtype: string
:return: The new image id'

def register_image(self, name=None, description=None, image_location=None, architecture=None, kernel_id=None, ramdisk_id=None, root_device_name=None, block_device_map=None, dry_run=False, virtualization_type=None, sriov_net_support=None, snapshot_id=None, delete_root_volume_on_termination=False):

    params = {}
    if name:
        params['Name'] = name
    if description:
        params['Description'] = description
    if architecture:
        params['Architecture'] = architecture
    if kernel_id:
        params['KernelId'] = kernel_id
    if ramdisk_id:
        params['RamdiskId'] = ramdisk_id
    if image_location:
        params['ImageLocation'] = image_location
    if root_device_name:
        params['RootDeviceName'] = root_device_name
    if snapshot_id:
        root_vol = BlockDeviceType(snapshot_id=snapshot_id, delete_on_termination=delete_root_volume_on_termination)
        block_device_map = BlockDeviceMapping()
        block_device_map[root_device_name] = root_vol
    if block_device_map:
        block_device_map.ec2_build_list_params(params)
    if dry_run:
        params['DryRun'] = 'true'
    if virtualization_type:
        params['VirtualizationType'] = virtualization_type
    if sriov_net_support:
        params['SriovNetSupport'] = sriov_net_support
    rs = self.get_object('RegisterImage', params, ResultSet, verb='POST')
    image_id = getattr(rs, 'imageId', None)
    return image_id
