|
|
__init__(self,
aws_access_key_id,
aws_secret_access_key,
aws_ec2_path='/',
aws_s3_host=None,
aws_s3_path='/',
aws_port=None,
aws_region_name=None,
aws_is_secure=True,
aws_region_host=None,
**kwargs)
Create an EasyAWS object. |
source code
|
|
|
|
|
|
|
|
|
|
get_region(self,
region_name)
Returns boto Region object if it exists, raises RegionDoesNotExist
otherwise. |
source code
|
|
|
|
list_regions(self)
Print name/endpoint for all AWS regions |
source code
|
|
|
|
|
|
|
create_group(self,
name,
description,
auth_ssh=False,
auth_group_traffic=False)
Create security group with name/description. |
source code
|
|
|
|
|
|
|
get_group_or_none(self,
name)
Returns group with name if it exists otherwise returns None |
source code
|
|
|
|
|
|
|
|
|
|
get_security_groups(self,
filters=None)
Returns all security groups on this EC2 account |
source code
|
|
|
|
get_permission_or_none(self,
group,
ip_protocol,
from_port,
to_port,
cidr_ip=None)
Returns the rule with the specified port range permission
(ip_protocol, from_port, to_port, cidr_ip) defined or None if no such
rule exists |
source code
|
|
|
|
has_permission(self,
group,
ip_protocol,
from_port,
to_port,
cidr_ip)
Checks whether group has the specified port range permission
(ip_protocol, from_port, to_port, cidr_ip) defined |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
get_placement_group_or_none(self,
name)
Returns placement group with name if it exists otherwise returns None |
source code
|
|
|
|
|
|
|
request_instances(self,
image_id,
price=None,
instance_type='m1.small',
min_count=1,
max_count=1,
count=1,
key_name=None,
security_groups=None,
launch_group=None,
availability_zone_group=None,
placement=None,
user_data=None,
placement_group=None)
Convenience method for running spot or flat-rate instances |
source code
|
|
|
|
request_spot_instances(self,
price,
image_id,
instance_type='m1.small',
count=1,
launch_group=None,
key_name=None,
availability_zone_group=None,
security_groups=None,
placement=None,
user_data=None) |
source code
|
|
|
|
run_instances(self,
image_id,
instance_type='m1.small',
min_count=1,
max_count=1,
key_name=None,
security_groups=None,
placement=None,
user_data=None,
placement_group=None) |
source code
|
|
|
|
| create_image(self,
instance_id,
name,
description=None,
no_reboot=False) |
source code
|
|
|
|
| register_image(self,
name,
description=None,
image_location=None,
architecture=None,
kernel_id=None,
ramdisk_id=None,
root_device_name=None,
block_device_map=None) |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get_all_instances(self,
instance_ids=[],
filters=None) |
source code
|
|
|
|
|
|
|
|
|
|
get_all_spot_requests(self,
spot_ids=[],
filters=None) |
source code
|
|
|
|
| list_all_spot_instances(self,
show_closed=False) |
source code
|
|
|
|
| list_all_instances(self,
show_terminated=False) |
source code
|
|
|
|
| list_images(self,
images,
sort_key=None,
reverse=False) |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
| remove_image_files(self,
image_name,
pretend=True) |
source code
|
|
|
|
|
|
|
|
|
|
| create_volume(self,
size,
zone,
snapshot_id=None) |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get_zone(self,
zone)
Return zone object respresenting an EC2 availability zone Raises
exception.ZoneDoesNotExist if not successful |
source code
|
|
|
|
get_zone_or_none(self,
zone)
Return zone object respresenting an EC2 availability zone Returns
None if unsuccessful |
source code
|
|
|
|
create_s3_image(self,
instance_id,
key_location,
aws_user_id,
ec2_cert,
ec2_private_key,
bucket,
image_name='image',
description=None,
kernel_id=None,
ramdisk_id=None,
remove_image_files=False,
**kwargs)
Create instance-store (S3) image from running instance |
source code
|
|
|
|
create_ebs_image(self,
instance_id,
key_location,
name,
description=None,
snapshot_description=None,
kernel_id=None,
ramdisk_id=None,
root_vol_size=15,
**kwargs)
Create EBS-backed image from running instance |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
migrate_image(self,
image_id,
destbucket,
migrate_manifest=False,
kernel_id=None,
ramdisk_id=None,
region=None,
cert=None,
private_key=None)
Migrate image_id files to destbucket |
source code
|
|
|
|
create_root_block_device_map(self,
snapshot_id,
root_device_name='/dev/sda1',
add_ephemeral_drives=False,
ephemeral_drive_0='/dev/sdb1',
ephemeral_drive_1='/dev/sdc1',
ephemeral_drive_2='/dev/sdd1',
ephemeral_drive_3='/dev/sde1')
Utility method for building a new block_device_map for a given
snapshot id. |
source code
|
|
|
|
|
|
|
list_image_files(self,
image_id)
Print a list of files for image_id to the screen |
source code
|
|
|
|
|
|
|
get_volumes(self,
filters=None)
Returns a list of all EBS volumes |
source code
|
|
|
|
|
|
|
|
|
|
| wait_for_snapshot(self,
snapshot,
refresh_interval=30) |
source code
|
|
|
|
| create_snapshot(self,
vol,
description=None,
wait_for_snapshot=False,
refresh_interval=30) |
source code
|
|
|
|
get_snapshots(self,
volume_ids=[],
filters=None)
Returns a list of all EBS volume snapshots for this account |
source code
|
|
|
|
|
|
|
list_volumes(self,
volume_id=None,
status=None,
attach_status=None,
size=None,
zone=None,
snapshot_id=None,
show_deleted=False)
Print a list of volumes to the screen |
source code
|
|
|
|
get_spot_history(self,
instance_type,
start=None,
end=None,
plot=False,
plot_server_interface='localhost',
plot_launch_browser=True,
plot_web_browser=None,
plot_shutdown_server=True) |
source code
|
|
|
|
|
|
Inherited from EasyAWS:
reload
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__setattr__,
__sizeof__,
__str__,
__subclasshook__
|