Tenant methods: update, delete
The Tenant Verbs update, delete as typed SDK methods, with inputs, result, refusals and an example.
Reference for Tenant, one group of Tenant methods.
Tenant.update
Changes the given properties of a Tenant. Verb page.
interface TenantVerbs {
update(input: TenantUpdateInput, options?: SB.CallOptions): SB.Call<Tenant>
}Emits Tenant.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Tenant. |
placement | string | Where the Tenant sits in an address: path or host. | |
apiVersion | string | The API version an unversioned call with this Tenant’s keys answers at; set at creation, moved only by pin. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
tenant | Tenant | required | The Tenant. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
import { $ } from 'startup-builder'
const tenant = await $.Tenant.update({ id: 'ten_Bu63f0he26', placement: 'path' })Tenant.delete
Deletes a Tenant: a soft delete that keeps its history, undone by Thing.restore. Verb page.
interface TenantVerbs {
delete(input: TenantDeleteInput, options?: SB.CallOptions): SB.Call<Tenant>
}Emits Tenant.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Tenant. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
tenant | Tenant | required | The Tenant. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
import { $ } from 'startup-builder'
const tenant = await $.Tenant.delete({ id: 'ten_Bu63f0he26' })