Closed dchelimsky closed 1 year ago
Some background: pre-release versions of client were records, so they looked like maps. One problem was they contained a lot of information, some of which we'd not want printed (credentials), and the information wasn't really structured well for human consumption. There is an internal function we use to access this info to support various operations, and there is also a not-really-documented datafy
implementation. These undocumented ways to get at the data give us:
(-> client cognitect.aws.client.protocol/-get-info :service :metadata :cognitect.aws/service-name)
(-> client datafy :service :metadata :cognitect.aws/service-name)
Some things to consider:
datafy
:api
key to the datafied client, supporting (-> client datafy :api)
{:api "s3" :region "us-east-1"}
{:api "s3" :region "us-east-1"}
Other ideas and feedback on these are welcome.
We already have keyword access directly on the client to keys like :region and :endpoint, so we could add :api to that.
586dbd5921fba14dae87dc08c45f100077b92f70
Released in 0.8.620
Problem
There is no public API to retrieve the service name from the client. We've got a wrapper for
aws/invoke
that logs information about the request, including the AWS service that we're accessing, and we'd like to be able to derive that from the client instead of having to provide it to the wrapper function.