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

delete_instance(instance)

Specs

delete_instance(instance :: binary) :: :ok | binary

Deletes the given ‘instance’.

delete_instance!(instance)

Specs

delete_instance!(instance :: binary) :: HTTPoison.Response.t

Same as delete_instance/1 but returns the complete HTTP reply.

get_instance(instance)

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}

get_instance!(instance)

Specs

get_instance!(instance :: binary) :: HTTPoison.Response.t

Same as get_instance/1 but returns the complete HTTP reply.

get_instance_address(instance)

Specs

get_instance_address(instance :: binary) :: binary

Returns the address for the given ‘instance’.

insert_instance(instance, settings, {}, {}, addresses)

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}

insert_instance!(instance, settings, {}, {}, addresses)

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.

list_classes()

Specs

list_classes :: [binary]

Lists all instance classes/tiers for the given cloud provier’s SQL service.

list_databases(instance)

Specs

list_databases(instance :: binary) ::
  [binary] |
  binary

Lists all the available databases in the given ‘instance’.

list_databases!(instance)

Specs

list_databases!(instance :: binary) :: HTTPoison.Response.t

Same as list_databases/1 but returns the complete HTTP reply.

list_instances()

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}

list_instances!()

Specs

list_instances! :: HTTPoison.Response.t

Same as list_instances/0 but returns the complete HTTP reply.

restart_instance(instance)

Specs

restart_instance(instance :: binary) :: :ok | binary

Restarts the given ‘instance’.

restart_instance!(instance)

Specs

restart_instance!(instance :: binary) :: HTTPoison.Response.t

Same as restart_instance/1 but returns the complete HTTP reply.