@leaflow/sdk 0.54.0 → 0.54.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -240,6 +240,12 @@ export interface paths {
240
240
  /**
241
241
  * Resize a disk
242
242
  * @description Capacity can only be increased; shrinking is not supported. Extend the file system inside the instance once the resize completes.
243
+ *
244
+ * **A data disk whose performance grows with its size has to be detached first.** The storage backend decides a volume's limit when the volume is attached and never revisits it, so growing one that is attached would give you the capacity immediately and leave the speed at the old size's figure — indefinitely, and stopping the instance does not help. Rather than take the money for performance that does not arrive, this is refused with `DISK_RESIZE_NEEDS_DETACH`; detach the disk, resize it, and attach it again.
245
+ *
246
+ * It is only refused when the two sizes really would differ in speed. A disk whose type has no QoS level, or whose performance has already reached the type's ceiling, grows online as before.
247
+ *
248
+ * **A system disk is the exception and grows online**, because a root volume cannot be detached at all. Its performance does not change with size for exactly that reason — system disk types are required to carry a level that does not scale.
243
249
  */
244
250
  post: operations["resize-disk"];
245
251
  delete?: never;
@@ -327,6 +333,8 @@ export interface paths {
327
333
  /**
328
334
  * Set the bandwidth limit
329
335
  * @description Limits both directions at once. Limiting egress alone does not prevent ingress traffic from saturating the uplink.
336
+ *
337
+ * While the address is bound to an instance, the ceiling has to fit that instance type's `max_bandwidth_mbps`; asking for more is refused with `INSTANCE_BANDWIDTH_CEILING`. An address bound to nothing is not checked against any type — there is none to check against — and is checked again when it is attached.
330
338
  */
331
339
  put: operations["set-floating-ip-bandwidth"];
332
340
  post?: never;
@@ -1352,6 +1360,20 @@ export interface components {
1352
1360
  region_code: string;
1353
1361
  /** Format: int64 */
1354
1362
  size_gb: number;
1363
+ /**
1364
+ * Format: int64
1365
+ * @description IOPS this disk is allowed. Null when its type is not rate-limited.
1366
+ *
1367
+ * Computed from the disk's own capacity, so it grows when the disk is grown — but see the
1368
+ * note on the resize endpoint: growing a disk that is attached is refused, precisely because
1369
+ * the new figure would not take effect until it was attached again.
1370
+ */
1371
+ iops: number | null;
1372
+ /**
1373
+ * Format: int64
1374
+ * @description Throughput this disk is allowed, in bytes per second. Null when its type is not rate-limited
1375
+ */
1376
+ throughput_bytes_per_sec: number | null;
1355
1377
  /** @enum {string} */
1356
1378
  status: "provisioning" | "available" | "attaching" | "in_use" | "detaching" | "resizing" | "reverting" | "restoring" | "releasing" | "deleting" | "error";
1357
1379
  /**
@@ -1370,7 +1392,20 @@ export interface components {
1370
1392
  availability_zone_code: string;
1371
1393
  /** Format: uuid */
1372
1394
  id: string;
1373
- iops_display: string;
1395
+ /**
1396
+ * Format: int64
1397
+ * @description IOPS a disk of `min_size_gb` gets. Null when this type is not rate-limited.
1398
+ *
1399
+ * Performance grows with capacity, so this and `iops_at_max_size` are the two ends of the
1400
+ * range. The exact figure for the size actually bought appears on the disk itself once it
1401
+ * exists.
1402
+ */
1403
+ iops_at_min_size: number | null;
1404
+ /**
1405
+ * Format: int64
1406
+ * @description IOPS a disk of `max_size_gb` gets. Null when this type is not rate-limited
1407
+ */
1408
+ iops_at_max_size: number | null;
1374
1409
  /** Format: int64 */
1375
1410
  max_size_gb: number;
1376
1411
  /** @enum {string} */
@@ -1381,7 +1416,20 @@ export interface components {
1381
1416
  region_code: string;
1382
1417
  /** Format: int64 */
1383
1418
  step_gb: number;
1384
- throughput_display: string;
1419
+ /**
1420
+ * Format: int64
1421
+ * @description Throughput a disk of `min_size_gb` gets, in **bytes per second**. Null when this type is
1422
+ * not rate-limited.
1423
+ *
1424
+ * Bytes rather than MiB so the number needs no rounding on the way out; divide by 1048576
1425
+ * for MiB/s at the point of display.
1426
+ */
1427
+ throughput_at_min_size: number | null;
1428
+ /**
1429
+ * Format: int64
1430
+ * @description Throughput a disk of `max_size_gb` gets, in bytes per second. Null when this type is not rate-limited
1431
+ */
1432
+ throughput_at_max_size: number | null;
1385
1433
  /**
1386
1434
  * @description Whether any capacity is left in this type's pool.
1387
1435
  *
@@ -1466,8 +1514,29 @@ export interface components {
1466
1514
  availability_zone_code: string;
1467
1515
  /** Format: uuid */
1468
1516
  id: string;
1469
- /** Format: int64 */
1517
+ /**
1518
+ * Format: int64
1519
+ * @description The most public bandwidth a machine of this type may be given, in Mbps. Asking for more
1520
+ * when creating a machine, or raising a bound address past it, is refused.
1521
+ *
1522
+ * A ceiling on what can be bought, not a speed. How fast the machine's own interfaces run is
1523
+ * `network_egress_kbps` / `network_ingress_kbps`.
1524
+ */
1470
1525
  max_bandwidth_mbps: number;
1526
+ /**
1527
+ * Format: int64
1528
+ * @description Outbound ceiling of **each** network interface, in kbps. Null when this type is not
1529
+ * rate-limited.
1530
+ *
1531
+ * Per interface rather than per machine: a machine with two interfaces has this ceiling on
1532
+ * each of them, not shared between them. `max_ports` says how many it may have.
1533
+ */
1534
+ network_egress_kbps: number | null;
1535
+ /**
1536
+ * Format: int64
1537
+ * @description Inbound ceiling of each network interface, in kbps. Null when this type is not rate-limited
1538
+ */
1539
+ network_ingress_kbps: number | null;
1471
1540
  /** Format: int64 */
1472
1541
  max_floating_ips: number;
1473
1542
  /** Format: int64 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leaflow/sdk",
3
- "version": "0.54.0",
3
+ "version": "0.54.1",
4
4
  "description": "Leaflow 平台 API 的 TypeScript SDK",
5
5
  "license": "MIT",
6
6
  "repository": {