This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-01-21
Channels
- # announcements (4)
- # aws (29)
- # aws-lambda (1)
- # babashka (21)
- # beginners (143)
- # calva (47)
- # cider (31)
- # clj-kondo (24)
- # cljsrn (4)
- # clojure (70)
- # clojure-australia (3)
- # clojure-czech (1)
- # clojure-europe (97)
- # clojure-greece (4)
- # clojure-nl (3)
- # clojure-uk (45)
- # clojurescript (70)
- # code-reviews (1)
- # conjure (7)
- # cursive (10)
- # datomic (13)
- # duct (5)
- # emacs (1)
- # fulcro (38)
- # graalvm (1)
- # graphql (9)
- # honeysql (13)
- # integrant (33)
- # jobs (14)
- # jobs-rus (1)
- # malli (7)
- # off-topic (72)
- # pathom (1)
- # re-frame (11)
- # reitit (9)
- # remote-jobs (2)
- # sci (11)
- # shadow-cljs (9)
- # sql (5)
- # tools-deps (5)
- # xtdb (6)
(def sp (aws-api/client {:api :savingsplans}))
(aws-api/invoke sp
{:op :DescribeSavingsPlansOfferingRates
:request {:products ["EC2"]}})
=> {:message "Unsupported Media Type", :cognitect.anomalies/category :cognitect.anomalies/incorrect}
It seems the savingsplan API is not supported? I can get a result back via the CLI *aws* savingsplans describe-savings-plans-offerings --product-types EC2
com.cognitect.aws/api {:mvn/version "0.8.498"}
com.cognitect.aws/endpoints {:mvn/version "1.1.11.934"}
com.cognitect.aws/savingsplans {:mvn/version "809.2.784.0"}
What does (aws-api/doc sp :DescribeSavingsPlansOfferingRates)
say?
{:serviceCodes
[:seq-of [:one-of ["AmazonEC2" "AmazonECS" "AWSLambda"]]],
:filters
[:seq-of
{:name
[:one-of
["region"
"instanceFamily"
"instanceType"
"productDescription"
"tenancy"
"productId"]],
:values [:seq-of string]}],
:savingsPlanOfferingIds [:seq-of string],
:savingsPlanPaymentOptions
[:seq-of [:one-of ["All Upfront" "Partial Upfront" "No Upfront"]]],
:products [:seq-of [:one-of ["EC2" "Fargate" "Lambda"]]],
:usageTypes [:seq-of string],
:savingsPlanTypes [:seq-of [:one-of ["Compute" "EC2Instance"]]],
:operations [:seq-of string],
:nextToken string,
:maxResults integer}
What is required?
(below what you posted)
(aws-api/invoke sp
{:op :DescribeSavingsPlansOfferingRates})
=> {:message "Unsupported Media Type", :cognitect.anomalies/category :cognitect.anomalies/incorrect}
> It seems the savingsplan API is not supported You’d be getting different errors if that were true.
Would you please report this as a bug?
I can’t really investigate it right now.
Thanks.
I’d look at the request info from
(meta (aws-api/invoke sp
{:op :DescribeSavingsPlansOfferingRates}))
and check to see the headers align w/ the aws docs.Also, we’ve had cases where required things are not listed as such e.g. https://github.com/cognitect-labs/aws-api/issues/158
That’s the problem in the issue I linked
Thanks for the info. Will dig in. Here's the issue https://github.com/cognitect-labs/aws-api/issues/168
> and check to see the headers align w/ the aws docs. Aren't headers common across all services?
:rolling_on_the_floor_laughing:
I know s3 is a monster. Was somewhat hoping newer aws apis would be mostly very similar. Do you know of service specific docs for the headers? The regular API references only point to the "CommonParameters" section.
I’m updating the issue so please check there for more info https://github.com/cognitect-labs/aws-api/issues/168