cognitect-labs / aws-api

AWS, data driven

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`timestream-write/WriteRecords` does not have `:output` definition

danieroux opened this issue · comments

Dependencies

com.cognitect.aws/timestream-write {:mvn/version "810.2.801.0", :aws/serviceFullName "Amazon Timestream Write"}

Description

To have access to: https://docs.aws.amazon.com/timestream/latest/developerguide/API_WriteRecords.html#API_WriteRecords_ResponseSyntax

I currently have to read it from the meta:

(clojure.data.json/read
  (clojure.java.io/reader (get-in (meta result) [:http-response :body]))
  :key-fn keyword)

That gives me the result I would expect from {:op :WriteRecords}:

{:RecordsIngested {:MagneticStore 0, :MemoryStore 9, :Total 9}}

I note that :output is not defined for :WriteRecords in: ~/.m2/repository/com/cognitect/aws/timestream-write/810.2.801.0/timestream-write-810.2.801.0.jar!/cognitect/aws/timestream-write/service.edn:

 :WriteRecords {:name "WriteRecords",
                :http {:method "POST", :requestUri "/"},
                :input {:shape "WriteRecordsRequest"},
                :errors [{:shape "InternalServerException"}
                         {:shape "ThrottlingException"}
                         {:shape "ValidationException"}
                         {:shape "ResourceNotFoundException"}
                         {:shape "AccessDeniedException"}
                         {:shape "RejectedRecordsException"}
                         {:shape "InvalidEndpointException"}],
                :endpointdiscovery {:required true}},

And that it is defined here: https://github.com/aws/aws-sdk-js/blob/11fcfc1844642e99e3f641c22e701e8880f95aa3/apis/timestream-write-2018-11-01.min.json#L379

Thank you for the detailed report!

822.2.801.0 was generated from the v2.801.0 tag of the aws-sdk-js repo, and there is no :output definition in that version: https://github.com/aws/aws-sdk-js/blob/v2.801.0/apis/timestream-write-2018-11-01.normal.json#L515-L552

The good news, however, is that the latest release, com.cognitect.aws/timestream-write-822.2.1109.0, is generated from the v2.1109.0 tag of aws-sdk-js, which does include :output for :WriteRecords, so this should be solved by upgrading to com.cognitect.aws/timestream-write-822.2.1109.0.