summaryrefslogtreecommitdiff
path: root/boto/ec2/autoscale/launchconfig.py
diff options
context:
space:
mode:
authorMitch Garnaat <mitch@garnaat.com>2012-06-12 03:46:33 -0700
committerMitch Garnaat <mitch@garnaat.com>2012-06-12 03:46:33 -0700
commit7cf2cd77a55487d2ba0637c26918c7aa3ef60381 (patch)
tree8586363b49936a9ede1b638eb6a94fb37d370562 /boto/ec2/autoscale/launchconfig.py
parent304f2ed9cd1c0c3828cb511a7a94933e5b3c3088 (diff)
downloadboto-7cf2cd77a55487d2ba0637c26918c7aa3ef60381.tar.gz
Allow IAM instance profile to be associated with a launch configuration for autoscale. Related to #811.
Diffstat (limited to 'boto/ec2/autoscale/launchconfig.py')
-rw-r--r--boto/ec2/autoscale/launchconfig.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/boto/ec2/autoscale/launchconfig.py b/boto/ec2/autoscale/launchconfig.py
index be8e4435..e6e38fdb 100644
--- a/boto/ec2/autoscale/launchconfig.py
+++ b/boto/ec2/autoscale/launchconfig.py
@@ -93,7 +93,8 @@ class LaunchConfiguration(object):
key_name=None, security_groups=None, user_data=None,
instance_type='m1.small', kernel_id=None,
ramdisk_id=None, block_device_mappings=None,
- instance_monitoring=False, spot_price=None):
+ instance_monitoring=False, spot_price=None,
+ instance_profile_name=None):
"""
A launch configuration.
@@ -134,6 +135,11 @@ class LaunchConfiguration(object):
:type spot_price: float
:param spot_price: The spot price you are bidding. Only applies
if you are building an autoscaling group with spot instances.
+
+ :type instance_profile_name: string
+ :param instance_profile_name: The name or the Amazon Resource
+ Name (ARN) of the instance profile associated with the IAM
+ role for the instance.
"""
self.connection = connection
self.name = name
@@ -150,6 +156,7 @@ class LaunchConfiguration(object):
self.created_time = None
self.instance_monitoring = instance_monitoring
self.spot_price = spot_price
+ self.instance_profile_name = instance_profile_name
self.launch_configuration_arn = None
def __repr__(self):
@@ -192,6 +199,8 @@ class LaunchConfiguration(object):
self.instance_monitoring = value
elif name == 'SpotPrice':
self.spot_price = float(value)
+ elif name == 'IamInstanceProfile':
+ self.instance_profile_name = value
else:
setattr(self, name, value)