From ef2a8777ec93d301a97875095b01927457082805 Mon Sep 17 00:00:00 2001 From: Xu Wang Date: Mon, 6 Oct 2014 10:02:04 -0700 Subject: [PATCH] add option IamInstanceProfile to CreateLaunchConfiguration for allowing aws role base AC --- autoscaling/autoscaling.go | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/autoscaling/autoscaling.go b/autoscaling/autoscaling.go index e2cef98e..92e5077f 100644 --- a/autoscaling/autoscaling.go +++ b/autoscaling/autoscaling.go @@ -237,20 +237,24 @@ func (autoscaling *AutoScaling) CreateAutoScalingGroup(options *CreateAutoScalin // The CreateLaunchConfiguration request parameters type CreateLaunchConfiguration struct { - ImageId string - InstanceId string - InstanceType string - KeyName string - Name string - SecurityGroups []string - UserData string + IamInstanceProfile string + ImageId string + InstanceId string + InstanceType string + KeyName string + Name string + SecurityGroups []string + UserData string } func (autoscaling *AutoScaling) CreateLaunchConfiguration(options *CreateLaunchConfiguration) (resp *SimpleResp, err error) { params := makeParams("CreateLaunchConfiguration") params["LaunchConfigurationName"] = options.Name - + + if options.IamInstanceProfile != "" { + params["IamInstanceProfile"] = options.IamInstanceProfile + } if options.ImageId != "" { params["ImageId"] = options.ImageId }