Skip to content

Commit

Permalink
ec2: add tenancy option to run_instances
Browse files Browse the repository at this point in the history
closes botogh-599
  • Loading branch information
jtriley committed May 22, 2012
1 parent ef51ff4 commit 67d6898
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion boto/ec2/connection.py
Expand Up @@ -520,7 +520,7 @@ def run_instances(self, image_id, min_count=1, max_count=1,
private_ip_address=None,
placement_group=None, client_token=None,
security_group_ids=None,
additional_info=None):
additional_info=None, tenancy=None):
"""
Runs an image on EC2.
Expand Down Expand Up @@ -615,6 +615,14 @@ def run_instances(self, image_id, min_count=1, max_count=1,
:param additional_info: Specifies additional information to make
available to the instance(s)
:type tenancy: string
:param tenancy: The tenancy of the instance you want to launch. An
instance with a tenancy of 'dedicated' runs on
single-tenant hardware and can only be launched into a
VPC. Valid values are: "default" or "dedicated".
NOTE: To use dedicated tenancy you MUST specify a VPC
subnet-ID as well.
:rtype: Reservation
:return: The :class:`boto.ec2.instance.Reservation` associated with
the request for machines
Expand Down Expand Up @@ -654,6 +662,8 @@ def run_instances(self, image_id, min_count=1, max_count=1,
params['Placement.AvailabilityZone'] = placement
if placement_group:
params['Placement.GroupName'] = placement_group
if tenancy:
params['Placement.Tenancy'] = tenancy
if kernel_id:
params['KernelId'] = kernel_id
if ramdisk_id:
Expand Down

0 comments on commit 67d6898

Please sign in to comment.