Add-ons
Add-ons are managed services (databases, caches, etc.) you provision and attach to apps. Use this resource for CRUD, lifecycle, backups, scheduling, and connecting/disconnecting apps.
Access it as client.addons on a Strongly client, or the same path on AsyncStrongly with await. All methods exist on both with identical signatures.
Quick start
from strongly import Strongly
client = Strongly()
# List (auto-paginates as you iterate) # filters: search, type, status
for add-on in client.addons.list():
print(add-on.id)
Methods
Core
list
list(*, search: str | None = None, type: str | None = None, status: str | None = None, limit: int | None = None) -> SyncPaginator[AddonSummary]
List the add-ons you can use, with pagination and filtering.
Each add-on is its summary; retrieve returns the full add-on
(connection details, deployment record, backups) and credentials
its password and connection string.
Parameters
search(str | None, optional): Case-insensitive match on label, description or type.type(str | None, optional): Filter by addon type (e.g."postgres","redis").status(str | None, optional): Filter by status (e.g."running","stopped","error").limit(int | None, optional): Maximum number of items to return (default: all matching items).
create
create(*, label: str, type: str, cpu: str, memory: str, disk: str, description: str | None = None, version: str | None = None, gpu: str | None = None, gpu_type: str | None = None, deployment_mode: str | None = None, cluster_config: Mapping[str, Any] | None = None, backup_config: Mapping[str, Any] | None = None) -> Addon
Create an add-on. It deploys in the background.
The add-on runs at exactly the size given; nothing is assumed. A size
that is not positive, below the type's minimum memory or larger than the
biggest available node (see sizing) raises ValidationError.
The returned add-on is "requested" until the platform accepts its
deploy, then "deploying"; poll retrieve
until status == "running" before reading credentials.
Creation is checked against your budgets and fails with the budget's
reason when a budget blocks it.
A size is the whole workload: Strongly's helper services beside it
(sign-in proxy, outbound proxy, data volume mounts, model cache upload,
metrics) are taken out of it, never added on top (set 4 GB and the workload
uses 4 GB in total). A size too small to hold them is refused naming them.
A CPU, memory, GPU count or disk above the largest allowed machine's room
for one workload raises APIError with status_code 400 naming the
resource and both figures, and nothing is created or changed. Check
client.compute.list_pools() allowed_sizes (max_cpu,
max_memory_gib, max_disk_gib, max_gpus) before a large size.
Parameters
label(str): Display name, unique within your organization.type(str): Addon type, e.g.postgres,mysql,mongodb,redis,rabbitmq,neo4j,milvus,greenplum,surrealdb,kafka,mqtt,duckdb(seelist_types). Use"postgres", not"postgresql".cpu(str): vCPU per node, e.g."0.25","1"or"500m".memory(str): Memory per node, e.g."2GB"or"512MB"(a bare number is GB); at least the type's minimum.disk(str): Persistent storage per node, e.g."10GB".description(str | None, optional): Free-text description.version(str | None, optional): Engine version, one of the type'sversionsfromlist_types(e.g."18"for postgres); omit for itsdefault_version.gpu(str | None, optional): Number of GPUs as a string, e.g."1".gpu_type(str | None, optional): GPU type whengpuis set. One of the typeslist_gpu_optionslists (the admin Compute selection); any other is refused with a 400ValidationError.deployment_mode(str | None, optional):"single"(default) or"cluster". Cluster mode is available formongodb,milvus(2.6 or later) andgreenplum.cluster_config(Mapping[str, Any] | None, optional): Cluster settings whendeployment_mode="cluster":dataNodes,replicationFactor,arbiterEnabled(mongodb),coordinatorNodes(greenplum).backup_config(Mapping[str, Any] | None, optional):{"enabled": bool, "schedule": "hourly"|"daily"|"weekly"|"monthly", "retention": int}.
retrieve
retrieve(addon_id: str) -> Addon
Get one add-on by ID (without its password or connection string).
update
update(addon_id: str, *, label: str | None = None, description: str | None = None, cpu: str | None = None, memory: str | None = None, disk: str | None = None) -> Addon
Rename an add-on, change its description, or resize it.
Resizing (per node for a cluster) is checked against your budgets.
Changing cpu or memory restarts the add-on onto the new size;
disk grows its data volumes while it runs and can never be reduced
(a smaller disk raises ValidationError). Memory must be at least the
type's minimum.
A size is the whole workload: Strongly's helper services beside it
(sign-in proxy, outbound proxy, data volume mounts, model cache upload,
metrics) are taken out of it, never added on top (set 4 GB and the workload
uses 4 GB in total). A size too small to hold them is refused naming them.
A CPU, memory, GPU count or disk above the largest allowed machine's room
for one workload raises APIError with status_code 400 naming the
resource and both figures, and nothing is created or changed. Check
client.compute.list_pools() allowed_sizes (max_cpu,
max_memory_gib, max_disk_gib, max_gpus) before a large size.
Parameters
label(str | None, optional): New display name, unique within your organization.description(str | None, optional): New description.cpu(str | None, optional): CPU cores, e.g."1"or"500m".memory(str | None, optional): Memory, e.g."2GB".disk(str | None, optional): Disk, e.g."20GB"; at least the current size.
delete
delete(addon_id: str) -> None
Delete an add-on and all of its data.
Refused while the add-on is connected to an app, bound by a feature store, attached to an agent or referenced by a workflow.
Lifecycle & actions
start
start(addon_id: str) -> Addon
Start a stopped add-on. Checked against your budgets.
stop
stop(addon_id: str) -> Addon
Stop a running add-on. Its data is kept.
restart
restart(addon_id: str) -> Addon
Restart an add-on. Checked against your budgets.
recover
recover(addon_id: str) -> Addon
Redeploy an add-on that is in the error state.
restore
restore(addon_id: str, backup_id: str) -> AddonRestore
Restore one of the add-on's succeeded backups into it; answers the restore.
Everything the add-on holds is replaced by what the backup holds:
data written after the backup is lost. The add-on keeps running while
it restores (its type's restore_effect in list_types says
what its clients see). The restore runs in the background: follow it
with get_restore. Refused if the add-on is not running, the
backup is not a succeeded backup of this add-on, or a backup or restore
of the add-on is in progress.
Parameters
addon_id(str): The add-on to restore into.backup_id(str): Thebackup_idof a succeeded backup of this add-on.
Other
add_member
add_member(resource_id: str, *, user_id: str, role: str) -> Permissions
Share the resource with a user.
Parameters
resource_id(str): The resource's id.user_id(str): The user to share it with.role(str):"editor"(use and change it) or"user"(use it only; types without a use-only tier, such as knowledge bases, take"editor"only).
backup
backup(addon_id: str) -> AddonBackup
Start a backup of the running add-on now; answers the backup.
The backup runs in the background: get_backup follows it to its
outcome (succeeded with size_bytes, or failed with error). Raises
UnprocessableEntityError if the add-on is not running or a backup is
already in progress.
connect_app
connect_app(addon_id: str, app_id: str) -> Addon
Connect an add-on to an app you can edit.
The app receives the add-on's connection details in its
STRONGLY_SERVICES environment variable on its next deploy.
credentials
credentials(addon_id: str) -> AddonCredentials
Get the decrypted connection details.
(host, port, username, password, database, connection string). Called from a workspace, the add-on must be attached to that workspace (a workspace reaches only the services it is attached to): otherwise the call is refused (409) with how to attach it.
disconnect_app
disconnect_app(addon_id: str, app_id: str) -> None
Disconnect an add-on from an app.
get_backup
get_backup(addon_id: str, backup_id: str) -> AddonBackup
Return one of the add-on's backups (follow one backup started).
Parameters
addon_id(str): The add-on.backup_id(str): The backup.
get_backup_config
get_backup_config(addon_id: str) -> AddonBackupConfig
Return the add-on's automated backup settings.
Parameters
addon_id(str): The add-on.
get_restore
get_restore(addon_id: str, restore_id: str) -> AddonRestore
Return one of the add-on's restores (follow one restore started).
Parameters
addon_id(str): The add-on.restore_id(str): The restore.
list_backups
list_backups(addon_id: str, *, limit: int | None = None) -> SyncPaginator[AddonBackup]
List the add-on's backups, newest first, a page at a time.
Each backup carries its status (starting, in_progress, succeeded,
failed or skipped), size_bytes and error or reason.
Parameters
addon_id(str): The add-on.limit(int | None, optional): The most backups to return; every one when omitted.
list_restores
list_restores(addon_id: str, *, limit: int | None = None) -> SyncPaginator[AddonRestore]
List the add-on's restores, newest first, a page at a time.
Each restore carries the backup_id it restored, its status
(starting, in_progress, succeeded or failed) and error.
Parameters
addon_id(str): The add-on.limit(int | None, optional): The most restores to return; every one when omitted.
list_types
list_types() -> list[AddonType]
List the add-on types you can create, with what each is for.
Returns the platform catalog (GET /addon-types): each entry's
type is the value to pass as type to create.
logs
logs(addon_id: str, *, lines: int | None = None, since: str | None = None, container: str | None = None) -> list[AddonLogEntry]
Get recent log lines, oldest first. Empty once a stopped add-on's container is gone.
Parameters
addon_id(str): The addon ID.lines(int | None, optional): Number of most recent lines, 1-1000 (default 100).since(str | None, optional): ISO 8601 timestamp; only lines logged at or after it.container(str | None, optional): Container name, for add-ons with more than one container.
metrics
metrics(addon_id: str) -> AddonMetrics
Measure the running add-on now (takes about 6 seconds).
Returns CPU, memory, disk, network throughput, connections, native
response time and instance health; see AddonMetrics. Raises
ConflictError (409) when the add-on is not running.
permissions
permissions(resource_id: str) -> Permissions
Return who can reach the resource: its owner, members and their roles, and visibility.
Parameters
resource_id(str): The resource's id.
remove_member
remove_member(resource_id: str, user_id: str) -> None
Stop sharing the resource with a user.
Parameters
resource_id(str): The resource's id.user_id(str): The user to stop sharing it with.
schedule
schedule(addon_id: str) -> AddonSchedule
Get the add-on's automatic start/stop schedule.
set_visibility
set_visibility(resource_id: str, visibility: str) -> Permissions
Make the resource public (every user can find and use it) or private.
Parameters
resource_id(str): The resource's id.visibility(str):"public"or"private".
sizing
sizing() -> list[AddonNodeSize]
List the node sizes an add-on can be placed on, smallest first.
The add-on lands on the smallest one that fits it, and a size larger than the biggest is refused.
stats
stats(*, search: str | None = None, type: str | None = None, status: str | None = None) -> AddonStats
Count the add-ons list lists, with the same filters.
It counts them in all, by status and by type.
Every add-on the list holds for you with these filters is counted (not a page); a
status of requested is an add-on whose deploy is not yet accepted.
Parameters
search, type, status(optional): Aslisttakes them.
Returns
AddonStats:total,by_statusandby_type(most first).
status
status(addon_id: str) -> AddonLiveStatus
Refresh and return the add-on's live status.
Returns {"status": ..., "message": ..., "details": {...}} and
updates the stored status.
time_series
time_series(addon_id: str, *, window: SeriesWindow | None = None, granularity: SeriesGranularity | None = None) -> ResourceUsageSeries
Get an add-on's CPU and memory over time, from its hourly usage records.
Each point holds the mean used (weighted by the minutes it ran), its busiest hour, and its
size; None where it did not run.
Every hour (24h) or UTC day (7d, 30d) of the window is a point, from the one
its start falls in to the current one; a quiet point counts zero.
Parameters
addon_id(str): The add-on ID.window({"24h", "7d", "30d"} | None, optional): The window. The API's default is"30d".granularity({"hourly", "daily"} | None, optional):hourlyfor24h,dailyotherwise; the window's when left out (another is refused).
update_backup_config
update_backup_config(addon_id: str, *, enabled: bool, schedule: str, retention: int) -> AddonBackupConfig
Set the add-on's backup settings; answers them as get_backup_config does.
Parameters
enabled(bool): Whether automatic backups are enabled.schedule(str):"hourly","daily","weekly"or"monthly".retention(int): Number of successful backups to keep (at least 1); applies to manual and scheduled backups.
update_schedule
update_schedule(addon_id: str, *, enabled: bool, timezone: str, start_time: str, stop_time: str, days_of_week: Sequence[int], skip_holidays: bool | None = None, holiday_calendar: str | None = None) -> AddonSchedule
Replace the add-on's automatic start/stop schedule.
Parameters
enabled(bool): Enable or disable the schedule.timezone(str): IANA timezone (e.g."America/New_York").start_time(str): Start time inHH:MM(24-hour) format.stop_time(str): Stop time inHH:MM(24-hour) format, different fromstart_time. Earlier thanstart_timeis the next morning: the window opens on a listed day and runs past midnight.days_of_week(Sequence[int]): Days to run, 1 (Monday) through 7 (Sunday).skip_holidays(bool | None, optional): Stay stopped on holidays (default false).holiday_calendar(str | None, optional):"us"(the eleven US federal holidays),"uk"(bank holidays of England and Wales) or"none".