Hexoku.API.SSL

SSL Endpoint is a public address serving custom SSL cert for HTTPS traffic to a Heroku app. Note that an app must have the ssl:endpoint addon installed before it can provision an SSL Endpoint using these APIs.

Attributes

id
unique identifier of item generated by Heroku
name
unique name of item provided by the user
certificate_chain
raw contents of the public certificate chain (eg: .crt or .pem file)
cname
canonical name record, the address to point a domain at
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, payload)

Create a new SSL endpoint

create(client, app, certificate_chain, private_key)

Helper to create a new SSL endpoint

delete(client, app, endpoint)

Delete existing SSL endpoint

info(client, app, endpoint)

Info for existing SSL endpoint

list(client, app)

List existing SSL endpoints

update(client, app, endpoint, payload)

Update an existing SSL endpoint

Functions

create(client, app, payload)

Specs:

Create a new SSL endpoint.

Payload Attributes

certificate_chain required
raw contents of the public certificate chain (eg: .crt or .pem file)
cname required
canonical name record, the address to point a domain at
preprocess
allow Heroku to modify an uploaded public certificate chain if deemed advantageous by adding missing intermediaries, stripping unnecessary ones, etc. default: true

Examples

client |> Hexoku.API.SSL.create("myapp", "example", %{
    certificate_chain: "-----BEGIN CERTIFICATE----- ...",
    private_key: "-----BEGIN RSA PRIVATE KEY----- ..."
})
Source
create(client, app, certificate_chain, private_key)

Specs:

  • create(Hexoku.Client.t, binary, binary, boolean) :: Map.t

Helper to create a new SSL endpoint.

Examples

client |> Hexoku.API.SSL.create(
    "myapp",
    "-----BEGIN CERTIFICATE----- ...",
    "-----BEGIN RSA PRIVATE KEY----- ..."
)
Source
delete(client, app, endpoint)

Specs:

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

Delete existing SSL endpoint.

Examples

client |> Hexoku.API.SSL.delete("myapp", "example")
Source
info(client, app, endpoint)

Specs:

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

Info for existing SSL endpoint.

Examples

client |> Hexoku.API.SSL.info("myapp", "example")
Source
list(client, app)

Specs:

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

List existing SSL endpoints.

Examples

client |> Hexoku.API.SSL.list("myapp")
Source
update(client, app, endpoint, payload)

Specs:

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

Update an existing SSL endpoint.

Payload Attributes

certificate_chain required
raw contents of the public certificate chain (eg: .crt or .pem file)
cname required
canonical name record, the address to point a domain at
preprocess
allow Heroku to modify an uploaded public certificate chain if deemed advantageous by adding missing intermediaries, stripping unnecessary ones, etc. default: true
rollback
indicates that a rollback should be performed

Examples

client |> Hexoku.API.SSL.update("myapp", "example", %{
    certificate_chain: "-----BEGIN CERTIFICATE----- ...",
    private_key: "-----BEGIN RSA PRIVATE KEY----- ..."
})
Source