Fork me on GitHub
Drew Verlee19:08:00

The value for an aws-api CreateStack is described like this

  {:ParameterKey string,
   :ParameterValue string,
   :UsePreviousValue boolean,
   :ResolvedValue string}]
So what i supply is like this:
[{:ParameterKey "AppName", :ParameterValue "api"}]
And the warnings me the key should be a string
{ :path [ :Parameters :ParameterValue ], :pred clojure.core/string?, :val 2, :via [ ], :in [ :Parameters 1 :ParameterValue ] }
So i make the key a string and try again and i'm told the parameters don't have values...
"Parameters: [AppName ...] must have values
i'm starting to guess the warnings are coming from the spec (aws/validate-requests cf-with-assumed-role true) and that there wrong...


You're missing a literal key named :Parameters


Nested under the :request

Alex Miller (Clojure team)19:08:42

(def cf (aws/client {:api :cloudformation}))
(aws/doc cf :CreateStack)

👍 1
Alex Miller (Clojure team)19:08:54

^^ to figure this kind of thing out using the built-ins

Drew Verlee19:08:05

the abbreviated request is {:Parameters [{"ParameterKey" "AppName", "ParameterValue" "api"} ...]} Maybe it's supposed to just be {:Parameters {"AppName" "api"}}

Drew Verlee19:08:28

{:Parameters [{"AppName" "api"}...]}

Alex Miller (Clojure team)19:08:07

the error you had was { :path [ :Parameters :ParameterValue ], :pred clojure.core/string?, :val 2 - which looks like the :ParameterValue value was supposed to be a string, but was the number 2

👀 1
Alex Miller (Clojure team)19:08:26

then you "So i make the key a string" - I think you took the wrong turn here

Drew Verlee19:08:38

Thanks Alex, i forgot the first rule (for me at least) is to just use expound rather then try to manually read the spec. It was the fact that one of the values wasn't a string