diff --git a/lib/Net/Amazon/EC2.pm b/lib/Net/Amazon/EC2.pm index c7a5d70..daf3875 100644 --- a/lib/Net/Amazon/EC2.pm +++ b/lib/Net/Amazon/EC2.pm @@ -3602,6 +3602,10 @@ The keypair name to associate this instance with. If omitted, will use your def An scalar or array ref. Will associate this instance with the group names passed in. If omitted, will be associated with the default security group. +=item SecurityGroupId (optional) + +An scalar or array ref. Will associate this instance with the group ids passed in. If omitted, will be associated with the default security group. + =item AdditionalInfo (optional) Specifies additional information to make available to the instance(s). @@ -3718,6 +3722,10 @@ Specifies the idempotent instance id. Whether the instance is optimized for EBS I/O. +=item PrivateIpAddress (optional) + +Specifies the private IP address to use when launching an Amazon VPC instance. + =back Returns a Net::Amazon::EC2::ReservationInfo object @@ -3732,6 +3740,7 @@ sub run_instances { MaxCount => { type => SCALAR }, KeyName => { type => SCALAR, optional => 1 }, SecurityGroup => { type => SCALAR | ARRAYREF, optional => 1 }, + SecurityGroupId => { type => SCALAR | ARRAYREF, optional => 1 }, AdditionalInfo => { type => SCALAR, optional => 1 }, UserData => { type => SCALAR, optional => 1 }, InstanceType => { type => SCALAR, optional => 1 }, @@ -3750,7 +3759,8 @@ sub run_instances { DisableApiTermination => { type => SCALAR, optional => 1 }, InstanceInitiatedShutdownBehavior => { type => SCALAR, optional => 1 }, ClientToken => { type => SCALAR, optional => 1 }, - EbsOptimized => { type => SCALAR, optional => 1 }, + EbsOptimized => { type => SCALAR, optional => 1 }, + PrivateIpAddress => { type => SCALAR, optional => 1 }, }); # If we have a array ref of instances lets split them out into their SecurityGroup.n format @@ -3763,6 +3773,16 @@ sub run_instances { } } + # If we have a array ref of instances lets split them out into their SecurityGroupId.n format + if (ref ($args{SecurityGroupId}) eq 'ARRAY') { + my $security_groups = delete $args{SecurityGroupId}; + my $count = 1; + foreach my $security_group (@{$security_groups}) { + $args{"SecurityGroupId." . $count} = $security_group; + $count++; + } + } + # If we have a array ref of block device virtual names lets split them out into their BlockDeviceMapping.n.VirtualName format if (ref ($args{'BlockDeviceMapping.VirtualName'}) eq 'ARRAY') { my $virtual_names = delete $args{'BlockDeviceMapping.VirtualName'};