Hexoku.API.Addons

Add-ons represent add-ons that have been provisioned for an app.

Attributes

id
unique identifier of item generated by Heroku
name
unique name of item
addon_service:id
unique identifier of this addon-service
addon_service:name
unique name of this addon-service
config_vars
config vars associated with this application
plan:id
unique identifier of this plan
plan:name
unique name of this plan
provider_id
id of this add-on with its provider
created_at
when item was created
updated_at
when item was last modified

For more info read the Heroku API Reference

Source

Summary

create(client, app, plan, config \\ %{})

Create a new add-on

delete(client, app, addon)

Delete an existing add-on

info(client, app, addon)

Info for an existing add-on

list(client, app)

List existing add-ons

update(client, app, addon, plan)

Change add-on plan

Functions

create(client, app, plan, config \\ %{})

Create a new add-on.

Examples

client |> Hexoku.API.Addons.create("myapp", "heroku-postgresql:dev")
client |> Hexoku.API.Addons.create("myapp", "heroku-postgresql:dev", %{
    "db-version": "1.2.3"
})
Source
delete(client, app, addon)

Specs:

  • delete(Hexoku.Client.t, binary, binary) :: Map.t

Delete an existing add-on.

Examples

client |> Hexoku.API.Addons.delete("myapp", "heroku-postgresql-teal")
Source
info(client, app, addon)

Specs:

  • info(Hexoku.Client.t, binary, binary) :: Map.t

Info for an existing add-on.

Examples

client |> Hexoku.API.Addons.info("myapp", "heroku-postgresql-teal")
Source
list(client, app)

Specs:

  • list(Hexoku.Client.t, binary) :: [Map.t]

List existing add-ons.

Examples

client |> Hexoku.API.Addons.list("myapp")
Source
update(client, app, addon, plan)

Specs:

  • update(Hexoku.Client.t, binary, binary, binary) :: Map.t

Change add-on plan.

Some add-ons may not support changing plans. In that case, an error will be returned.

Examples

client |> Hexoku.API.Addons.update("myapp", "heroku-postgresql-teal", "heroku-postgresql:dev")
Source