@@ -191,6 +191,8 @@ type Instance struct {
191191 // Any of "Created", "Running", "Paused", "Shutdown", "Stopped", "Standby",
192192 // "Unknown".
193193 State InstanceState `json:"state,required"`
194+ // Disk I/O rate limit (human-readable, e.g., "100MB/s")
195+ DiskIoBps string `json:"disk_io_bps"`
194196 // Environment variables
195197 Env map [string ]string `json:"env"`
196198 // Whether a snapshot exists for this instance
@@ -224,6 +226,7 @@ type Instance struct {
224226 Image respjson.Field
225227 Name respjson.Field
226228 State respjson.Field
229+ DiskIoBps respjson.Field
227230 Env respjson.Field
228231 HasSnapshot respjson.Field
229232 HotplugSize respjson.Field
@@ -278,6 +281,10 @@ const (
278281
279282// Network configuration of the instance
280283type InstanceNetwork struct {
284+ // Download bandwidth limit (human-readable, e.g., "1Gbps", "125MB/s")
285+ BandwidthDownload string `json:"bandwidth_download"`
286+ // Upload bandwidth limit (human-readable, e.g., "1Gbps", "125MB/s")
287+ BandwidthUpload string `json:"bandwidth_upload"`
281288 // Whether instance is attached to the default network
282289 Enabled bool `json:"enabled"`
283290 // Assigned IP address (null if no network)
@@ -288,12 +295,14 @@ type InstanceNetwork struct {
288295 Name string `json:"name"`
289296 // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
290297 JSON struct {
291- Enabled respjson.Field
292- IP respjson.Field
293- Mac respjson.Field
294- Name respjson.Field
295- ExtraFields map [string ]respjson.Field
296- raw string
298+ BandwidthDownload respjson.Field
299+ BandwidthUpload respjson.Field
300+ Enabled respjson.Field
301+ IP respjson.Field
302+ Mac respjson.Field
303+ Name respjson.Field
304+ ExtraFields map [string ]respjson.Field
305+ raw string
297306 } `json:"-"`
298307}
299308
@@ -411,6 +420,9 @@ type InstanceNewParams struct {
411420 // Human-readable name (lowercase letters, digits, and dashes only; cannot start or
412421 // end with a dash)
413422 Name string `json:"name,required"`
423+ // Disk I/O rate limit (e.g., "100MB/s", "500MB/s"). Defaults to proportional share
424+ // based on CPU allocation if configured.
425+ DiskIoBps param.Opt [string ] `json:"disk_io_bps,omitzero"`
414426 // Additional memory for hotplug (human-readable format like "3GB", "1G")
415427 HotplugSize param.Opt [string ] `json:"hotplug_size,omitzero"`
416428 // Writable overlay disk size (human-readable format like "10GB", "50G")
@@ -452,6 +464,12 @@ const (
452464
453465// Network configuration for the instance
454466type InstanceNewParamsNetwork struct {
467+ // Download bandwidth limit (external→VM, e.g., "1Gbps", "125MB/s"). Defaults to
468+ // proportional share based on CPU allocation.
469+ BandwidthDownload param.Opt [string ] `json:"bandwidth_download,omitzero"`
470+ // Upload bandwidth limit (VM→external, e.g., "1Gbps", "125MB/s"). Defaults to
471+ // proportional share based on CPU allocation.
472+ BandwidthUpload param.Opt [string ] `json:"bandwidth_upload,omitzero"`
455473 // Whether to attach instance to the default network
456474 Enabled param.Opt [bool ] `json:"enabled,omitzero"`
457475 paramObj
0 commit comments