Update database compute settings
Set the database’s auto-suspend window: 0 keeps the database running (it never suspends, and keeps using compute capacity), otherwise 60 to 86400 seconds. The same setting, values and edit-access rule as auto-suspend in the database’s Settings in Athena; the change applies at once and does not restart or wake the database.
A database suspends (scales to zero) after suspend_timeout_seconds without activity; GET/PATCH /databases/{asset_id}/settings read and set that window, and 0 keeps it running. Reading the compute status or the settings never wakes a suspended database. Two things do: POST /databases/{asset_id}/wake, which answers at once while the compute starts, or any request that runs SQL on it, such as POST /databases/{asset_id}/sql, which waits for the compute up to 120 seconds; if the compute is still starting then, the answer is 503 with Retry-After and the statement did not run. A cold start usually takes 30 seconds to 2 minutes.
Authentication
Path parameters
Headers
Request
Seconds without activity after which the database suspends (scales to zero). 0 means it never suspends: the compute keeps running, and keeps using capacity, until you change this. Otherwise 60 to 86400 (24 hours). A new database starts with 1800 (30 minutes). The same setting as auto-suspend in the database’s Settings in Athena.
Response
Seconds without activity after which the database suspends (scales to zero). 0 means it never suspends: the compute keeps running, and keeps using capacity, until you change this. Otherwise 60 to 86400 (24 hours). A new database starts with 1800 (30 minutes). The same setting as auto-suspend in the database’s Settings in Athena.
