Usage¶
CLI Usage¶
$ ubuntufinder -r precise -a amd64 -i ebs -v paravirtual us-east-1
ami-fa7dba92
Run ubuntufinder -h for usage information.
Library Usage¶
>>> import ubuntufinder
>>> ubuntufinder.find_image("us-east-1")
<Image: raring@us-east-1: 2013-08-24 00:00:00 (amd64 ebs paravirtual)>
>>> image = ubuntufinder.find_image("us-west-1", "precise", "amd64", "ebs", "paravirtual")
>>> image.ami_id
'ami-c4072e81'
Advanced Usage¶
find_image uses sane defaults, but accepts extra arguments that let you customize your search.
- ubuntufinder.find_image(region, release='latest', architecture='amd64', instance_type='ebs', virtualization='paravirtual', _session=None)¶
Return a full image specification according to the query parameters
Parameters: - region (str) – The AWS region code to locate the Image in
- release (str) – The codename of the Ubuntu Release to locate. Defaults to the latest release
- architecture (str) – The CPU Architecture to find the image for. Defaults to amd64
- instance_type (str) – The Instance type to find the image for (ebs or instance-store). Defaults to ebs.
- virtualization (str) – The virtualization technology to find the image for (paravirtual or hvm).
Returns: An Image corresponding to your search
Return type: Raises: ubuntufinder.exceptions.ImageNotFound if no match is found.
Raises: ubuntufinder.exceptions.ServiceUnavailable if Cloud Images can’t be accessed.