lattice_create_database_instance
Provision a database instance on a worker. Creates a real container with your chosen engine (MySQL, MariaDB, or PostgreSQL) and auto-allocates a free port.
Instructions
Provision a database instance on a worker. Creates a real container. Omit port to have a free one allocated automatically — that is the recommended path; a port already in use returns 409 naming the conflict
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Instance name (must be unique) | |
| port | No | Host port to expose. Omit to auto-allocate a free port from the managed range (20000-29999) | |
| engine | Yes | Database engine | |
| password | No | Application user's password | |
| username | No | Application user to create | |
| cpu_limit | No | CPU limit in cores | |
| worker_id | Yes | Worker to provision on | |
| memory_limit | No | Memory limit in MEGABYTES (the API converts to bytes; values under 6MB are rejected by Docker) | |
| database_name | No | Initial database to create | |
| root_password | No | Root/superuser password | |
| engine_version | No | Engine version tag; the API picks a default when omitted | |
| retention_count | No | How many automatic snapshots to keep | |
| snapshot_schedule | No | Cron expression for automatic snapshots | |
| adopt_existing_volume | No | Reuse a leftover data volume of the same name. Off by default — the engine skips initialisation when its data directory is non-empty, so it keeps its OLD credentials while the API records the new ones, and nothing looks wrong until a connection fails | |
| backup_destination_id | No | Backup destination for snapshots |