Skip to content
Luna
Esc
↑↓navigate↵open⌘Jpreview

Replace a tenant's settings

Replaces a tenant’s settings with the ones you send: its quotas, custom hostnames, grants, outbound handler, retention, telemetry export and tags. A setting you leave out goes back to its default. The tenant’s keys and its public hostname stay as they are.

PUT/_luna/tenants/{tenant}
Authorization
AuthorizationBearer token · headerrequired

An account key (la_…), an API key (lt_…) or a session token (ls_…). The scopes listed are the permissions the operation needs.

Scopes:tenants:write
Path parameters
tenantstringrequired

The tenant, by its full name.

Request body
requiredapplication/json
quotasTenantQuotas

The most a tenant can use. A limit that is null or left out is not set here, so the plan's limit holds.

default: {"cpuPercent":null,"requestsPerSecond":null,"sandboxes":null,"storageBytes":null}
Show properties
requestsPerSecondnumber<double> | null

The most requests a second.

default: null
cpuPercentinteger<int32> | null

The most CPU the tenant's microVM can use, as a percent of one core.

min 0 · default: null
storageBytesinteger<int64> | null

The most storage, in bytes.

min 0 · default: null
sandboxesinteger<int32> | null

The most sandboxes running at once.

min 0 · default: null
lunaMemoryMibinteger<int64> | null

The most memory one luna can declare or use, in MiB.

min 0 · default: null
lunaCpunumber<double> | null

The most cores one luna can declare or use.

default: null
lunaDefaultMemoryMibinteger<int64> | null

The memory a luna has when it declares none, in MiB.

min 0 · default: null
lunaDefaultCpunumber<double> | null

The cores a luna has when it declares none.

default: null
tenantMemoryMibinteger<int64> | null

The most memory the tenant's microVM can grow to, in MiB.

min 0 · default: null
lunaReserveboolean | null

Whether the tenant's lunas can reserve their limits. The plan decides when left out.

default: null
hostnamesstring[]

Custom routes to the tenant, each as host or host/first-path-segment.

default: []
grantsobject

The platform luna types the tenant's code can call, each under the service name the code uses.

default: {}
outboundOutboundHandler | null
default: null
Show properties
One of:
OutboundHandler
lunastringrequired

The platform's luna type.

keyobjectrequired

The key of the luna to call.

handlerstringrequired

The handler to call.

null
null
retentionDaysinteger<int32> | null

How many days the tenant's logs and traces are kept. The deployment's setting holds when left out.

min 0 · default: null
historyDaysinteger<int32> | null

How many days back the tenant's lunas can be restored or forked. At most what its plan keeps, which is the default. A change takes effect when its workers next start.

min 0 · default: null
otlpOtlpConfig | null
default: null
Show properties
One of:
OtlpConfig
endpointstringrequired

The base URL of an OTLP collector. Luna adds /v1/logs and the other OTLP paths to it.

headersobject

Headers sent with every request, usually an API key. A response shows each value as ***.

null
null
labelsobject

Your own tags, for finding and grouping tenants. Left out of a response when there are none.

default: {}
hostLabelstring | null

The label of the tenant's public hostname, <label>.<app domain>. Luna sets it once. A request cannot change it.

default: null
Responses
200

The settings are saved.

okbooleanrequired

Always true.

default

The request failed. The status says how and error.message says why.

errorErrorDetailrequired
Show properties
codestring | null

A code for programs to branch on, when the error has one.

messagestringrequired

What went wrong, in a sentence a person can read.

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PUT 'https://luna.example.com/_luna/tenants/string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "quotas": {
    "cpuPercent": null,
    "requestsPerSecond": null,
    "sandboxes": null,
    "storageBytes": null
  },
  "hostnames": [],
  "grants": {},
  "outbound": null,
  "retentionDays": null,
  "historyDays": null,
  "otlp": null,
  "labels": {},
  "hostLabel": null
}'
Response
{
  "ok": true
}

Was this page helpful?