taoensso / faraday

Amazon DynamoDB client for Clojure
https://www.taoensso.com/faraday
Eclipse Public License 1.0
238 stars 84 forks source link

put-item :return crashing #64

Closed skbach closed 9 years ago

skbach commented 9 years ago

(far/put-item client-opts "foo" {:uri "yyy" :_id "42"} {:return :all-new})

AmazonServiceException Return values set to invalid value

Am I missing something simple or is this a bug? Thanks.

ptaoussanis commented 9 years ago

Hi there, it seems the valid values here are only :none or :return-old, Ref. http://docs.aws.amazon.com/sdkfornet1/latest/apidocs/html/P_Amazon_DynamoDBv2_Model_PutItemRequest_ReturnValues.htm

Will make a note to update the docstring next time I'm in the code

skbach commented 9 years ago

Only :none and :all-old are valid for put-item it appears.

Confusing because the aws spec then says at the bottom:

Allowed Values NONE, ALL_OLD, UPDATED_OLD, ALL_NEW, UPDATED_NEW

But only some of those apply to put I guess, and the others work (maybe?) with an update-item.