Manage Machines
Use these commands to inspect a machine or change its configuration. To create, sleep, wake, or delete a machine, see Lifecycle.
List machines
List returns every machine in your account, including sleeping machines. Each item includes its resources, autosleep setting, desired state, and current lifecycle phase.
dedalus machines list
machines = client.machines.list()
const machines = await client.machines.list();
machines, _ := client.Machines.List(ctx, dedalus.MachineListParams{})
fmt.Println(len(machines.Items))
Parameters
cursor · string
Pagination cursor from a prior page's next_cursor.
limit · integer
Maximum number of machines to return per page.
Retrieve a machine
Retrieve returns the latest view of one machine, including its resources, autosleep setting, desired state, and lifecycle status.
dedalus machines retrieve --machine-id <machine_id>
machine = client.machines.retrieve(machine_id="<machine_id>")
const machine = await client.machines.retrieve({ machine_id: "<machine_id>" });
machine, _ := client.Machines.Get(ctx, dedalus.MachineGetParams{
MachineID: machineID,
})
fmt.Println(machine.Status.Phase)
Parameters
machine_id · string · required
The machine to retrieve.
Watch a machine
Watch streams lifecycle changes as Server-Sent Events (SSE). Each event contains the latest machine state. The stream closes when the machine reaches its desired state, so use it instead of polling after a lifecycle operation.
dedalus machines watch --machine-id <machine_id>
for machine in client.machines.watch(machine_id="<machine_id>"):
print(machine.status.phase)
const stream = await client.machines.watch({ machine_id: "<machine_id>" });
for await (const machine of stream) {
console.log(machine.status.phase);
}
stream := client.Machines.WatchStreaming(ctx, dedalus.MachineWatchParams{
MachineID: machineID,
})
for stream.Next() {
fmt.Println(stream.Current().Status.Phase)
}
Parameters
machine_id · string · required
The machine to watch.
Last-Event-ID · string
Resource version from a prior event. Use it to resume an interrupted stream.
Update a machine
Update changes one or more configured resources. Fields you leave out keep their current values.
dedalus machines update --machine-id <machine_id> --memory-mib 8192
client.machines.update(machine_id="<machine_id>", memory_mib=8192)
await client.machines.update({ machine_id: "<machine_id>", memory_mib: 8192 });
client.Machines.Update(ctx, dedalus.MachineUpdateParams{
MachineID: machineID,
UpdateParams: dedalus.UpdateParams{
MemoryMiB: dedalus.Int(8192),
},
})
Parameters
machine_id · string · required
The machine to update.
vcpu · number
CPU allocated to the machine, measured in virtual CPUs.
memory_mib · integer
Memory allocated to the machine, measured in mebibytes (MiB).
storage_gib · integer
Persistent storage allocated to the machine, measured in gibibytes (GiB).
autosleep · string
Idle time before the machine sleeps. Accepts durations such as 30s, 15m, 2h, raw seconds,
or never to disable autosleep.
