Sanoma Cloud
Sanoma Cloud for Sanoma: the company's database and host in Sanoma's own accounts, declared like any other.
Package @sanoma-ai/connector-sanoma-cloud, version 0.11.24. Its README, with how to install and connect it, is on GitHub.
Resource types, which a data file under resources/ declares: cloud.database, cloud.host.
database
import
Find a database by its binding id and read it; gone when there is none
Input
- idstringrequired
at least 1 character
Output
- idstringrequired
at least 1 character
- gonebooleanrequired
- stateobject
Fields
- namestring
The company's slug, the host's own: by default the one Cloud company the token holds, which the host makes
matches ^[a-z0-9](?:[a-z0-9-]{1,38}[a-z0-9])?$
- region"us-east" | "us-west" | "eu-central" | "eu-west" | "ap-southeast"
Where it runs, one of the Cloud's regions (
us-eastby default); it cannot move - idstring | null
The database's id at the Cloud, which it sets
- healthyboolean | null
Whether the Cloud says it is up
- namestring
- handlestring
The driver's data for the object, opaque: pass it back unchanged
read
Read a database as it is now; gone when it no longer exists
Input
- idstringrequired
at least 1 character
- staterecord of any
- handlestring
The driver's data for the object, opaque: pass it back unchanged
Output
- idstringrequired
at least 1 character
- gonebooleanrequired
- stateobject
Fields
- namestring
The company's slug, the host's own: by default the one Cloud company the token holds, which the host makes
matches ^[a-z0-9](?:[a-z0-9-]{1,38}[a-z0-9])?$
- region"us-east" | "us-west" | "eu-central" | "eu-west" | "ap-southeast"
Where it runs, one of the Cloud's regions (
us-eastby default); it cannot move - idstring | null
The database's id at the Cloud, which it sets
- healthyboolean | null
Whether the Cloud says it is up
- namestring
- handlestring
The driver's data for the object, opaque: pass it back unchanged
plan
Plan how apply would make a database match its declaration (or delete it, given none); nothing changes
Input
- idstring
at least 1 character
- staterecord of any
- handlestring
The driver's data for the object, opaque: pass it back unchanged
- desiredrecord of any
The declared fields; a write-only one may hold a secret marker
Output
- action"none" | "create" | "update" | "replace" | "delete"required
- plannedrecord of any
- unknownstring[]required
- replacestring[]required
The fields whose change replaces the object: not empty exactly when
replace
create
Create a database as declared
Input
- desiredrecord of anyrequired
The declared fields; a write-only one may hold a secret marker
Output
- idstringrequired
at least 1 character
- stateobjectrequired
Fields
- namestring
The company's slug, the host's own: by default the one Cloud company the token holds, which the host makes
matches ^[a-z0-9](?:[a-z0-9-]{1,38}[a-z0-9])?$
- region"us-east" | "us-west" | "eu-central" | "eu-west" | "ap-southeast"
Where it runs, one of the Cloud's regions (
us-eastby default); it cannot move - idstring | null
The database's id at the Cloud, which it sets
- healthyboolean | null
Whether the Cloud says it is up
- namestring
- handlestring
The driver's data for the object, opaque: pass it back unchanged
update
Change a database to match its declaration, replacing it where a field cannot change in place
Input
- idstringrequired
at least 1 character
- staterecord of any
- handlestring
The driver's data for the object, opaque: pass it back unchanged
- desiredrecord of anyrequired
The declared fields; a write-only one may hold a secret marker
- expectobject
Fields
- action"none" | "create" | "update" | "replace" | "delete"required
- replacestring[]required
Output
- idstringrequired
at least 1 character
- stateobjectrequired
Fields
- namestring
The company's slug, the host's own: by default the one Cloud company the token holds, which the host makes
matches ^[a-z0-9](?:[a-z0-9-]{1,38}[a-z0-9])?$
- region"us-east" | "us-west" | "eu-central" | "eu-west" | "ap-southeast"
Where it runs, one of the Cloud's regions (
us-eastby default); it cannot move - idstring | null
The database's id at the Cloud, which it sets
- healthyboolean | null
Whether the Cloud says it is up
- namestring
- handlestring
The driver's data for the object, opaque: pass it back unchanged
delete
Delete a database; done already when it is gone
Input
- idstringrequired
at least 1 character
- staterecord of any
- handlestring
The driver's data for the object, opaque: pass it back unchanged
Output
- idstringrequired
at least 1 character
- gonetruerequired
storeUrl
Store nothing: Sanoma Cloud binds the database's URL to the company's host itself, so no store here needs it
Input
- idstringrequired
The database's binding, the company's slug
at least 1 character
- exportstringrequired
The data file's export that declares the database, such as
storematches ^[A-Za-z_][A-Za-z0-9_]*$
Output
- storedfalserequired
- reasonstringrequired
Why nothing is stored
host
import
Find a host by its name or its binding id and read it; gone when there is none
Input
- idstringrequired
at least 1 character
Output
- idstringrequired
at least 1 character
- gonebooleanrequired
- stateobject
Fields
- namestring
The company's slug, its address
<slug>.sanoma.work: by default the slug ofhostname, else the repository's namematches ^[a-z0-9](?:[a-z0-9-]{1,38}[a-z0-9])?$
- hostnamestring
The company's address,
<slug>.sanoma.work(the only one for now), which names its slug whennameis left outmatches ^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$
- databasestring
The declared Cloud database it runs on, such as
store: the Cloud binds its URL to the host itselfat least 1 character
- sourcestring
The company repository, an override: by default the one the app runs from (its
origin, or the GitHub repository its data file declares)at least 1 character
- refstring
The branch it runs, an override: by default the repository's default branch
at least 1 character
- revisionstring | null
The commit it runs, which apply sets from
ref - port3000
The port the runtime listens on: the Cloud's, 3000; never declared
- domainsrecord of string
Deprecated: declare
hostname. The company's address asapp(<slug>.sanoma.work)each value: matches ^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$
- urlstring | null
Where the company answers,
https://<slug>.sanoma.work, which the Cloud sets - healthyboolean | null
Whether the Cloud says it runs
- namestring
- handlestring
The driver's data for the object, opaque: pass it back unchanged
read
Read a host as it is now; gone when it no longer exists
Input
- idstringrequired
at least 1 character
- staterecord of any
- handlestring
The driver's data for the object, opaque: pass it back unchanged
Output
- idstringrequired
at least 1 character
- gonebooleanrequired
- stateobject
Fields
- namestring
The company's slug, its address
<slug>.sanoma.work: by default the slug ofhostname, else the repository's namematches ^[a-z0-9](?:[a-z0-9-]{1,38}[a-z0-9])?$
- hostnamestring
The company's address,
<slug>.sanoma.work(the only one for now), which names its slug whennameis left outmatches ^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$
- databasestring
The declared Cloud database it runs on, such as
store: the Cloud binds its URL to the host itselfat least 1 character
- sourcestring
The company repository, an override: by default the one the app runs from (its
origin, or the GitHub repository its data file declares)at least 1 character
- refstring
The branch it runs, an override: by default the repository's default branch
at least 1 character
- revisionstring | null
The commit it runs, which apply sets from
ref - port3000
The port the runtime listens on: the Cloud's, 3000; never declared
- domainsrecord of string
Deprecated: declare
hostname. The company's address asapp(<slug>.sanoma.work)each value: matches ^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$
- urlstring | null
Where the company answers,
https://<slug>.sanoma.work, which the Cloud sets - healthyboolean | null
Whether the Cloud says it runs
- namestring
- handlestring
The driver's data for the object, opaque: pass it back unchanged
plan
Plan how apply would make a host match its declaration (or delete it, given none); nothing changes
Input
- idstring
at least 1 character
- staterecord of any
- handlestring
The driver's data for the object, opaque: pass it back unchanged
- desiredrecord of any
The declared fields; a write-only one may hold a secret marker
Output
- action"none" | "create" | "update" | "replace" | "delete"required
- plannedrecord of any
- unknownstring[]required
- replacestring[]required
The fields whose change replaces the object: not empty exactly when
replace
create
Create a host as declared
Input
- desiredrecord of anyrequired
The declared fields; a write-only one may hold a secret marker
Output
- idstringrequired
at least 1 character
- stateobjectrequired
Fields
- namestring
The company's slug, its address
<slug>.sanoma.work: by default the slug ofhostname, else the repository's namematches ^[a-z0-9](?:[a-z0-9-]{1,38}[a-z0-9])?$
- hostnamestring
The company's address,
<slug>.sanoma.work(the only one for now), which names its slug whennameis left outmatches ^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$
- databasestring
The declared Cloud database it runs on, such as
store: the Cloud binds its URL to the host itselfat least 1 character
- sourcestring
The company repository, an override: by default the one the app runs from (its
origin, or the GitHub repository its data file declares)at least 1 character
- refstring
The branch it runs, an override: by default the repository's default branch
at least 1 character
- revisionstring | null
The commit it runs, which apply sets from
ref - port3000
The port the runtime listens on: the Cloud's, 3000; never declared
- domainsrecord of string
Deprecated: declare
hostname. The company's address asapp(<slug>.sanoma.work)each value: matches ^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$
- urlstring | null
Where the company answers,
https://<slug>.sanoma.work, which the Cloud sets - healthyboolean | null
Whether the Cloud says it runs
- namestring
- handlestring
The driver's data for the object, opaque: pass it back unchanged
update
Change a host to match its declaration, replacing it where a field cannot change in place
Input
- idstringrequired
at least 1 character
- staterecord of any
- handlestring
The driver's data for the object, opaque: pass it back unchanged
- desiredrecord of anyrequired
The declared fields; a write-only one may hold a secret marker
- expectobject
Fields
- action"none" | "create" | "update" | "replace" | "delete"required
- replacestring[]required
Output
- idstringrequired
at least 1 character
- stateobjectrequired
Fields
- namestring
The company's slug, its address
<slug>.sanoma.work: by default the slug ofhostname, else the repository's namematches ^[a-z0-9](?:[a-z0-9-]{1,38}[a-z0-9])?$
- hostnamestring
The company's address,
<slug>.sanoma.work(the only one for now), which names its slug whennameis left outmatches ^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$
- databasestring
The declared Cloud database it runs on, such as
store: the Cloud binds its URL to the host itselfat least 1 character
- sourcestring
The company repository, an override: by default the one the app runs from (its
origin, or the GitHub repository its data file declares)at least 1 character
- refstring
The branch it runs, an override: by default the repository's default branch
at least 1 character
- revisionstring | null
The commit it runs, which apply sets from
ref - port3000
The port the runtime listens on: the Cloud's, 3000; never declared
- domainsrecord of string
Deprecated: declare
hostname. The company's address asapp(<slug>.sanoma.work)each value: matches ^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$
- urlstring | null
Where the company answers,
https://<slug>.sanoma.work, which the Cloud sets - healthyboolean | null
Whether the Cloud says it runs
- namestring
- handlestring
The driver's data for the object, opaque: pass it back unchanged
delete
Delete a host; done already when it is gone
Input
- idstringrequired
at least 1 character
- staterecord of any
- handlestring
The driver's data for the object, opaque: pass it back unchanged
Output
- idstringrequired
at least 1 character
- gonetruerequired
company
available
Whether the address <slug>.sanoma.work is free, or already the account's own company (cloud-available)
Input
- slugstringrequired
The company's slug
matches ^[a-z0-9](?:[a-z0-9-]{1,38}[a-z0-9])?$
Output
- availablebooleanrequired
Nobody holds it: going live takes it
- yoursbooleanrequired
The token's account holds it already
repository
Make the company's repository, empty, with the Sanoma.work GitHub App in the account it is installed on, unless the company has one (cloud-signup, part repository); its owner and name
Input
- slugstringrequired
The company's slug
matches ^[a-z0-9](?:[a-z0-9-]{1,38}[a-z0-9])?$
Output
- ownerstringrequired
matches ^[\w-]+$
- namestringrequired
matches ^(?!\.\.?$)[\w.-]+$
invite
A one-use link that signs the account's own email in on the company's host, minted by the Cloud (cloud-invite)
Input
- slugstringrequired
The company's slug
matches ^[a-z0-9](?:[a-z0-9-]{1,38}[a-z0-9])?$
- emailstringrequired
format email, matches ^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
Output
- urlstringrequired
The one-use invite link
These pages describe sanoma 0.11.24.