Subject: | reboot_instances doesn't actually support array refs |
Date: | Thu, 30 Oct 2014 10:59:19 -0500 |
To: | bug-net-amazon-ec2 [...] rt.cpan.org |
From: | J <j [...] dawnrazor.net> |
Hello,
The documentation states the following for the reboot_instances call:
--
InstanceId (required)
Instance Id of the instance you wish to reboot. Can be either a
scalar or array ref of instances to reboot.
--
when passing an array reference to reboot_instances as follows:
--
45 $params{InstanceId} = [split(/,/,$instance_id)];
--
I got the following back:
--
The 'InstanceId' parameter ("ARRAY(0x801c945e8)") to
Net::Amazon::EC2::reboot_instances was an 'arrayref', which is not one
of the allowed types: scalar
at /usr/local/lib/perl5/site_perl/5.16/Net/Amazon/EC2.pm line 3313.
--
I found the following:
--
3313 my %args = validate( @_, {
3314 InstanceId => { type => SCALAR },
--
After looking at the code a bit, I changed line 3314 to:
--
3314 InstanceId => { type => SCALAR | ARRAYREF },
--
This produced results consistent with the documentation. It looks like
there may be other cases of this issue with other calls, but I did not
look too closely.
Thanks,
J