Complete reference of every operation, grouped by resource. See the README for usage and configuration.
import os
from dedalus_sdk import Dedalus
client = Dedalus (
x_api_key = os .environ .get ("DEDALUS_X_API_KEY" ),
)
page = client .machines .list ()
machine = client .machines .create (
autosleep = "300s" ,
memory_mib = 4096 ,
storage_gib = 10 ,
vcpu = 1 ,
idempotency_key = "" ,
)
machine = client .machines .retrieve (
machine_id = "017f22e2-79b0-7cc3-98c4-dc0c0c07398f" ,
)
machine = client .machines .update (
machine_id = "017f22e2-79b0-7cc3-98c4-dc0c0c07398f" ,
idempotency_key = "" ,
)
machine = client .machines .delete (
machine_id = "017f22e2-79b0-7cc3-98c4-dc0c0c07398f" ,
idempotency_key = "" ,
)
machine = client .machines .sleep (
machine_id = "017f22e2-79b0-7cc3-98c4-dc0c0c07398f" ,
idempotency_key = "" ,
)
machine = client .machines .wake (
machine_id = "017f22e2-79b0-7cc3-98c4-dc0c0c07398f" ,
idempotency_key = "" ,
)
Reboot a machine with fresh memory
Checkpoints files and replaces the runtime. The machine ID and filesystem are preserved. RAM, processes, and temporary mounts are cleared. Poll the machine until its phase is running. Retry the same Idempotency-Key after a lost response.
machine = client .machines .reboot (
machine_id = "017f22e2-79b0-7cc3-98c4-dc0c0c07398f" ,
idempotency_key = "" ,
)
page = client .machines .ssh .list (
machine_id = "017f22e2-79b0-7cc3-98c4-dc0c0c07398f" ,
)
ssh = client .machines .ssh .create (
machine_id = "017f22e2-79b0-7cc3-98c4-dc0c0c07398f" ,
public_key = "" ,
idempotency_key = "" ,
)
ssh = client .machines .ssh .retrieve (
machine_id = "017f22e2-79b0-7cc3-98c4-dc0c0c07398f" ,
session_id = "sessionID" ,
)
ssh = client .machines .ssh .delete (
machine_id = "017f22e2-79b0-7cc3-98c4-dc0c0c07398f" ,
session_id = "sessionID" ,
idempotency_key = "" ,
)
page = client .machines .executions .list (
machine_id = "017f22e2-79b0-7cc3-98c4-dc0c0c07398f" ,
)
execution = client .machines .executions .create (
machine_id = "017f22e2-79b0-7cc3-98c4-dc0c0c07398f" ,
command = ["" ],
idempotency_key = "" ,
)
execution = client .machines .executions .retrieve (
machine_id = "017f22e2-79b0-7cc3-98c4-dc0c0c07398f" ,
execution_id = "executionID" ,
)
execution = client .machines .executions .delete (
machine_id = "017f22e2-79b0-7cc3-98c4-dc0c0c07398f" ,
execution_id = "executionID" ,
idempotency_key = "" ,
)
execution = client .machines .executions .output (
machine_id = "017f22e2-79b0-7cc3-98c4-dc0c0c07398f" ,
execution_id = "executionID" ,
)
page = client .machines .executions .events (
machine_id = "017f22e2-79b0-7cc3-98c4-dc0c0c07398f" ,
execution_id = "executionID" ,
)
Direction
Type
Response
Status
log = client .machines .executions .logs .retrieve (
machine_id = "017f22e2-79b0-7cc3-98c4-dc0c0c07398f" ,
execution_id = "executionID" ,
)
Reauthorize execution log publication
Direction
Type
Response
Status
log = client .machines .executions .logs .reauthorize (
machine_id = "017f22e2-79b0-7cc3-98c4-dc0c0c07398f" ,
execution_id = "executionID" ,
idempotency_key = "" ,
)
Create execution log read token
log = client .machines .executions .logs .create_token (
machine_id = "017f22e2-79b0-7cc3-98c4-dc0c0c07398f" ,
execution_id = "executionID" ,
idempotency_key = "" ,
)
Read this machine's RAM autoresizing settings
autoresizing = client .machines .autoresizing .retrieve (
machine_id = "017f22e2-79b0-7cc3-98c4-dc0c0c07398f" ,
)
Set this machine's RAM autoresizing settings
autoresizing = client .machines .autoresizing .update (
machine_id = "017f22e2-79b0-7cc3-98c4-dc0c0c07398f" ,
enabled = False ,
idempotency_key = "" ,
)
Organization Autoresizing
Read organization RAM autoresizing policy
Direction
Type
Response
Policy
autoresizing = client .organization .autoresizing .retrieve ()
Set organization RAM autoresizing policy
autoresizing = client .organization .autoresizing .update (
enabled = False ,
idempotency_key = "" ,
)