SecretConfig (secret_config v0.14.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
delete(key)
Specs
delete(key :: binary()) :: ExAws.Operation.JSON.t()
Deletes parameter from the AWS Parameter Store, then it triggers a refresh of the GenServer state
fetch(key, default)
Specs
fetch(key :: binary(), default :: binary() | nil) :: ExAws.Operation.JSON.t()
Gets parameter from GenServer (returns default value if present)
fetch!(key)
Specs
fetch!(key :: binary()) :: ExAws.Operation.JSON.t()
Gets parameter from GenServer (raise error if the value is not present)
key?(key)
Specs
key?(key :: binary()) :: ExAws.Operation.JSON.t()
Checks for parameter to be present
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
refresh()
Specs
refresh() :: none()
Triggers a refresh of the GenServer state by pulling the latest from the AWS Parameter Store
set_env(env)
Specs
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)