API functions for using a client to interact with AWS services.
API functions for using a client to interact with AWS services.
(client {:keys [api region region-provider retriable? backoff
credentials-provider endpoint-override]
:as config})
Given a config map, create a client for specified api. Supported keys in config are: :api - required, this or api-descriptor required, the name of the api you want to interact with e.g. :s3, :cloudformation, etc :region - optional, the aws region serving the API endpoints you want to interact with, defaults to region provided by by the default region provider (see cognitect.aws.region) :credentials-provider - optional, implementation of cognitect.aws.credentials/CredentialsProvider protocol, defaults to cognitect.aws.credentials/default-credentials-provider :endpoint-override - optional, overrides the configured endpoint. If the endpoint includes an AWS region, be sure use the same region for the client (either via out of process configuration or the :region key passed to this fn). :region-provider - optional, implementation of aws-clojure.region/RegionProvider protocol, defaults to cognitect.aws.region/default-region-provider :retriable? - optional, fn of http-response (see cognitect.http-client/submit). Should return a boolean telling the client whether or not the request is retriable. The default, cognitect.aws.retry/default-retriable?, returns true when the response indicates that the service is busy or unavailable. :backoff - optional, fn of number of retries so far. Should return number of milliseconds to wait before the next retry (if the request is retriable?), or nil if it should stop. Defaults to cognitect.aws.retry/default-backoff.
Alpha. Subject to change.
Given a config map, create a client for specified api. Supported keys in config are: :api - required, this or api-descriptor required, the name of the api you want to interact with e.g. :s3, :cloudformation, etc :region - optional, the aws region serving the API endpoints you want to interact with, defaults to region provided by by the default region provider (see cognitect.aws.region) :credentials-provider - optional, implementation of cognitect.aws.credentials/CredentialsProvider protocol, defaults to cognitect.aws.credentials/default-credentials-provider :endpoint-override - optional, overrides the configured endpoint. If the endpoint includes an AWS region, be sure use the same region for the client (either via out of process configuration or the :region key passed to this fn). :region-provider - optional, implementation of aws-clojure.region/RegionProvider protocol, defaults to cognitect.aws.region/default-region-provider :retriable? - optional, fn of http-response (see cognitect.http-client/submit). Should return a boolean telling the client whether or not the request is retriable. The default, cognitect.aws.retry/default-retriable?, returns true when the response indicates that the service is busy or unavailable. :backoff - optional, fn of number of retries so far. Should return number of milliseconds to wait before the next retry (if the request is retriable?), or nil if it should stop. Defaults to cognitect.aws.retry/default-backoff. Alpha. Subject to change.
(doc client operation)
Given a client and an operation (keyword), prints documentation for that operation to the current value of out. Returns nil.
Alpha. Subject to change.
Given a client and an operation (keyword), prints documentation for that operation to the current value of *out*. Returns nil. Alpha. Subject to change.
(doc-str {:keys [documentation request required response refs] :as doc})
Given data produced by ops
, returns a string
representation.
Alpha. Subject to change.
Given data produced by `ops`, returns a string representation. Alpha. Subject to change.
(invoke client op-map)
Package and send a request to AWS and return the result.
Supported keys in op-map:
:op - required, keyword, the op to perform :request - required only for ops that require them. :retriable? - optional, defaults to :retriable? on the client. See client. :backoff - optional, defaults to :backoff on the client. See client.
After invoking (cognitect.aws.client.api/validate-requests true), validates :request in op-map.
Alpha. Subject to change.
Package and send a request to AWS and return the result. Supported keys in op-map: :op - required, keyword, the op to perform :request - required only for ops that require them. :retriable? - optional, defaults to :retriable? on the client. See client. :backoff - optional, defaults to :backoff on the client. See client. After invoking (cognitect.aws.client.api/validate-requests true), validates :request in op-map. Alpha. Subject to change.
(ops client)
Returns a map of operation name to operation data for this client.
Alpha. Subject to change.
Returns a map of operation name to operation data for this client. Alpha. Subject to change.
(request-spec-key client op)
Returns the key for the request spec for op.
Alpha. Subject to change.
Returns the key for the request spec for op. Alpha. Subject to change.
(response-spec-key client op)
Returns the key for the response spec for op.
Alpha. Subject to change.
Returns the key for the response spec for op. Alpha. Subject to change.
(stop client)
Shuts down the http-client, releasing resources.
Alpha. Subject to change.
Shuts down the http-client, releasing resources. Alpha. Subject to change.
(validate-requests client)
(validate-requests client bool)
Given true, uses clojure.spec to validate all invoke calls on client.
Alpha. Subject to change.
Given true, uses clojure.spec to validate all invoke calls on client. Alpha. Subject to change.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close