ZF-8149: getMetricStatistics() does not support the "Dimensions" option parameter properly

Issue Type: Bug Created: 2009-10-26T11:02:23.000+0000 Last Updated: 2009-11-19T14:15:02.000+0000 Status: Resolved Fix version(s): - 1.9.6 (24/Nov/09)

Reporter: Larry Root (lroot) Assignee: Jon Whitcraft (sidhighwind) Tags: - Zend_Service_Amazon_Ec2

Related issues: Attachments: - CloudWatch.patch


When using the "Dimensions" parameter in the getMetricStatistics method, a warning is thrown and the call fails.

Example Call:

<pre class="literal">
$return = $ec2_cw->getMetricStatistics(array(
                             'MeasureName' => 'CPUUtilization',
                             'Statistics' =>  array('Average'),
                             'Dimensions'=>   array('InstanceId'=>$instance),
                             'StartTime'=>    $period1Start,
                             'EndTime'=>      $period1End,

The warning thrown:

<pre class="literal">
Warning: urlencode() expects parameter 1 to be string, array given in .../Zend/Service/Amazon/Ec2/Abstract.php on line 166

It seems to be choking on the fact that the 'Dimensions' config option is an associative array and the signParameters method within the abstract is not handling the condition.


Posted by Larry Root (lroot) on 2009-10-26T11:06:41.000+0000

Stack trace of failed getMetricStatistics call

Posted by Jon Whitcraft (sidhighwind) on 2009-11-19T14:15:01.000+0000

This has been completed with r19066 and merged into the release branch with r19067

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.