boto/boto — pull request #701 by sievlev (2012-04-12 14:33:33+00:00)
Title: Fix invalid Dimension parameter generation

According AWS documentation Dimension parameter is a struct with fields Name and Value, where
Name and Value are strings, but not a list of strings.

(See http://docs.amazonwebservices.com/AmazonCloudWatch/latest/APIReference/API_Dimension.html),

Therefore result of CloudWatchConnection.build_dimension_param() with arguments

{ "Param1": ["Value1", "Value2"] }

should be

{ "Dimension.1.Name" :"Param1",
"Dimension.1.Value": Value1",
"Dimension.2.Name": "Param1",
"Dimension.2.Value": "Param2" },

instead of

{ "Dimension.1.Name.1" : "Param1",
"Dimension.1.Value.1": "Value1",
"Dimension.1.Name.2": "Param1",
"Dimansion.1.Value.2": "Value2" }

I've tested a various requests with Amazon CloudWatch service.

Amazon CloudWatch service accepts wrong values (dimensions with lists instead of strings), but doesn't process requests correctly.

Looks like this service read only last element from Value list.

It means that dimension:

{ "Name": "A", "Value": ["B", "C"] }

is a same as

{ "Name": "A", "Value": "C" }

P.S. Pull request #472 was a more correct then #470.