View Source aws_credentials (aws_credentials v0.3.3)

This 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

Link to this function

code_change(Prev, State, Extra)

View Source
-spec code_change(any(), state(), any()) -> {ok, state()}.
Link to this function

force_credentials_refresh()

View Source
-spec force_credentials_refresh() -> credentials() | undefined | {error, any()}.
Force a credentials update (using the application environment options if any).
Link to this function

force_credentials_refresh(Options)

View Source
-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 format_status(normal | terminate, any()) -> any().
-spec get_credentials() -> credentials() | undefined.
Get cached credential information.
Link to this function

handle_call(Args, From, State)

View Source
-spec handle_call(any(), any(), state()) -> {noreply, _} | {reply, any(), state()}.
Link to this function

handle_cast(Message, State)

View Source
-spec handle_cast(any(), state()) -> {noreply, state()}.
Link to this function

handle_info(Message, State)

View Source
-spec handle_info(any(), state()) -> {noreply, state()}.
-spec init(_) -> {ok, state()}.
Link to this function

make_map(Provider, AccessId, SecretKey)

View Source
Link to this function

make_map(Provider, AccessId, SecretKey, Token)

View Source
Link to this function

make_map(Provider, AccessId, SecretKey, Token, Region)

View Source
-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.
Link to this function

terminate(Reason, State)

View Source
-spec terminate(any(), state()) -> ok.