SecretConfig (secret_config v0.13.0)

Handles CRUD operations to interact with AWS SSM Parameter Store. parameters are pushed to SSM as secure strings (encrypted) but then added as plain text into the GenServer's internal state

Link to this section Summary

Functions

Deletes parameter from the AWS Parameter Store, then it triggers a refresh of the GenServer state

Gets parameter from GenServer (returns default value if present)

Gets parameter from GenServer (raise error if the value is not present)

Checks for parameter to be present

Adds parameter to the AWS Parameter Store, then it triggers a refresh of the GenServer state

Triggers a refresh of the GenServer state by pulling the latest from the AWS Parameter Store

Sets the env explicitly as this configuration item may not be able to be set inside a releases.exs or runtime.exs if you perform ensure_all_started(:secret_config)

Link to this section Functions

Specs

delete(key :: binary()) :: ExAws.Operation.JSON.t()

Deletes parameter from the AWS Parameter Store, then it triggers a refresh of the GenServer state

Link to this function

fetch(key, default)

Specs

fetch(key :: binary(), default :: binary() | nil) :: ExAws.Operation.JSON.t()

Gets parameter from GenServer (returns default value if present)

Specs

fetch!(key :: binary()) :: ExAws.Operation.JSON.t()

Gets parameter from GenServer (raise error if the value is not present)

Specs

key?(key :: binary()) :: ExAws.Operation.JSON.t()

Checks for parameter to be present

Link to this function

push(key, value)

Specs

push(key :: binary(), value :: binary()) :: ExAws.Operation.JSON.t()

Adds parameter to the AWS Parameter Store, then it triggers a refresh of the GenServer state

Specs

refresh() :: none()

Triggers a refresh of the GenServer state by pulling the latest from the AWS Parameter Store

Specs

set_env(env :: binary()) :: none()

Sets the env explicitly as this configuration item may not be able to be set inside a releases.exs or runtime.exs if you perform ensure_all_started(:secret_config)