nomad v0.7.0 NomadSQL behaviour
Summary
Callbacks
Deletes the given ‘instance’
Same as delete_instance/1 but returns the complete HTTP reply
Returns a tuple with info about the given ‘instance’ with the format: {instance_name, region, address, status, allocated_storage}
Same as get_instance/1 but returns the complete HTTP reply
Returns the address for the given ‘instance’
Creates a new database instance with name ‘instance’, the provided ‘settings’ and in the desired pricing/performance ‘tier’
Same as insert_instance/5 but returns the complete HTTP reply
Lists all instance classes/tiers for the given cloud provier’s SQL service
Lists all the available databases in the given ‘instance’
Same as list_databases/1 but returns the complete HTTP reply
Lists all database instances for the given cloud credentials. The function returns a list of tuples with the following format: {instance_name, region, address, status, allocated_storage}
Same as list_instances/0 but returns the complete HTTP reply
Restarts the given ‘instance’
Same as restart_instance/1 but returns the complete HTTP reply
Callbacks
Specs
delete_instance(instance :: binary) :: :ok | binary
Deletes the given ‘instance’.
Specs
delete_instance!(instance :: binary) :: HTTPoison.Response.t
Same as delete_instance/1 but returns the complete HTTP reply.
Specs
get_instance(instance :: binary) :: map | binary
Returns a tuple with info about the given ‘instance’ with the format: {instance_name, region, address, status, allocated_storage}
Specs
get_instance!(instance :: binary) :: HTTPoison.Response.t
Same as get_instance/1 but returns the complete HTTP reply.
Specs
get_instance_address(instance :: binary) :: binary
Returns the address for the given ‘instance’.
Specs
insert_instance(instance :: binary, settings :: map | list, {region :: binary, tier :: binary}, {username :: binary, password :: binary}, addresses :: list) ::
:ok |
binary
Creates a new database instance with name ‘instance’, the provided ‘settings’ and in the desired pricing/performance ‘tier’.
The ‘settings’ must be passed as a Map in the format: %{key: value}
Specs
insert_instance!(instance :: binary, settings :: map | list, {region :: binary, tier :: binary}, {username :: binary, password :: binary}, addresses :: list) :: HTTPoison.Response.t
Same as insert_instance/5 but returns the complete HTTP reply.
Specs
list_classes :: [binary]
Lists all instance classes/tiers for the given cloud provier’s SQL service.
Specs
list_databases(instance :: binary) ::
[binary] |
binary
Lists all the available databases in the given ‘instance’.
Specs
list_databases!(instance :: binary) :: HTTPoison.Response.t
Same as list_databases/1 but returns the complete HTTP reply.
Specs
list_instances :: [tuple] | [] | binary
Lists all database instances for the given cloud credentials. The function returns a list of tuples with the following format: {instance_name, region, address, status, allocated_storage}
Specs
list_instances! :: HTTPoison.Response.t
Same as list_instances/0 but returns the complete HTTP reply.
Specs
restart_instance(instance :: binary) :: :ok | binary
Restarts the given ‘instance’.