aws_credentials (aws_credentials v1.0.3)
View SourceThis is the main interface to the library. It provides a function get_credentials/0 which should return Credentials :: map() or undefined. If undefined, it will attempt to get credentials again after 5 seconds delay.
Summary
Functions
Force a credentials update (using the application environment options if any).
Force a credentials update, passing options (which possibly override the options set in the erlang environment.)
Get cached credential information.
Start the server that stores and automatically updates client credentials fetched from the instance metadata service.
Stop the server that holds the credentials.
Types
-type access_key_id() :: binary().
-type credentials() :: #{credential_provider := aws_credentials_provider:provider(), access_key_id := access_key_id(), secret_access_key := secret_access_key(), token => token(), region => region()}.
-type region() :: binary().
-type secret_access_key() :: binary().
-opaque state()
-type token() :: binary().
Functions
-spec force_credentials_refresh() -> credentials() | undefined | {error, any()}.
Force a credentials update (using the application environment options if any).
-spec force_credentials_refresh(aws_credentials_provider:options()) -> credentials() | undefined | {error, any()}.
Force a credentials update, passing options (which possibly override the options set in the erlang environment.)
-spec format_status(gen_server:format_status()) -> gen_server:format_status().
-spec get_credentials() -> credentials() | undefined.
Get cached credential information.
-spec init(_) -> {ok, state()}.
-spec make_map(aws_credentials_provider:provider(), access_key_id(), secret_access_key()) -> credentials().
-spec make_map(aws_credentials_provider:provider(), access_key_id(), secret_access_key(), token()) -> credentials().
-spec make_map(aws_credentials_provider:provider(), access_key_id(), secret_access_key(), token(), region()) -> credentials().
-spec start_link() -> {ok, pid()}.
Start the server that stores and automatically updates client credentials fetched from the instance metadata service.
-spec stop() -> ok.
Stop the server that holds the credentials.