@leaflow/sdk 0.0.0-dev.113.g5d6fb99 → 0.0.0-dev.115.gcc8b628

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.
Files changed (46) hide show
  1. package/README.md +34 -0
  2. package/dist/account/v1/index.d.ts +16 -0
  3. package/dist/account/v1/schema.d.ts +294 -3
  4. package/dist/assistant/v1/index.d.ts +74 -34
  5. package/dist/assistant/v1/schema.d.ts +1113 -157
  6. package/dist/billing/v1/index.d.ts +70 -0
  7. package/dist/billing/v1/index.js +5 -0
  8. package/dist/billing/v1/schema.d.ts +2657 -0
  9. package/dist/canopy/v1/index.d.ts +12 -0
  10. package/dist/compute/v1/index.d.ts +50 -4
  11. package/dist/compute/v1/schema.d.ts +857 -268
  12. package/dist/dns/v1/index.d.ts +42 -0
  13. package/dist/dns/v1/index.js +5 -0
  14. package/dist/dns/v1/schema.d.ts +883 -0
  15. package/dist/iam/v1/index.d.ts +28 -0
  16. package/dist/iam/v1/schema.d.ts +437 -9
  17. package/dist/index.d.ts +4 -0
  18. package/dist/monitoring/v1/index.d.ts +96 -0
  19. package/dist/monitoring/v1/schema.d.ts +2386 -496
  20. package/dist/notification/v1/index.d.ts +76 -0
  21. package/dist/notification/v1/index.js +5 -0
  22. package/dist/notification/v1/schema.d.ts +2044 -0
  23. package/dist/support/v1/index.d.ts +50 -0
  24. package/dist/support/v1/index.js +5 -0
  25. package/dist/support/v1/schema.d.ts +1078 -0
  26. package/dist/tunnel/v1/index.d.ts +14 -32
  27. package/dist/tunnel/v1/schema.d.ts +52 -496
  28. package/package.json +5 -4
  29. package/dist/gen/account/v1/schema.d.ts +0 -866
  30. package/dist/gen/assistant/v1/schema.d.ts +0 -1884
  31. package/dist/gen/canopy/v1/schema.d.ts +0 -1100
  32. package/dist/gen/compute/v1/schema.d.ts +0 -4439
  33. package/dist/gen/iam/v1/schema.d.ts +0 -1230
  34. package/dist/gen/iam/v1/schema.js +0 -5
  35. package/dist/gen/monitoring/v1/schema.d.ts +0 -2291
  36. package/dist/gen/monitoring/v1/schema.js +0 -5
  37. package/dist/gen/tunnel/v1/schema.d.ts +0 -845
  38. package/dist/gen/tunnel/v1/schema.js +0 -5
  39. package/dist/src/client.d.ts +0 -57
  40. package/dist/src/client.js +0 -41
  41. package/dist/src/index.d.ts +0 -9
  42. package/dist/src/index.js +0 -1
  43. /package/dist/{gen/account → billing}/v1/schema.js +0 -0
  44. /package/dist/{gen/assistant → dns}/v1/schema.js +0 -0
  45. /package/dist/{gen/canopy → notification}/v1/schema.js +0 -0
  46. /package/dist/{gen/compute → support}/v1/schema.js +0 -0
@@ -10,16 +10,16 @@ export interface paths {
10
10
  path?: never;
11
11
  cookie?: never;
12
12
  };
13
- /** 列出备份 */
13
+ /** List backups */
14
14
  get: operations["list-backups"];
15
15
  put?: never;
16
16
  /**
17
- * 创建备份
18
- * @description 备份是云硬盘在独立存储中的一份完整副本:**源云硬盘删除后仍可恢复,且可恢复到本地区的其他可用区。**快照不具备这两项能力,它与源云硬盘位于同一存储,且源云硬盘存在快照时无法删除。
17
+ * Create a backup
18
+ * @description A backup is a complete copy of a disk held in separate storage: **it remains restorable after the source disk is deleted, and can be restored to another availability zone in the same region.** A snapshot offers neither capability, as it resides in the same storage as the source disk and prevents that disk from being deleted while it exists.
19
19
  *
20
- * 运行中云服务器上挂载的云硬盘、以及系统盘,均可创建备份。
20
+ * Disks attached to a running instance, including system disks, can be backed up.
21
21
  *
22
- * 备份耗时取决于数据量。接口返回时尚未完成,请轮询查看接口。
22
+ * The duration depends on the amount of data. The backup is not complete when this endpoint returns; poll the retrieve endpoint.
23
23
  */
24
24
  post: operations["create-backup"];
25
25
  delete?: never;
@@ -36,20 +36,20 @@ export interface paths {
36
36
  cookie?: never;
37
37
  };
38
38
  /**
39
- * 查看备份
40
- * @description 会实时查询备份的当前状态,因此比列表接口慢但更准确。轮询创建进度请使用本接口。
39
+ * Retrieve a backup
40
+ * @description Queries the current state of the backup, which makes it slower but more accurate than the list endpoint. Use it to poll creation progress.
41
41
  */
42
42
  get: operations["get-backup"];
43
43
  put?: never;
44
44
  post?: never;
45
45
  /**
46
- * 删除备份
47
- * @description 与源云硬盘无关,源云硬盘是否存在都不影响删除。
46
+ * Delete a backup
47
+ * @description Independent of the source disk: deletion succeeds whether or not that disk still exists.
48
48
  */
49
49
  delete: operations["delete-backup"];
50
50
  options?: never;
51
51
  head?: never;
52
- /** 重命名备份 */
52
+ /** Rename a backup */
53
53
  patch: operations["rename-backup"];
54
54
  trace?: never;
55
55
  };
@@ -63,10 +63,10 @@ export interface paths {
63
63
  get?: never;
64
64
  put?: never;
65
65
  /**
66
- * 由备份恢复
67
- * @description 恢复到一块**新建的**云硬盘上,源云硬盘不受影响,也不要求它仍然存在。
66
+ * Restore from a backup
67
+ * @description Restores onto a **newly created** disk. The source disk is unaffected and need not still exist.
68
68
  *
69
- * 目标硬盘类型可位于本地区的其他可用区,容量不能小于备份。恢复完成前该云硬盘不可挂载,请轮询云硬盘查看接口。
69
+ * The target disk type may belong to another availability zone of the same region, and its capacity must not be smaller than the backup. The disk cannot be attached until the restore completes; poll the disk retrieve endpoint.
70
70
  */
71
71
  post: operations["restore-backup"];
72
72
  delete?: never;
@@ -82,7 +82,7 @@ export interface paths {
82
82
  path?: never;
83
83
  cookie?: never;
84
84
  };
85
- /** 列出在售硬盘类型 */
85
+ /** List disk types on sale */
86
86
  get: operations["list-disk-types"];
87
87
  put?: never;
88
88
  post?: never;
@@ -100,8 +100,8 @@ export interface paths {
100
100
  cookie?: never;
101
101
  };
102
102
  /**
103
- * 列出在售镜像
104
- * @description min_ram_mb 超过所选机型内存的镜像无法启动,请据此过滤可选项。
103
+ * List images on sale
104
+ * @description An image whose `min_ram_mb` exceeds the memory of the selected instance type cannot boot. Filter the options accordingly.
105
105
  */
106
106
  get: operations["list-images"];
107
107
  put?: never;
@@ -119,7 +119,7 @@ export interface paths {
119
119
  path?: never;
120
120
  cookie?: never;
121
121
  };
122
- /** 列出在售机型 */
122
+ /** List instance types on sale */
123
123
  get: operations["list-instance-types"];
124
124
  put?: never;
125
125
  post?: never;
@@ -136,7 +136,7 @@ export interface paths {
136
136
  path?: never;
137
137
  cookie?: never;
138
138
  };
139
- /** 列出可用的地区 */
139
+ /** List available regions */
140
140
  get: operations["list-regions"];
141
141
  put?: never;
142
142
  post?: never;
@@ -154,8 +154,8 @@ export interface paths {
154
154
  cookie?: never;
155
155
  };
156
156
  /**
157
- * 列出一个地区的可用区
158
- * @description 云硬盘与云服务器必须位于同一可用区才能挂载,创建前请确认所选可用区。
157
+ * List the availability zones of a region
158
+ * @description A disk and an instance must reside in the same availability zone to be attached. Confirm the zone before creating either.
159
159
  */
160
160
  get: operations["list-availability-zones"];
161
161
  put?: never;
@@ -174,14 +174,14 @@ export interface paths {
174
174
  cookie?: never;
175
175
  };
176
176
  /**
177
- * 列出云硬盘
178
- * @description 同时提供 region_code 与 availability_zone 时,只返回可挂载到该位置云服务器的云硬盘。
177
+ * List disks
178
+ * @description When both `region_code` and `availability_zone` are supplied, only disks attachable to an instance at that location are returned.
179
179
  */
180
180
  get: operations["list-disks"];
181
181
  put?: never;
182
182
  /**
183
- * 创建云硬盘
184
- * @description 云硬盘创建在所选硬盘类型所属的可用区,云服务器必须位于同一可用区才能挂载。因此选定硬盘类型即确定了可用区。
183
+ * Create a disk
184
+ * @description The disk is created in the availability zone of the selected disk type, and an instance must reside in the same zone to attach it. Choosing the disk type therefore determines the zone.
185
185
  */
186
186
  post: operations["create-disk"];
187
187
  delete?: never;
@@ -198,22 +198,22 @@ export interface paths {
198
198
  cookie?: never;
199
199
  };
200
200
  /**
201
- * 查看云硬盘
202
- * @description 会实时查询云硬盘的当前状态,因此比列表接口慢但更准确。
201
+ * Retrieve a disk
202
+ * @description Queries the current state of the disk, which makes it slower but more accurate than the list endpoint.
203
203
  */
204
204
  get: operations["get-disk"];
205
205
  put?: never;
206
206
  post?: never;
207
207
  /**
208
- * 删除云硬盘
209
- * @description 云硬盘处于挂载状态,或仍存在基于它创建的快照时,删除会被拒绝。
208
+ * Delete a disk
209
+ * @description Deletion is rejected while the disk is attached, or while snapshots created from it still exist.
210
210
  */
211
211
  delete: operations["delete-disk"];
212
212
  options?: never;
213
213
  head?: never;
214
214
  /**
215
- * 重命名云硬盘
216
- * @description 仅可修改名称。容量请使用扩容接口,类型与可用区不可修改。
215
+ * Rename a disk
216
+ * @description Changes the name only. Use the resize endpoint for capacity; type and availability zone are immutable.
217
217
  */
218
218
  patch: operations["rename-disk"];
219
219
  trace?: never;
@@ -228,8 +228,8 @@ export interface paths {
228
228
  get?: never;
229
229
  put?: never;
230
230
  /**
231
- * 扩容
232
- * @description 容量只能增加,不支持缩容。扩容完成后需在云服务器内自行扩展文件系统。
231
+ * Resize a disk
232
+ * @description Capacity can only be increased; shrinking is not supported. Extend the file system inside the instance once the resize completes.
233
233
  */
234
234
  post: operations["resize-disk"];
235
235
  delete?: never;
@@ -248,12 +248,12 @@ export interface paths {
248
248
  get?: never;
249
249
  put?: never;
250
250
  /**
251
- * 回滚到快照
252
- * @description 将云硬盘的内容恢复到创建该快照的时刻。**该时刻之后写入的数据全部丢失,且无法撤销。**
251
+ * Revert to a snapshot
252
+ * @description Restores the contents of the disk to the moment the snapshot was taken. **All data written after that moment is lost and cannot be recovered.**
253
253
  *
254
- * 三项限制:只能回滚到该云硬盘最新的一个快照;云硬盘必须先从云服务器上卸载;创建快照后扩容过的云硬盘不能回滚。需要回到更早的时刻,或需要保留现有云硬盘时,请改用由快照创建一块新的云硬盘。
254
+ * Three restrictions apply: only the most recent snapshot of the disk can be reverted to; the disk must be detached from its instance first; and a disk resized since the snapshot was taken cannot be reverted. To return to an earlier point in time, or to keep the existing disk, create a new disk from the snapshot instead.
255
255
  *
256
- * 接口返回时回滚尚未完成,请轮询查看接口。
256
+ * The revert is not complete when this endpoint returns; poll the retrieve endpoint.
257
257
  */
258
258
  post: operations["revert-disk"];
259
259
  delete?: never;
@@ -269,14 +269,14 @@ export interface paths {
269
269
  path?: never;
270
270
  cookie?: never;
271
271
  };
272
- /** 列出公网 IP */
272
+ /** List floating IPs */
273
273
  get: operations["list-floating-ips"];
274
274
  put?: never;
275
275
  /**
276
- * 申领公网 IP
277
- * @description 若该私有网络尚未连通外网,会一并为其接入外网。
276
+ * Allocate a floating IP
277
+ * @description If the private network is not yet connected to the internet, connectivity is established as part of this call.
278
278
  *
279
- * IPv6 不通过本接口申请。IPv6 地址由私有网络自动下发至云服务器,在私有网络上启用即可。
279
+ * IPv6 is not requested through this endpoint. IPv6 addresses are assigned to instances by the private network; enable IPv6 on that network instead.
280
280
  */
281
281
  post: operations["allocate-floating-ip"];
282
282
  delete?: never;
@@ -292,13 +292,13 @@ export interface paths {
292
292
  path?: never;
293
293
  cookie?: never;
294
294
  };
295
- /** 查看公网 IP */
295
+ /** Retrieve a floating IP */
296
296
  get: operations["get-floating-ip"];
297
297
  put?: never;
298
298
  post?: never;
299
299
  /**
300
- * 释放公网 IP
301
- * @description 地址释放后进入冷却期才会重新分配,以免仍指向它的 DNS 记录和访问白名单立即失效。因此释放后的短时间内**无法重新申领同一个地址**,请谨慎操作。
300
+ * Release a floating IP
301
+ * @description A released address enters a cooldown period before it is allocated again, so that DNS records and allow-lists still pointing at it do not break immediately. **The same address therefore cannot be re-allocated** for some time after release. Proceed with care.
302
302
  */
303
303
  delete: operations["release-floating-ip"];
304
304
  options?: never;
@@ -315,8 +315,8 @@ export interface paths {
315
315
  };
316
316
  get?: never;
317
317
  /**
318
- * 设带宽上限
319
- * @description 出入两个方向同时限速。仅限制出方向无法防止入方向流量打满上联带宽。
318
+ * Set the bandwidth limit
319
+ * @description Limits both directions at once. Limiting egress alone does not prevent ingress traffic from saturating the uplink.
320
320
  */
321
321
  put: operations["set-floating-ip-bandwidth"];
322
322
  post?: never;
@@ -334,12 +334,12 @@ export interface paths {
334
334
  cookie?: never;
335
335
  };
336
336
  get?: never;
337
- /** 将公网 IP 绑定到网卡 */
337
+ /** Bind a floating IP to a network interface */
338
338
  put: operations["bind-floating-ip"];
339
339
  post?: never;
340
340
  /**
341
- * 解绑公网 IP
342
- * @description 地址仍归本项目持有,只是不再指向任何网卡。
341
+ * Unbind a floating IP
342
+ * @description The address remains held by the project and simply no longer points at any network interface.
343
343
  */
344
344
  delete: operations["unbind-floating-ip"];
345
345
  options?: never;
@@ -354,22 +354,27 @@ export interface paths {
354
354
  path?: never;
355
355
  cookie?: never;
356
356
  };
357
- /** 列出云服务器 */
357
+ /**
358
+ * List instances
359
+ * @description Every instance in the project, newest first. This endpoint does not query backend state; for the accurate state of one instance, use the retrieve endpoint.
360
+ */
358
361
  get: operations["list-instances"];
359
362
  put?: never;
360
363
  /**
361
- * 创建云服务器
362
- * @description **必须在请求中设置密码**:不设置时请求会被拒绝,否则创建出的云服务器将无法登录。密码可由平台生成,此时仅在本次响应中返回一次。
364
+ * Create instances
365
+ * @description **A password must be set in the request.** The request is rejected otherwise, since the resulting instance would be unreachable. The platform can generate one, in which case it is returned only in this response.
366
+ *
367
+ * `count` creates several instances at once, 20 at most. Names are numbered `-1`, `-2` automatically and all instances share one password. **`instances` in the response is always an array**, including for a single instance.
363
368
  *
364
- * `count` 可一次创建多台(最多 20 台),名称自动加 `-1`、`-2` 编号,所有云服务器共用同一个密码。**响应中的 `instances` 始终是数组**,单台创建时也是。
369
+ * Instances are created one by one in order. If the sequence stops part way through, because of a quota limit for example, **the instances already created are kept** and `failure` states why it stopped. A failure on the first instance is treated as a failure of the whole request and no instance is created.
365
370
  *
366
- * 批量创建按顺序逐台进行。若中途失败(例如配额不足),**已创建的云服务器会保留**,响应中的 `failure` 给出中止原因;第一台就失败时视为整次请求失败,不会创建任何云服务器。
371
+ * Exactly one source must be given: `image_id` for a platform image, `private_image_id` for a private image, or `boot_disk_id` to boot a disk you already have. Supplying more than one, or none, is rejected.
367
372
  *
368
- * 镜像二选一:`image_id` 使用平台提供的镜像,`private_image_id` 使用自制镜像。两者都给或都不给都会被拒绝。
373
+ * `boot_disk_id` recovers an instance that can no longer be repaired from the inside. Snapshot its disk, restore that snapshot into a new disk, attach the new disk to another instance and repair it there, then create an instance from it. That disk is not deleted when the instance is released; it is detached and returned to you.
369
374
  *
370
- * 云服务器创建在机型所属的可用区。后续要挂载的云硬盘必须位于同一可用区。
375
+ * Instances are created in the availability zone of the instance type. Disks to be attached later must reside in the same zone.
371
376
  *
372
- * 接口返回时创建尚未完成(status 为 provisioning),请轮询 GET 确认结果。
377
+ * Creation is not complete when this endpoint returns and `status` is `provisioning`. Poll GET to observe the outcome.
373
378
  */
374
379
  post: operations["launch-instance"];
375
380
  delete?: never;
@@ -386,29 +391,29 @@ export interface paths {
386
391
  cookie?: never;
387
392
  };
388
393
  /**
389
- * 查看云服务器
390
- * @description 会实时查询云服务器的当前状态,因此比列表接口慢但更准确。轮询创建进度请使用本接口。
394
+ * Retrieve an instance
395
+ * @description Queries the current state of the instance, which makes it slower but more accurate than the list endpoint. Use it to poll creation progress.
391
396
  */
392
397
  get: operations["get-instance"];
393
398
  put?: never;
394
399
  post?: never;
395
400
  /**
396
- * 释放云服务器
397
- * @description 系统盘随云服务器一并删除,**基于系统盘创建的快照也会一并删除**。数据盘会被卸载并保留,其快照与备份不受影响。主网卡随云服务器一并释放。
401
+ * Release an instance
402
+ * @description The system disk is deleted with the instance, and **snapshots created from the system disk are deleted with it**. Data disks are detached and kept, and their snapshots and backups are unaffected. The primary network interface is released with the instance.
398
403
  *
399
- * 正在制作镜像的云服务器无法释放,请等待制作完成或先删除该镜像。
404
+ * An instance being captured as a private image cannot be released. Wait for the capture to finish, or delete that image first.
400
405
  */
401
406
  delete: operations["delete-instance"];
402
407
  options?: never;
403
408
  head?: never;
404
409
  /**
405
- * 重命名云服务器
406
- * @description 仅修改显示名称。云服务器内的主机名不变,它等于云服务器 id。
410
+ * Rename an instance
411
+ * @description Changes the display name only. The hostname inside the instance is unchanged; it equals the instance id.
407
412
  */
408
413
  patch: operations["rename-instance"];
409
414
  trace?: never;
410
415
  };
411
- "/api/v1/instances/{instanceId}/actions": {
416
+ "/api/v1/instances/{instanceId}/commands": {
412
417
  parameters: {
413
418
  query?: never;
414
419
  header?: never;
@@ -418,14 +423,26 @@ export interface paths {
418
423
  get?: never;
419
424
  put?: never;
420
425
  /**
421
- * 开机、关机、重启
422
- * @description 重启默认为软重启,由操作系统正常关闭后重新启动。
426
+ * Run a command on an instance
427
+ * @description Runs one command over SSH and returns what it wrote. **This is not a shell.** There is no terminal, no standard input and no way to answer a prompt: a command that waits for input produces nothing and is killed at the timeout. Chain steps with `&&`, or write a script and run that.
428
+ *
429
+ * **A command that fails is still a 200.** Its failure is its own result, not this endpoint's: read `exit_code` for what it exited with and `stderr` for what it said, and decide from those. A `grep` that matches nothing exits 1 and is a perfectly successful call.
430
+ *
431
+ * The status therefore answers a different question — did the command run at all. A non-2xx means it did not, and nothing about the instance was changed by this request: it was suspended, not running or had no floating IP; or it refused the platform key; or the connection could not be opened. Retrying is meaningful in those cases and is not for a non-zero `exit_code`.
432
+ *
433
+ * Three conditions must hold; the instance is unreachable otherwise:
423
434
  *
424
- * 系统已无响应时软重启不会生效,此时可设置 `force` 强制重启。强制重启不等待操作系统关闭,**未落盘的数据会丢失**。`force` 仅适用于 reboot。
435
+ * - it is `running`
436
+ * - a floating IP is bound to it, since this endpoint connects over the public internet
437
+ * - its security group permits inbound TCP 22
425
438
  *
426
- * 已被平台停服的云服务器需先解除停服。
439
+ * Authentication uses the key the platform attaches to every instance at creation, so nothing has to be set up first. The instance must have applied that key at first boot, which images without a full cloud-init do not do.
440
+ *
441
+ * **Do not pass secrets in the command.** Read them from a file on the instance instead: neither the command nor its output is a confidential channel.
442
+ *
443
+ * Each stream is capped at 1 MiB. Beyond that the rest is discarded and `truncated` is true.
427
444
  */
428
- post: operations["act-on-instance"];
445
+ post: operations["run-instance-command"];
429
446
  delete?: never;
430
447
  options?: never;
431
448
  head?: never;
@@ -442,10 +459,10 @@ export interface paths {
442
459
  get?: never;
443
460
  put?: never;
444
461
  /**
445
- * 打开远程控制台
446
- * @description 在浏览器中直接操作云服务器,无需网络可达,适用于网络配置失误导致无法登录的情况。
462
+ * Open a remote console
463
+ * @description Operates the instance directly from a browser and does not require the instance to be reachable over the network, which makes it usable when a network misconfiguration prevents login.
447
464
  *
448
- * 返回的地址一次性使用,数分钟后失效。**请勿缓存**,每次使用前重新获取。
465
+ * The returned address is single-use and expires within minutes. **Do not cache it**; request a new one before each use.
449
466
  */
450
467
  post: operations["open-instance-console"];
451
468
  delete?: never;
@@ -462,10 +479,10 @@ export interface paths {
462
479
  cookie?: never;
463
480
  };
464
481
  /**
465
- * 读取串口输出
466
- * @description 云服务器启动过程与内核输出的原始文本。无法登录或远程控制台无输出时,应首先查看本接口。其中可查看启动停止于哪一步、系统盘是否正常挂载、初始化过程是否报错。
482
+ * Read the console output
483
+ * @description The raw text produced by the instance during boot and by the kernel. Consult it first when login fails or the remote console shows no output: it reveals where boot stopped, whether the system disk was mounted, and whether initialisation reported errors.
467
484
  *
468
- * 处于错误状态或已被平台停服的云服务器同样可以读取。
485
+ * Instances in an error state, and instances suspended by the platform, can be read as well.
469
486
  */
470
487
  get: operations["get-instance-console-output"];
471
488
  put?: never;
@@ -476,6 +493,54 @@ export interface paths {
476
493
  patch?: never;
477
494
  trace?: never;
478
495
  };
496
+ "/api/v1/instances/{instanceId}/labels": {
497
+ parameters: {
498
+ query?: never;
499
+ header?: never;
500
+ path?: never;
501
+ cookie?: never;
502
+ };
503
+ get?: never;
504
+ /**
505
+ * Replace an instance's labels
506
+ * @description Records what this instance is for, as key-value pairs. Nothing on the platform reads them.
507
+ *
508
+ * **The whole set is replaced**: whatever is absent from the request is removed.
509
+ *
510
+ * Do not put credentials here. Labels are visible to platform operators.
511
+ */
512
+ put: operations["set-instance-labels"];
513
+ post?: never;
514
+ delete?: never;
515
+ options?: never;
516
+ head?: never;
517
+ patch?: never;
518
+ trace?: never;
519
+ };
520
+ "/api/v1/instances/{instanceId}/notes": {
521
+ parameters: {
522
+ query?: never;
523
+ header?: never;
524
+ path?: never;
525
+ cookie?: never;
526
+ };
527
+ get?: never;
528
+ /**
529
+ * Replace an instance's note
530
+ * @description A free-text note about this instance — what it runs, and what to be careful about before touching it.
531
+ *
532
+ * **The whole note is replaced**; send an empty string to clear it.
533
+ *
534
+ * Do not put credentials here. The note is visible to platform operators.
535
+ */
536
+ put: operations["set-instance-notes"];
537
+ post?: never;
538
+ delete?: never;
539
+ options?: never;
540
+ head?: never;
541
+ patch?: never;
542
+ trace?: never;
543
+ };
479
544
  "/api/v1/instances/{instanceId}/password": {
480
545
  parameters: {
481
546
  query?: never;
@@ -486,12 +551,12 @@ export interface paths {
486
551
  get?: never;
487
552
  put?: never;
488
553
  /**
489
- * 重置登录密码
490
- * @description 在不重启的情况下改掉 root 的密码,云服务器必须处于运行中。
554
+ * Reset the login password
555
+ * @description Changes the root password without a reboot. The instance must be running.
491
556
  *
492
- * **并非所有镜像都支持**:镜像列表中 `supports_password_reset` 为 false 的镜像做不到,此时只能通过重装系统设置新密码,而重装会清除系统盘上的全部数据。
557
+ * **Not every image supports this.** Images whose `supports_password_reset` is false cannot, and a new password can then only be set by rebuilding the instance, which erases all data on the system disk.
493
558
  *
494
- * 镜像标记为支持、但云服务器内相应组件已被卸载或停止时,本接口同样会被拒绝。
559
+ * The request is also rejected when the image is marked as supported but the corresponding component has been removed or stopped inside the instance.
495
560
  */
496
561
  post: operations["reset-instance-password"];
497
562
  delete?: never;
@@ -500,6 +565,34 @@ export interface paths {
500
565
  patch?: never;
501
566
  trace?: never;
502
567
  };
568
+ "/api/v1/instances/{instanceId}/reboot": {
569
+ parameters: {
570
+ query?: never;
571
+ header?: never;
572
+ path?: never;
573
+ cookie?: never;
574
+ };
575
+ get?: never;
576
+ put?: never;
577
+ /**
578
+ * Reboot an instance
579
+ * @description A reboot defaults to soft, in which the operating system shuts down normally before starting again.
580
+ *
581
+ * A soft reboot has no effect once the system is unresponsive. Set `force` to reboot forcibly: a forced reboot does not wait for the operating system to shut down, so **unwritten data is lost**.
582
+ *
583
+ * A forced reboot is accepted while the instance is already `rebooting`, which is the way out of a soft reboot the instance never carried out. Every other endpoint refuses an instance in a transient state, and a second soft reboot is refused as well.
584
+ *
585
+ * An instance suspended by the platform must be unsuspended first.
586
+ *
587
+ * This endpoint returns immediately and the `status` it returns is the transient `rebooting`. Poll the instance until it settles at `running`.
588
+ */
589
+ post: operations["reboot-instance"];
590
+ delete?: never;
591
+ options?: never;
592
+ head?: never;
593
+ patch?: never;
594
+ trace?: never;
595
+ };
503
596
  "/api/v1/instances/{instanceId}/rebuild": {
504
597
  parameters: {
505
598
  query?: never;
@@ -510,8 +603,8 @@ export interface paths {
510
603
  get?: never;
511
604
  put?: never;
512
605
  /**
513
- * 重装系统
514
- * @description **系统盘数据将被清除且无法恢复。** 已挂载的数据盘不受影响。
606
+ * Rebuild an instance
607
+ * @description **All data on the system disk is erased and cannot be recovered.** Attached data disks are unaffected.
515
608
  */
516
609
  post: operations["rebuild-instance"];
517
610
  delete?: never;
@@ -530,12 +623,12 @@ export interface paths {
530
623
  get?: never;
531
624
  put?: never;
532
625
  /**
533
- * 变配
534
- * @description 只能变更为同一地区、同一可用区的机型,否则已挂载的云硬盘无法随之迁移。
626
+ * Resize an instance
627
+ * @description Only an instance type in the same region and availability zone can be selected, as attached disks cannot follow the instance elsewhere.
535
628
  *
536
- * 变配分两步:本接口下发后云服务器会在新规格上重新启动,状态变为 `resize_verifying`,此时**必须**调用确认或回滚接口。目标机型在确认前记在 `pending_instance_type_id` 上,`instance_type_id` 仍为当前生效并计费的机型。
629
+ * A resize has two steps. This endpoint restarts the instance on the new size and the status becomes `resize_verifying`, at which point the confirm or revert endpoint **must** be called. Until confirmation the target type is recorded in `pending_instance_type_id`, while `instance_type_id` remains the type in effect and billed.
537
630
  *
538
- * **未确认期间新旧两份规格同时占用资源。** 请在状态变为 `resize_verifying` 后尽快确认。
631
+ * **Both sizes hold resources while the resize is unconfirmed.** Confirm promptly once the status becomes `resize_verifying`.
539
632
  */
540
633
  post: operations["resize-instance"];
541
634
  delete?: never;
@@ -554,8 +647,8 @@ export interface paths {
554
647
  get?: never;
555
648
  put?: never;
556
649
  /**
557
- * 确认变配
558
- * @description 释放原规格占用的资源,`pending_instance_type_id` 成为生效机型并从此按它计费。
650
+ * Confirm a resize
651
+ * @description Releases the resources held by the previous size. `pending_instance_type_id` becomes the type in effect and is billed from then on.
559
652
  */
560
653
  post: operations["confirm-instance-resize"];
561
654
  delete?: never;
@@ -574,8 +667,8 @@ export interface paths {
574
667
  get?: never;
575
668
  put?: never;
576
669
  /**
577
- * 回滚变配
578
- * @description 云服务器回到原规格,`pending_instance_type_id` 被丢弃,计费不受本次变配影响。
670
+ * Revert a resize
671
+ * @description The instance returns to its previous size, `pending_instance_type_id` is discarded, and billing is unaffected by the resize.
579
672
  */
580
673
  post: operations["revert-instance-resize"];
581
674
  delete?: never;
@@ -584,6 +677,52 @@ export interface paths {
584
677
  patch?: never;
585
678
  trace?: never;
586
679
  };
680
+ "/api/v1/instances/{instanceId}/start": {
681
+ parameters: {
682
+ query?: never;
683
+ header?: never;
684
+ path?: never;
685
+ cookie?: never;
686
+ };
687
+ get?: never;
688
+ put?: never;
689
+ /**
690
+ * Start an instance
691
+ * @description An instance suspended by the platform must be unsuspended first.
692
+ *
693
+ * This endpoint returns immediately and the `status` it returns is the transient `starting`. Poll the instance until it settles at `running`.
694
+ */
695
+ post: operations["start-instance"];
696
+ delete?: never;
697
+ options?: never;
698
+ head?: never;
699
+ patch?: never;
700
+ trace?: never;
701
+ };
702
+ "/api/v1/instances/{instanceId}/stop": {
703
+ parameters: {
704
+ query?: never;
705
+ header?: never;
706
+ path?: never;
707
+ cookie?: never;
708
+ };
709
+ get?: never;
710
+ put?: never;
711
+ /**
712
+ * Stop an instance
713
+ * @description The operating system is asked to shut down and is powered off once it does, or once it stops responding for long enough. Stopping does not release the instance: it keeps its disks, its addresses and its name, and starts again where it left off.
714
+ *
715
+ * An instance suspended by the platform must be unsuspended first.
716
+ *
717
+ * This endpoint returns immediately and the `status` it returns is the transient `stopping`. Poll the instance until it settles at `stopped`.
718
+ */
719
+ post: operations["stop-instance"];
720
+ delete?: never;
721
+ options?: never;
722
+ head?: never;
723
+ patch?: never;
724
+ trace?: never;
725
+ };
587
726
  "/api/v1/instances/{instanceId}/disks": {
588
727
  parameters: {
589
728
  query?: never;
@@ -591,12 +730,12 @@ export interface paths {
591
730
  path?: never;
592
731
  cookie?: never;
593
732
  };
594
- /** 列出云服务器已挂载的云硬盘 */
733
+ /** List the disks attached to an instance */
595
734
  get: operations["list-instance-disks"];
596
735
  put?: never;
597
736
  /**
598
- * 挂载云硬盘
599
- * @description 云硬盘必须与云服务器位于同一地区和可用区。挂载后需在云服务器内自行分区并挂载文件系统。
737
+ * Attach a disk
738
+ * @description The disk must be in the same region and availability zone as the instance. Partition it and mount the file system inside the instance once it is attached.
600
739
  */
601
740
  post: operations["attach-disk"];
602
741
  delete?: never;
@@ -616,8 +755,8 @@ export interface paths {
616
755
  put?: never;
617
756
  post?: never;
618
757
  /**
619
- * 卸载云硬盘
620
- * @description 请先在云服务器内卸载(umount)该设备再调用本接口,正在写入的文件系统被强制卸载会损坏数据。
758
+ * Detach a disk
759
+ * @description Unmount the device inside the instance before calling this endpoint. Forcibly detaching a file system that is being written to corrupts data.
621
760
  */
622
761
  delete: operations["detach-disk"];
623
762
  options?: never;
@@ -635,8 +774,8 @@ export interface paths {
635
774
  get?: never;
636
775
  put?: never;
637
776
  /**
638
- * 为云服务器绑定公网 IP
639
- * @description 公网 IP 绑定在云服务器的主网卡上。
777
+ * Bind a floating IP to an instance
778
+ * @description The floating IP is bound to the primary network interface of the instance.
640
779
  */
641
780
  post: operations["attach-instance-floating-ip"];
642
781
  delete?: never;
@@ -655,7 +794,7 @@ export interface paths {
655
794
  get?: never;
656
795
  put?: never;
657
796
  post?: never;
658
- /** 解绑云服务器的公网 IP */
797
+ /** Unbind the floating IP of an instance */
659
798
  delete: operations["detach-instance-floating-ip"];
660
799
  options?: never;
661
800
  head?: never;
@@ -669,10 +808,10 @@ export interface paths {
669
808
  path?: never;
670
809
  cookie?: never;
671
810
  };
672
- /** 列出云服务器的网卡 */
811
+ /** List the network interfaces of an instance */
673
812
  get: operations["list-instance-ports"];
674
813
  put?: never;
675
- /** 挂载网卡 */
814
+ /** Attach a network interface */
676
815
  post: operations["attach-port"];
677
816
  delete?: never;
678
817
  options?: never;
@@ -691,8 +830,8 @@ export interface paths {
691
830
  put?: never;
692
831
  post?: never;
693
832
  /**
694
- * 卸载网卡
695
- * @description 主网卡不可卸载,卸载后云服务器将失去网络地址。
833
+ * Detach a network interface
834
+ * @description The primary network interface cannot be detached; the instance would lose its network address.
696
835
  */
697
836
  delete: operations["detach-port"];
698
837
  options?: never;
@@ -708,12 +847,12 @@ export interface paths {
708
847
  cookie?: never;
709
848
  };
710
849
  /**
711
- * 列出本项目的操作记录
712
- * @description 记录本项目内的每一次写操作:谁、在什么时候、对什么做了什么、成功还是失败。读取操作不记录。
850
+ * List the operation log of the project
851
+ * @description Records every write operation in the project: who performed it, when, on what, and whether it succeeded. Read operations are not recorded.
713
852
  *
714
- * **平台代为执行的操作也在其中,但不显示具体执行人**,`by_platform` 为 true。例如欠费停机、违规封禁:需要知道机器何时被平台停止,但执行人属于平台内部信息。
853
+ * **Operations performed by the platform are included, but the individual operator is not disclosed** and `by_platform` is true. Suspension for non-payment and bans for abuse are examples: the time at which an instance was stopped by the platform is needed, whereas the operator is internal information.
715
854
  *
716
- * 密码一类的字段在写入时即被替换为占位符,不会出现在 `payload` 中。
855
+ * Fields such as passwords are replaced with a placeholder as the record is written and never appear in `payload`.
717
856
  */
718
857
  get: operations["list-operation-logs"];
719
858
  put?: never;
@@ -731,12 +870,12 @@ export interface paths {
731
870
  path?: never;
732
871
  cookie?: never;
733
872
  };
734
- /** 列出网卡 */
873
+ /** List network interfaces */
735
874
  get: operations["list-ports"];
736
875
  put?: never;
737
876
  /**
738
- * 创建网卡
739
- * @description 创建出的网卡尚未挂载到任何云服务器。主网卡不由本接口创建,它随云服务器一并创建。
877
+ * Create a network interface
878
+ * @description The new network interface is not attached to any instance. Primary network interfaces are not created here; they are created with the instance.
740
879
  */
741
880
  post: operations["create-port"];
742
881
  delete?: never;
@@ -756,8 +895,8 @@ export interface paths {
756
895
  put?: never;
757
896
  post?: never;
758
897
  /**
759
- * 删除网卡
760
- * @description 主网卡不可单独删除,它随云服务器一并释放。仍挂载在云服务器上的网卡也无法删除。
898
+ * Delete a network interface
899
+ * @description The primary network interface cannot be deleted on its own, as it is released with the instance. A network interface still attached to an instance cannot be deleted either.
761
900
  */
762
901
  delete: operations["delete-port"];
763
902
  options?: never;
@@ -772,23 +911,23 @@ export interface paths {
772
911
  path?: never;
773
912
  cookie?: never;
774
913
  };
775
- /** 列出自制镜像 */
914
+ /** List private images */
776
915
  get: operations["list-private-images"];
777
916
  put?: never;
778
917
  /**
779
- * 将云服务器制作为镜像
780
- * @description 依据云服务器的系统盘制作,数据盘不包含在内。制作出的镜像可用于创建云服务器或重装系统,并在源云服务器释放后继续可用。
918
+ * Capture an instance as a private image
919
+ * @description Captured from the system disk of the instance; data disks are not included. The resulting image can create instances and rebuild them, and remains usable after the source instance is released.
781
920
  *
782
- * **镜像内容取自开始制作的那一刻,此后对云服务器的改动不会包含在内。**
921
+ * **The image reflects the moment the capture started. Later changes to the instance are not included.**
783
922
  *
784
- * 制作分两个阶段,请轮询查看接口:
923
+ * The capture has two phases. Poll the retrieve endpoint:
785
924
  *
786
- * - `provisioning` 正在读取系统盘,通常数十秒。此阶段云服务器可以继续使用,但为保证一致性建议先关机。
787
- * - `uploading` 已与系统盘无关,**此时即可开机,无需等待制作完成**。该阶段耗时与系统盘容量成正比,20 GB 约需 3 分钟。
925
+ * - `provisioning` — the system disk is being read, usually for tens of seconds. The instance remains usable during this phase, although stopping it first is recommended for consistency.
926
+ * - `uploading` — no longer tied to the system disk. **The instance may be started at this point; there is no need to wait for the capture to finish.** The duration of this phase is proportional to the size of the system disk, roughly 3 minutes for 20 GB.
788
927
  *
789
- * 运行中的云服务器其文件系统可能处于写入中间状态,制作出的镜像等同于一次断电后的磁盘内容。对一致性有要求时,请在开始制作前关机,并在状态变为 `uploading` 后开机。
928
+ * The file system of a running instance may be captured mid-write, in which case the image is equivalent to the disk contents after a power loss. Where consistency matters, stop the instance before starting the capture and start it again once the status becomes `uploading`.
790
929
  *
791
- * 制作期间该云服务器可以正常启停与使用,但无法释放。
930
+ * The instance can be started, stopped and used normally during the capture, but cannot be released.
792
931
  */
793
932
  post: operations["create-private-image"];
794
933
  delete?: never;
@@ -805,22 +944,22 @@ export interface paths {
805
944
  cookie?: never;
806
945
  };
807
946
  /**
808
- * 查看自制镜像
809
- * @description 轮询制作进度请使用本接口。status 为 error 时,failure 给出失败原因。
947
+ * Retrieve a private image
948
+ * @description Use this endpoint to poll capture progress. When `status` is `error`, `failure` states the reason.
810
949
  */
811
950
  get: operations["get-private-image"];
812
951
  put?: never;
813
952
  post?: never;
814
953
  /**
815
- * 删除自制镜像
816
- * @description 仍有云服务器由该镜像创建时,删除会被拒绝:这些云服务器需要它才能重装系统。
954
+ * Delete a private image
955
+ * @description Deletion is rejected while instances created from the image still exist, as they need it in order to be rebuilt.
817
956
  *
818
- * 制作尚未完成的镜像也可以删除,制作会被终止。
957
+ * An image whose capture has not finished can be deleted; the capture is aborted.
819
958
  */
820
959
  delete: operations["delete-private-image"];
821
960
  options?: never;
822
961
  head?: never;
823
- /** 重命名自制镜像 */
962
+ /** Rename a private image */
824
963
  patch: operations["rename-private-image"];
825
964
  trace?: never;
826
965
  };
@@ -831,12 +970,12 @@ export interface paths {
831
970
  path?: never;
832
971
  cookie?: never;
833
972
  };
834
- /** 列出私有网络 */
973
+ /** List private networks */
835
974
  get: operations["list-private-networks"];
836
975
  put?: never;
837
976
  /**
838
- * 创建私有网络
839
- * @description 同时创建一张网络、一台路由器和一个默认安全组。默认安全组拒绝全部入站流量、放行全部出站流量。
977
+ * Create a private network
978
+ * @description Creates a network, a router and a default security group in one call. The default security group denies all inbound traffic and permits all outbound traffic.
840
979
  */
841
980
  post: operations["create-private-network"];
842
981
  delete?: never;
@@ -852,20 +991,20 @@ export interface paths {
852
991
  path?: never;
853
992
  cookie?: never;
854
993
  };
855
- /** 查看私有网络 */
994
+ /** Retrieve a private network */
856
995
  get: operations["get-private-network"];
857
996
  put?: never;
858
997
  post?: never;
859
998
  /**
860
- * 释放私有网络
861
- * @description 其中仍有云服务器或网卡时,释放会被拒绝。IPv6、路由器与安全组随之一并释放。
999
+ * Release a private network
1000
+ * @description Release is rejected while instances or network interfaces remain in the network. IPv6, the router and the security groups are released with it.
862
1001
  */
863
1002
  delete: operations["delete-private-network"];
864
1003
  options?: never;
865
1004
  head?: never;
866
1005
  /**
867
- * 重命名私有网络
868
- * @description 仅修改显示名称。网段、路由与外网网关均不可修改。
1006
+ * Rename a private network
1007
+ * @description Changes the display name only. The CIDR, the routes and the internet gateway are immutable.
869
1008
  */
870
1009
  patch: operations["rename-private-network"];
871
1010
  trace?: never;
@@ -877,19 +1016,19 @@ export interface paths {
877
1016
  path?: never;
878
1017
  cookie?: never;
879
1018
  };
880
- /** 查看私有网络的 IPv6 */
1019
+ /** Retrieve the IPv6 configuration of a private network */
881
1020
  get: operations["get-private-network-ipv6"];
882
1021
  put?: never;
883
1022
  /**
884
- * 为私有网络启用 IPv6
885
- * @description 为该私有网络分配一段 IPv6 地址。地址由私有网络自动下发至云服务器,无需也无法单独申领,也不占用公网 IPv4。
1023
+ * Enable IPv6 on a private network
1024
+ * @description Allocates an IPv6 prefix to the private network. Addresses are assigned to instances by the network itself, can be neither requested nor released individually, and consume no public IPv4 address.
886
1025
  *
887
- * 该私有网络尚未接入外网时会自动接入,无需单独操作。
1026
+ * If the private network is not yet connected to the internet, connectivity is established as part of this call.
888
1027
  */
889
1028
  post: operations["enable-private-network-ipv6"];
890
1029
  /**
891
- * 关闭私有网络的 IPv6
892
- * @description 释放的前缀不会立即重新分配。
1030
+ * Disable IPv6 on a private network
1031
+ * @description A released prefix is not re-allocated immediately.
893
1032
  */
894
1033
  delete: operations["disable-private-network-ipv6"];
895
1034
  options?: never;
@@ -904,12 +1043,12 @@ export interface paths {
904
1043
  path?: never;
905
1044
  cookie?: never;
906
1045
  };
907
- /** 列出静态路由 */
1046
+ /** List static routes */
908
1047
  get: operations["list-routes"];
909
1048
  put?: never;
910
1049
  /**
911
- * 创建静态路由
912
- * @description 以下三种会导致网络中断的写法会被拒绝:目的网段为 0.0.0.0/0(覆盖默认路由,所有公网 IP 立即失效)、目的网段为某个子网自身(覆盖直连路由)、下一跳为某个子网的网关(指回路由器自身)。
1050
+ * Create a static route
1051
+ * @description Three forms that would sever connectivity are rejected: a destination of `0.0.0.0/0`, which overrides the default route and takes every floating IP offline immediately; a destination equal to the CIDR of a subnet, which overrides its directly connected route; and a next hop equal to the gateway of a subnet, which points back at the router itself.
913
1052
  */
914
1053
  post: operations["create-route"];
915
1054
  delete?: never;
@@ -928,7 +1067,7 @@ export interface paths {
928
1067
  get?: never;
929
1068
  put?: never;
930
1069
  post?: never;
931
- /** 删除静态路由 */
1070
+ /** Delete a static route */
932
1071
  delete: operations["delete-route"];
933
1072
  options?: never;
934
1073
  head?: never;
@@ -943,12 +1082,12 @@ export interface paths {
943
1082
  cookie?: never;
944
1083
  };
945
1084
  /**
946
- * 列出子网
947
- * @description IPv6 子网也在返回结果中,ip_version 为 6。它在启用 IPv6 时自动创建,不可单独删除。
1085
+ * List subnets
1086
+ * @description IPv6 subnets are included, with `ip_version` 6. They are created when IPv6 is enabled and cannot be deleted individually.
948
1087
  */
949
1088
  get: operations["list-subnets"];
950
1089
  put?: never;
951
- /** 创建子网 */
1090
+ /** Create a subnet */
952
1091
  post: operations["create-subnet"];
953
1092
  delete?: never;
954
1093
  options?: never;
@@ -964,8 +1103,8 @@ export interface paths {
964
1103
  cookie?: never;
965
1104
  };
966
1105
  /**
967
- * 推荐下一个空闲网段
968
- * @description 返回的只是建议值,创建子网时仍会重新校验。用于避免手工计算下一个空闲网段时出错。
1106
+ * Suggest the next free CIDR
1107
+ * @description The returned value is a suggestion and is validated again when the subnet is created. It exists to avoid errors when computing the next free CIDR by hand.
969
1108
  */
970
1109
  get: operations["suggest-subnet-cidr"];
971
1110
  put?: never;
@@ -987,8 +1126,8 @@ export interface paths {
987
1126
  put?: never;
988
1127
  post?: never;
989
1128
  /**
990
- * 删除子网
991
- * @description 该子网中仍有网卡,或仍有静态路由的下一跳落在该网段内时,删除会被拒绝。
1129
+ * Delete a subnet
1130
+ * @description Deletion is rejected while network interfaces remain in the subnet, or while a static route has a next hop inside its CIDR.
992
1131
  */
993
1132
  delete: operations["delete-subnet"];
994
1133
  options?: never;
@@ -1003,12 +1142,12 @@ export interface paths {
1003
1142
  path?: never;
1004
1143
  cookie?: never;
1005
1144
  };
1006
- /** 列出安全组 */
1145
+ /** List security groups */
1007
1146
  get: operations["list-security-groups"];
1008
1147
  put?: never;
1009
1148
  /**
1010
- * 创建安全组
1011
- * @description 新建的安全组带有一条规则:放行 ICMP 需要分片(type 3 code 4)。缺少该规则会导致路径 MTU 发现失败,表现为连接建立后传输大数据包时卡住。
1149
+ * Create a security group
1150
+ * @description A new security group carries one rule, permitting ICMP fragmentation-needed messages (type 3, code 4). Without it path MTU discovery fails, which presents as connections that establish and then stall on large packets.
1012
1151
  */
1013
1152
  post: operations["create-security-group"];
1014
1153
  delete?: never;
@@ -1024,18 +1163,22 @@ export interface paths {
1024
1163
  path?: never;
1025
1164
  cookie?: never;
1026
1165
  };
1027
- /** 查看安全组 */
1166
+ /** Retrieve a security group */
1028
1167
  get: operations["get-security-group"];
1029
1168
  put?: never;
1030
1169
  post?: never;
1031
1170
  /**
1032
- * 删除安全组
1033
- * @description 默认安全组不可删除,它随私有网络一并释放。仍被网卡引用的安全组也无法删除。
1171
+ * Delete a security group
1172
+ * @description The default security group cannot be deleted, as it is released with the private network. A security group still referenced by a network interface cannot be deleted either.
1034
1173
  */
1035
1174
  delete: operations["delete-security-group"];
1036
1175
  options?: never;
1037
1176
  head?: never;
1038
- patch?: never;
1177
+ /**
1178
+ * Rename a security group
1179
+ * @description Changes the name only. Use the rule endpoints to change rules.
1180
+ */
1181
+ patch: operations["rename-security-group"];
1039
1182
  trace?: never;
1040
1183
  };
1041
1184
  "/api/v1/security-groups/{securityGroupId}/rules": {
@@ -1045,12 +1188,12 @@ export interface paths {
1045
1188
  path?: never;
1046
1189
  cookie?: never;
1047
1190
  };
1048
- /** 列出安全组规则 */
1191
+ /** List security group rules */
1049
1192
  get: operations["list-security-group-rules"];
1050
1193
  put?: never;
1051
1194
  /**
1052
- * 创建安全组规则
1053
- * @description 重复添加同一条规则会被拒绝。判重时 `0.0.0.0/0`、`::/0` 与留空视为等同。
1195
+ * Create a security group rule
1196
+ * @description Adding an identical rule twice is rejected. For that comparison `0.0.0.0/0`, `::/0` and an omitted value are treated as equivalent.
1054
1197
  */
1055
1198
  post: operations["create-security-group-rule"];
1056
1199
  delete?: never;
@@ -1069,7 +1212,7 @@ export interface paths {
1069
1212
  get?: never;
1070
1213
  put?: never;
1071
1214
  post?: never;
1072
- /** 删除安全组规则 */
1215
+ /** Delete a security group rule */
1073
1216
  delete: operations["delete-security-group-rule"];
1074
1217
  options?: never;
1075
1218
  head?: never;
@@ -1083,14 +1226,14 @@ export interface paths {
1083
1226
  path?: never;
1084
1227
  cookie?: never;
1085
1228
  };
1086
- /** 列出快照 */
1229
+ /** List snapshots */
1087
1230
  get: operations["list-snapshots"];
1088
1231
  put?: never;
1089
1232
  /**
1090
- * 创建快照
1091
- * @description 运行中云服务器上挂载的云硬盘同样可以创建快照。快照记录的是某一时刻的块设备状态,文件系统层面可能不一致,重要数据建议先在云服务器内执行 sync。
1233
+ * Create a snapshot
1234
+ * @description Disks attached to a running instance can be snapshotted. A snapshot records the state of the block device at a point in time and may be inconsistent at the file-system level, so run `sync` inside the instance first where the data matters.
1092
1235
  *
1093
- * **系统盘的快照不能用于回滚该系统盘**:回滚要求先从云服务器上卸载,而系统盘不可卸载。它可用于创建一块新的数据盘。需要保留并恢复整个系统时,请使用自制镜像;需要可跨可用区、且在云硬盘删除后仍可恢复的副本时,请使用备份。
1236
+ * **A snapshot of a system disk cannot be used to revert that system disk**: reverting requires the disk to be detached, and a system disk cannot be detached. It can be used to create a new data disk. To preserve and restore an entire system, use a private image; for a copy that crosses availability zones and survives deletion of the disk, use a backup.
1094
1237
  */
1095
1238
  post: operations["create-snapshot"];
1096
1239
  delete?: never;
@@ -1106,15 +1249,15 @@ export interface paths {
1106
1249
  path?: never;
1107
1250
  cookie?: never;
1108
1251
  };
1109
- /** 查看快照 */
1252
+ /** Retrieve a snapshot */
1110
1253
  get: operations["get-snapshot"];
1111
1254
  put?: never;
1112
1255
  post?: never;
1113
- /** 删除快照 */
1256
+ /** Delete a snapshot */
1114
1257
  delete: operations["delete-snapshot"];
1115
1258
  options?: never;
1116
1259
  head?: never;
1117
- /** 重命名快照 */
1260
+ /** Rename a snapshot */
1118
1261
  patch: operations["rename-snapshot"];
1119
1262
  trace?: never;
1120
1263
  };
@@ -1132,7 +1275,7 @@ export interface components {
1132
1275
  status: number;
1133
1276
  };
1134
1277
  BackupResource: {
1135
- /** @description 源云硬盘所在的可用区。恢复时可选择本地区的其他可用区 */
1278
+ /** @description Availability zone of the source disk. A restore may target another zone in the same region */
1136
1279
  availability_zone: string;
1137
1280
  /** Format: date-time */
1138
1281
  created_at: string;
@@ -1142,12 +1285,12 @@ export interface components {
1142
1285
  region_code: string;
1143
1286
  /**
1144
1287
  * Format: int64
1145
- * @description 创建备份时源云硬盘的容量。恢复出的云硬盘不能小于此容量
1288
+ * @description Capacity of the source disk when the backup was created. A restored disk cannot be smaller than this
1146
1289
  */
1147
1290
  size_gb: number;
1148
1291
  /**
1149
1292
  * Format: uuid
1150
- * @description 备份来源。该云硬盘删除后本备份仍然可用
1293
+ * @description The disk this backup was taken from. The backup remains usable after that disk is deleted
1151
1294
  */
1152
1295
  source_disk_id: string;
1153
1296
  /** @enum {string} */
@@ -1167,29 +1310,29 @@ export interface components {
1167
1310
  RestoreBackupRequestBody: {
1168
1311
  /**
1169
1312
  * Format: uuid
1170
- * @description 可选择与源云硬盘不同的可用区,但必须在同一地区
1313
+ * @description May differ from the availability zone of the source disk, but must be in the same region
1171
1314
  */
1172
1315
  disk_type_id: string;
1173
1316
  name: string;
1174
1317
  /**
1175
1318
  * Format: int64
1176
- * @description 留空时与备份等大。给出时不能小于备份
1319
+ * @description Matches the size of the backup when omitted. When given, it must not be smaller than the backup
1177
1320
  */
1178
1321
  size_gb?: number;
1179
1322
  };
1180
1323
  DiskResource: {
1181
1324
  attached_instance_id: string | null;
1182
- /** @description 云硬盘实际所在的可用区。挂载时云服务器必须位于同一可用区 */
1325
+ /** @description Availability zone the disk actually resides in. An instance must be in the same zone to attach it */
1183
1326
  availability_zone: string;
1184
1327
  /** Format: date-time */
1185
1328
  created_at: string;
1186
- /** @description 系统分配的设备名,在云服务器内看到的即为该名称 */
1329
+ /** @description Device name assigned by the system, as seen inside the instance */
1187
1330
  device: string | null;
1188
1331
  /** Format: uuid */
1189
1332
  disk_type_id: string;
1190
1333
  /** Format: uuid */
1191
1334
  id: string;
1192
- /** @description 系统盘随云服务器一并释放,不能卸载也不能单独删除 */
1335
+ /** @description A system disk is released with its instance and can be neither detached nor deleted individually */
1193
1336
  is_system: boolean;
1194
1337
  name: string;
1195
1338
  region_code: string;
@@ -1222,6 +1365,8 @@ export interface components {
1222
1365
  architecture: string;
1223
1366
  /** Format: uuid */
1224
1367
  id: string;
1368
+ /** @description The account this image lets you log in as. The password set at creation belongs to this account */
1369
+ login_username: string;
1225
1370
  /** Format: int64 */
1226
1371
  min_disk_gb: number;
1227
1372
  /** Format: int64 */
@@ -1230,14 +1375,27 @@ export interface components {
1230
1375
  os_family: string;
1231
1376
  os_version: string;
1232
1377
  region_code: string;
1233
- /** @description false 表示由该镜像创建的云服务器只能通过重装系统设置新密码 */
1378
+ /** @description False means a new password can only be set by rebuilding an instance created from this image */
1234
1379
  supports_password_reset: boolean;
1235
1380
  };
1236
1381
  ImageListResponseBody: {
1237
1382
  items: components["schemas"]["ImageResource"][] | null;
1238
1383
  };
1384
+ PrepaidPrice: {
1385
+ /**
1386
+ * @description An ISO 8601 duration (P1M, P1Y). A duration rather than a number of months: months are not
1387
+ * the same length, and storing a number leaves whoever reads it to decide what it means.
1388
+ */
1389
+ term: string;
1390
+ /**
1391
+ * @description A decimal string, not a float. Money that survives a round trip through binary floating
1392
+ * point is money that stops adding up.
1393
+ */
1394
+ amount: string;
1395
+ currency: string;
1396
+ };
1239
1397
  InstanceTypeResource: {
1240
- /** @description 该机型所属的可用区。云硬盘必须位于同一可用区才能挂载 */
1398
+ /** @description Availability zone of this instance type. A disk must be in the same zone to be attached */
1241
1399
  availability_zone_code: string;
1242
1400
  /** Format: uuid */
1243
1401
  id: string;
@@ -1253,6 +1411,39 @@ export interface components {
1253
1411
  region_code: string;
1254
1412
  /** Format: int64 */
1255
1413
  vcpus: number;
1414
+ /**
1415
+ * @description Whether this type can be ordered right now.
1416
+ *
1417
+ * It reflects a limit set by operations, not what the cloud can physically schedule — raising
1418
+ * the limit does not create capacity that is not there, and a type that is not sold out can
1419
+ * still fail to start if the zone is full.
1420
+ *
1421
+ * It is advisory: it is read when the list is built, and the last one can be taken between
1422
+ * that read and the order. The order is what actually refuses.
1423
+ */
1424
+ sold_out: boolean;
1425
+ /**
1426
+ * Format: int64
1427
+ * @description How many more may be created. Absent when this type is not limited at all.
1428
+ *
1429
+ * Absent is not zero and not "unknown": a type with no limit simply has no number to show.
1430
+ * Reporting it as a number would need a sentinel, and any sentinel eventually gets compared
1431
+ * against a real count.
1432
+ */
1433
+ remaining?: number;
1434
+ /**
1435
+ * @description What buying this type outright costs, per term. Empty means this type is only sold by the
1436
+ * hour.
1437
+ *
1438
+ * The hourly price is not here and is not missing: it is made of finer parts than the type
1439
+ * (cores and memory are priced separately, and the type itself does not appear in the rate
1440
+ * card at all), so there is no single number to show. A term price is one number because a
1441
+ * term is one purchase.
1442
+ *
1443
+ * Advisory, like `sold_out`: it is read when the list is built. The order is what fixes the
1444
+ * price, and it refuses rather than falling back to hourly if the term is not sold.
1445
+ */
1446
+ prepaid_prices?: components["schemas"]["PrepaidPrice"][];
1256
1447
  };
1257
1448
  InstanceTypeListResponseBody: {
1258
1449
  items: components["schemas"]["InstanceTypeResource"][] | null;
@@ -1281,8 +1472,36 @@ export interface components {
1281
1472
  name: string;
1282
1473
  /** Format: int64 */
1283
1474
  size_gb: number;
1284
- /** @description 从该快照恢复。提供时容量只需不小于快照本身 */
1475
+ /**
1476
+ * Format: uuid
1477
+ * @description Restore from this snapshot. When given, the capacity need only be no smaller than the snapshot
1478
+ */
1285
1479
  snapshot_id?: string;
1480
+ /**
1481
+ * @description Buy the disk outright for this long, as an ISO 8601 duration (P1M, P1Y). Billed by the
1482
+ * hour when omitted.
1483
+ *
1484
+ * A disk bought outright can still be expanded: the difference is prorated over the days
1485
+ * left in the term, and the expiry date does not move. It is stopped, not deleted, when the
1486
+ * term runs out — the data stays and comes back once renewed.
1487
+ */
1488
+ term?: string;
1489
+ /**
1490
+ * @description How to pay for a term bought outright. Only meaningful together with `term`.
1491
+ *
1492
+ * `balance` takes it from the account balance and either succeeds or refuses on the spot.
1493
+ * `online` returns a `checkout_url` instead and **creates nothing** — the resource is only
1494
+ * created once the money arrives and the customer comes back to place it again. That last
1495
+ * part is deliberate: a successful payment should not silently turn into a machine, because
1496
+ * between paying and returning they may have changed their mind.
1497
+ *
1498
+ * Online payment is not a second wallet. What arrives lands in the balance first and the
1499
+ * order is settled from there, so money topped up and money paid at checkout are the same
1500
+ * pool.
1501
+ * @default balance
1502
+ * @enum {string}
1503
+ */
1504
+ payment_method?: "balance" | "online";
1286
1505
  };
1287
1506
  RenameDiskRequestBody: {
1288
1507
  name: string;
@@ -1290,14 +1509,14 @@ export interface components {
1290
1509
  ResizeDiskRequestBody: {
1291
1510
  /**
1292
1511
  * Format: int64
1293
- * @description 必须大于当前容量
1512
+ * @description Must be larger than the current capacity
1294
1513
  */
1295
1514
  size_gb: number;
1296
1515
  };
1297
1516
  RevertDiskRequestBody: {
1298
1517
  /**
1299
1518
  * Format: uuid
1300
- * @description 必须是该云硬盘最新的一个快照
1519
+ * @description Must be the most recent snapshot of the disk
1301
1520
  */
1302
1521
  snapshot_id: string;
1303
1522
  };
@@ -1315,7 +1534,7 @@ export interface components {
1315
1534
  id: string;
1316
1535
  region_code: string;
1317
1536
  /**
1318
- * @description idle 表示尚未绑定到网卡
1537
+ * @description `idle` means the address is not bound to a network interface
1319
1538
  * @enum {string}
1320
1539
  */
1321
1540
  status: "idle" | "bound";
@@ -1324,7 +1543,7 @@ export interface components {
1324
1543
  items: components["schemas"]["FloatingIPResource"][] | null;
1325
1544
  };
1326
1545
  AllocateFloatingIPRequestBody: {
1327
- /** @description 指定要申领的地址。留空时由平台自动分配 */
1546
+ /** @description The address to allocate. Allocated by the platform when omitted */
1328
1547
  address?: string;
1329
1548
  /** Format: uuid */
1330
1549
  private_network_id: string;
@@ -1332,7 +1551,7 @@ export interface components {
1332
1551
  SetBandwidthRequestBody: {
1333
1552
  /**
1334
1553
  * Format: int64
1335
- * @description 出入方向均限制为该值
1554
+ * @description Applied to both directions
1336
1555
  */
1337
1556
  mbps: number;
1338
1557
  };
@@ -1344,47 +1563,67 @@ export interface components {
1344
1563
  availability_zone: string;
1345
1564
  /** Format: date-time */
1346
1565
  created_at: string;
1347
- /** @description 云服务器内的主机名,等于云服务器 id */
1566
+ /** @description Hostname inside the instance; equals the instance id */
1348
1567
  hostname: string;
1349
1568
  /** Format: uuid */
1350
1569
  id: string;
1351
1570
  /**
1352
1571
  * Format: uuid
1353
- * @description 从平台提供的镜像创建时非空
1572
+ * @description Non-empty when the instance was created from a disk you already had, instead of from an image
1573
+ */
1574
+ boot_disk_id: string | null;
1575
+ /**
1576
+ * Format: uuid
1577
+ * @description Non-empty when the instance was created from a platform image
1354
1578
  */
1355
1579
  image_id: string | null;
1356
1580
  /**
1357
1581
  * Format: uuid
1358
- * @description 当前生效的机型,即当前计费依据
1582
+ * @description The instance type in effect, and the basis for billing
1359
1583
  */
1360
1584
  instance_type_id: string;
1361
- /** @description 云服务器主网卡的 IPv6 地址。私有网络启用 IPv6 后自动下发 */
1585
+ /** @description IPv6 address of the primary network interface. Assigned automatically once IPv6 is enabled on the private network */
1362
1586
  ipv6_address: string | null;
1587
+ /** @description Your own classification of this instance, as key-value pairs. Empty when never set */
1588
+ labels: {
1589
+ [key: string]: string;
1590
+ };
1591
+ /** @description The account to log in as over SSH. The password set at creation belongs to this account */
1592
+ login_username: string;
1363
1593
  name: string;
1594
+ /** @description A free-text note about this instance. Empty when never set */
1595
+ notes: string;
1364
1596
  /**
1365
1597
  * Format: uuid
1366
- * @description 非空表示存在待确认的变配。确认后该机型生效,回滚则丢弃
1598
+ * @description Non-empty while a resize awaits confirmation. Confirming puts this type into effect, reverting discards it
1367
1599
  */
1368
1600
  pending_instance_type_id: string | null;
1369
1601
  /**
1370
1602
  * Format: uuid
1371
- * @description 从自制的私有镜像创建时非空
1603
+ * @description Non-empty when the instance was created from a private image
1372
1604
  */
1373
1605
  private_image_id: string | null;
1374
- /** @description 云服务器的内网地址 */
1606
+ /** @description Private address of the instance */
1375
1607
  private_ip: string | null;
1376
- /** @description 云服务器主网卡所在的私有网络 */
1608
+ /** @description Private network of the primary network interface */
1377
1609
  private_network_id: string | null;
1378
- /** @description 云服务器主网卡上绑定的公网 IPv4,未绑定时为空数组 */
1610
+ /** @description Floating IPv4 addresses bound to the primary network interface; an empty array when none are bound */
1379
1611
  public_ips: string[] | null;
1380
1612
  region_code: string;
1381
- /** @enum {string} */
1382
- status: "provisioning" | "running" | "stopped" | "rebooting" | "resizing" | "resize_verifying" | "error" | "deleting" | "suspended";
1383
- /** @description 云服务器主网卡所在的子网 */
1613
+ /**
1614
+ * @description Only `running` and `stopped` accept commands. Every other value means the instance is changing, and start, stop, reboot, resize, rebuild and password reset are all rejected.
1615
+ *
1616
+ * `transitioning` is the fallback for a change that falls into none of the categories above. It does not indicate an error; keep polling.
1617
+ *
1618
+ * `resize_verifying` is not transient: the instance is running on the new size and stays there until the resize is confirmed or reverted, with both sizes billed in the meantime.
1619
+ * @enum {string}
1620
+ */
1621
+ status: "provisioning" | "running" | "stopped" | "starting" | "stopping" | "rebooting" | "transitioning" | "resizing" | "resize_verifying" | "error" | "deleting" | "suspended";
1622
+ /** @description Subnet of the primary network interface */
1384
1623
  subnet_id: string | null;
1385
1624
  /**
1386
1625
  * Format: date-time
1387
- * @description 非空表示已被平台停服,需先解除后才能操作
1626
+ * @description Non-empty once the platform has suspended the instance, which must be lifted before any operation
1388
1627
  */
1389
1628
  suspended_at: string | null;
1390
1629
  /** Format: date-time */
@@ -1396,102 +1635,182 @@ export interface components {
1396
1635
  LaunchInstanceRequestBody: {
1397
1636
  /**
1398
1637
  * Format: int64
1399
- * @description 一次创建的台数,留空为 1。多台时名称自动编号
1638
+ * @description Number of instances to create; 1 when omitted. Names are numbered automatically for several
1400
1639
  */
1401
1640
  count?: number;
1402
- /** @description 由平台生成随机密码,仅在本次响应中返回 */
1641
+ /** @description Have the platform generate a random password, returned only in this response */
1403
1642
  generate_password?: boolean;
1404
1643
  /**
1405
1644
  * Format: uuid
1406
- * @description 平台提供的镜像。与 private_image_id 二选一
1645
+ * @description Boot a disk you already have instead of installing an image. The disk must be available, unattached, and in the same availability zone as the instance type. Exactly one of this, `image_id` and `private_image_id`
1646
+ */
1647
+ boot_disk_id?: string;
1648
+ /**
1649
+ * Format: uuid
1650
+ * @description A platform image. Exactly one of this, `private_image_id` and `boot_disk_id`
1407
1651
  */
1408
1652
  image_id?: string;
1409
1653
  /** Format: uuid */
1410
1654
  instance_type_id: string;
1655
+ /** @description The account the disk lets you log in as. Required with `boot_disk_id`, and rejected without it since an image states its own */
1656
+ login_username?: string;
1411
1657
  name: string;
1412
- /** @description root 的登录密码。留空时仅使用项目的 SSH 公钥 */
1658
+ /** @description The password to set, on the login account and on root. Only the SSH public keys of the project are used when omitted */
1413
1659
  password?: string;
1414
1660
  /**
1415
1661
  * Format: uuid
1416
- * @description 使用已有网卡(可预先绑定公网 IP)。与 subnet_id 二选一;使用时只能创建一台
1662
+ * @description Use an existing network interface, which may already have a floating IP bound. Exactly one of this and `subnet_id`; only one instance can be created when it is used
1417
1663
  */
1418
1664
  port_id?: string;
1419
1665
  /**
1420
1666
  * Format: uuid
1421
- * @description 自制镜像。与 image_id 二选一
1667
+ * @description A private image. Exactly one of this, `image_id` and `boot_disk_id`
1422
1668
  */
1423
1669
  private_image_id?: string;
1670
+ /**
1671
+ * @description How to pay for a term bought outright. Only meaningful together with `term`.
1672
+ *
1673
+ * `balance` takes it from the account balance and either succeeds or refuses on the spot.
1674
+ * `online` returns a `checkout_url` instead and **creates nothing** — the resource is only
1675
+ * created once the money arrives and the customer comes back to place it again. That last
1676
+ * part is deliberate: a successful payment should not silently turn into a machine, because
1677
+ * between paying and returning they may have changed their mind.
1678
+ *
1679
+ * Online payment is not a second wallet. What arrives lands in the balance first and the
1680
+ * order is settled from there, so money topped up and money paid at checkout are the same
1681
+ * pool.
1682
+ * @default balance
1683
+ * @enum {string}
1684
+ */
1685
+ payment_method?: "balance" | "online";
1686
+ /**
1687
+ * @description Buy the instance outright for this long, as an ISO 8601 duration (P1M, P1Y). Billed by the
1688
+ * hour when omitted.
1689
+ *
1690
+ * The money is taken from the balance when the order is placed, at the price the catalogue
1691
+ * reported for this type and term. If that term is not on sale for this type the request is
1692
+ * refused — it is never quietly sold by the hour instead, because the customer who asked for
1693
+ * a year would find out only from the bill.
1694
+ *
1695
+ * The system disk is bought for the same term: it is the same purchase, and one order cannot
1696
+ * be half outright and half hourly. A term is therefore refused together with `boot_disk_id`,
1697
+ * where the disk already exists and is already billed its own way.
1698
+ *
1699
+ * When the term runs out the instance is stopped, not deleted, and starts again once it is
1700
+ * renewed. Renewal lives in the billing console, across every product, because what a
1701
+ * customer needs to see is everything expiring this month rather than one product at a time.
1702
+ */
1703
+ term?: string;
1424
1704
  /**
1425
1705
  * Format: int64
1426
- * @description 系统盘容量(GB)。留空时按镜像要求与平台下限自动选择
1706
+ * @description System disk capacity in GB. Chosen automatically from the requirement of the image and the platform minimum when omitted. Ignored with `boot_disk_id`, since that disk already has its capacity
1427
1707
  */
1428
1708
  root_disk_gb?: number;
1429
- /** @description 新建主网卡时必填,至少一个;不会自动使用默认安全组。使用 port_id 时忽略——那张网卡的安全组在创建它时已经定了 */
1709
+ /** @description Required when a primary network interface is created, at least one; the default security group is not applied automatically. Ignored together with `port_id`, as the security groups of that interface were fixed when it was created */
1430
1710
  security_group_ids?: string[] | null;
1431
1711
  /**
1432
1712
  * Format: uuid
1433
- * @description 在该子网内新建主网卡。与 port_id 二选一
1713
+ * @description Create the primary network interface in this subnet. Exactly one of this and `port_id`
1434
1714
  */
1435
1715
  subnet_id?: string;
1436
1716
  };
1437
1717
  LaunchInstanceResponseBody: {
1438
- /** @description 非空表示只成功创建了部分云服务器,其余因该原因中止 */
1718
+ /** @description Non-empty when only some of the instances were created, stating why the sequence stopped */
1439
1719
  failure: string | null;
1440
- /** @description 按请求顺序返回,单台创建时也是数组 */
1720
+ /** @description Returned in request order; an array even for a single instance */
1441
1721
  instances: components["schemas"]["InstanceResource"][] | null;
1442
- /** @description 仅在本次响应中返回,请及时保存。批量创建时所有云服务器共用它 */
1722
+ /** @description Returned only in this response; store it immediately. All instances of a batch share it */
1443
1723
  password: string;
1724
+ /**
1725
+ * @description Present only when `payment_method` was `online`: **nothing was created**. Send the
1726
+ * customer here to pay.
1727
+ *
1728
+ * What comes back is not a resource but a bill to settle. Treating this response as a
1729
+ * success and moving on is how something gets handed over without the money arriving —
1730
+ * and it looks exactly like a normal creation from the outside.
1731
+ */
1732
+ checkout_url?: string;
1733
+ };
1734
+ SetInstanceLabelsRequestBody: {
1735
+ /** @description The complete set of labels. Whatever is absent here is removed; send an empty object to clear them all. A key may not contain a colon, whitespace or control characters */
1736
+ labels: {
1737
+ [key: string]: string;
1738
+ };
1739
+ };
1740
+ SetInstanceNotesRequestBody: {
1741
+ /** @description The complete note. Send an empty string to clear it */
1742
+ notes: string;
1444
1743
  };
1445
1744
  RenameInstanceRequestBody: {
1446
1745
  name: string;
1447
1746
  };
1448
- ActOnInstanceRequestBody: {
1449
- /** @enum {string} */
1450
- action: "start" | "stop" | "reboot";
1451
- /** @description 仅适用于 reboot。强制重启不等待操作系统正常关闭,未落盘的数据会丢失,用于系统已无响应的情况 */
1747
+ RebootInstanceRequestBody: {
1748
+ /** @description A forced reboot does not wait for the operating system to shut down and unwritten data is lost; use it when the system is unresponsive. False when omitted */
1452
1749
  force?: boolean;
1453
1750
  };
1751
+ RunCommandRequestBody: {
1752
+ /** @description Run by the login shell, so pipes, redirection and `&&` work. It cannot read standard input */
1753
+ command: string;
1754
+ /**
1755
+ * Format: int64
1756
+ * @description Kill the command after this long. 60 when omitted
1757
+ */
1758
+ timeout_seconds?: number;
1759
+ };
1760
+ CommandResultResponseBody: {
1761
+ /**
1762
+ * Format: int64
1763
+ * @description What the command exited with, 0 being success. Any other value is the command's own verdict and still arrives as a 200. Null when it was killed rather than exiting on its own, which includes the timeout — null is the absence of a verdict, not a successful one
1764
+ */
1765
+ exit_code: number | null;
1766
+ stderr: string;
1767
+ stdout: string;
1768
+ /** @description True when the command was still running at the timeout and was killed */
1769
+ timed_out: boolean;
1770
+ /** @description True when either stream hit the 1 MiB cap and the rest was discarded */
1771
+ truncated: boolean;
1772
+ };
1454
1773
  ConsoleResponseBody: {
1455
- /** @description 远程控制台的连接地址,一次性使用且数分钟后失效 */
1774
+ /** @description Connection address of the remote console; single-use and expires within minutes */
1456
1775
  console_url: string;
1457
1776
  };
1458
1777
  ConsoleOutputResponseBody: {
1459
- /** @description 串口输出的原始文本,行序与云服务器内一致 */
1778
+ /** @description Raw text of the console output, in the same line order as inside the instance */
1460
1779
  output: string;
1461
1780
  };
1462
1781
  ResetPasswordRequestBody: {
1463
- /** @description 由平台生成随机密码,仅在本次响应中返回 */
1782
+ /** @description Have the platform generate a random password, returned only in this response */
1464
1783
  generate_password?: boolean;
1465
- /** @description 新的 root 密码。与 generate_password 二选一 */
1784
+ /** @description New root password. Exactly one of this and `generate_password` */
1466
1785
  password?: string;
1467
1786
  };
1468
1787
  ResetPasswordResponseBody: {
1469
- /** @description 平台生成的密码,仅本次返回。自行设置密码时为空 */
1788
+ /** @description The password generated by the platform, returned only in this response. Empty when the password was supplied in the request */
1470
1789
  password: string;
1471
1790
  };
1472
1791
  RebuildInstanceRequestBody: {
1473
1792
  generate_password?: boolean;
1474
1793
  /**
1475
1794
  * Format: uuid
1476
- * @description 平台提供的镜像。与 private_image_id 二选一
1795
+ * @description A platform image. Exactly one of this and `private_image_id`
1477
1796
  */
1478
1797
  image_id?: string;
1479
1798
  password?: string;
1480
1799
  /**
1481
1800
  * Format: uuid
1482
- * @description 自制镜像。与 image_id 二选一
1801
+ * @description A private image. Exactly one of this and `image_id`
1483
1802
  */
1484
1803
  private_image_id?: string;
1485
1804
  };
1486
1805
  RebuildInstanceResponseBody: {
1487
1806
  instance: components["schemas"]["InstanceResource"];
1488
- /** @description 仅在本次响应中返回,请及时保存 */
1807
+ /** @description Returned only in this response; store it immediately */
1489
1808
  password: string;
1490
1809
  };
1491
1810
  ResizeInstanceRequestBody: {
1492
1811
  /**
1493
1812
  * Format: uuid
1494
- * @description 必须与当前机型位于同一地区和可用区
1813
+ * @description Must be in the same region and availability zone as the current instance type
1495
1814
  */
1496
1815
  instance_type_id: string;
1497
1816
  };
@@ -1508,14 +1827,14 @@ export interface components {
1508
1827
  /** Format: uuid */
1509
1828
  id: string;
1510
1829
  ipv6_address: string | null;
1511
- /** @description 主网卡随云服务器一并创建和释放,不可单独卸载 */
1830
+ /** @description A primary network interface is created and released with its instance and cannot be detached individually */
1512
1831
  is_primary: boolean;
1513
1832
  mac: string | null;
1514
1833
  name: string;
1515
1834
  private_ip: string | null;
1516
1835
  /** Format: uuid */
1517
1836
  private_network_id: string;
1518
- /** @description 绑在这张网卡上的公网 IPv4,未绑定时为空数组 */
1837
+ /** @description Floating IPv4 addresses bound to this network interface; an empty array when none are bound */
1519
1838
  public_ips: string[] | null;
1520
1839
  /** Format: uuid */
1521
1840
  subnet_id: string;
@@ -1528,24 +1847,30 @@ export interface components {
1528
1847
  port_id: string;
1529
1848
  };
1530
1849
  OperationLogResource: {
1531
- /** @description 操作名,与接口的 operation id 一致 */
1850
+ /** @description Name of the operation; matches the operation id of the endpoint */
1532
1851
  action: string;
1533
- /** @description 发起该操作的用户。平台执行时为空 */
1852
+ /** @description The user who initiated the operation. Empty when the platform performed it */
1534
1853
  actor: string | null;
1535
- /** @description true 表示由平台代为执行 */
1854
+ /**
1855
+ * @description The name this user went by at the time of the operation, recorded alongside the operation itself. It is not refreshed afterwards: the record states who acted then, and a name read today is a statement about a different moment.
1856
+ *
1857
+ * Null on entries recorded before this field existed, and on entries performed by the platform. An empty string means the account had no name recorded.
1858
+ */
1859
+ actor_name: string | null;
1860
+ /** @description True when the operation was performed by the platform */
1536
1861
  by_platform: boolean;
1537
1862
  /** Format: date-time */
1538
1863
  created_at: string;
1539
- /** @description 失败时的简要原因 */
1864
+ /** @description Brief reason for the failure */
1540
1865
  failure: string | null;
1541
1866
  /** Format: uuid */
1542
1867
  id: string;
1543
- /** @description 该次请求的路径与查询参数。密码一类的字段已被隐去 */
1868
+ /** @description Path and query parameters of the request. Fields such as passwords are redacted */
1544
1869
  payload: {
1545
1870
  [key: string]: unknown;
1546
1871
  };
1547
1872
  region_code: string | null;
1548
- /** @description 创建类操作为空:新资源的 id 在响应中,不在请求路径上 */
1873
+ /** @description Empty for create operations: the id of the new resource is in the response, not in the request path */
1549
1874
  subject_id: string;
1550
1875
  subject_type: string;
1551
1876
  succeeded: boolean;
@@ -1557,9 +1882,9 @@ export interface components {
1557
1882
  };
1558
1883
  CreatePortRequestBody: {
1559
1884
  name?: string;
1560
- /** @description 指定私网地址。留空时自动分配 */
1885
+ /** @description The private address to assign. Allocated automatically when omitted */
1561
1886
  private_ip?: string;
1562
- /** @description 至少一个,且必须属于同一个私有网络 */
1887
+ /** @description At least one, and all must belong to the same private network */
1563
1888
  security_group_ids: string[] | null;
1564
1889
  /** Format: uuid */
1565
1890
  subnet_id: string;
@@ -1568,38 +1893,40 @@ export interface components {
1568
1893
  architecture: string;
1569
1894
  /** Format: date-time */
1570
1895
  created_at: string;
1571
- /** @description 制作失败的原因,仅在 status 为 error 时非空 */
1896
+ /** @description Reason the capture failed; non-empty only when `status` is `error` */
1572
1897
  failure: string | null;
1573
1898
  /** Format: uuid */
1574
1899
  id: string;
1900
+ /** @description The account this image lets you log in as. The password set at creation belongs to this account */
1901
+ login_username: string;
1575
1902
  /**
1576
1903
  * Format: int64
1577
- * @description 使用本镜像创建云服务器时,系统盘不能小于此容量
1904
+ * @description The system disk of an instance created from this image cannot be smaller than this
1578
1905
  */
1579
1906
  min_disk_gb: number;
1580
1907
  /**
1581
1908
  * Format: int64
1582
- * @description 使用本镜像创建云服务器时,机型内存不能小于此容量
1909
+ * @description The instance type of an instance created from this image must have at least this much memory
1583
1910
  */
1584
1911
  min_ram_mb: number;
1585
1912
  name: string;
1586
1913
  os_family: string;
1587
1914
  os_version: string;
1588
- /** @description 镜像只能用于所在地区 */
1915
+ /** @description An image can only be used in the region that holds it */
1589
1916
  region_code: string;
1590
1917
  /**
1591
1918
  * Format: int64
1592
- * @description 镜像占用的存储容量,制作完成前为 0
1919
+ * @description Storage occupied by the image; 0 until the capture completes
1593
1920
  */
1594
1921
  size_bytes: number;
1595
1922
  /**
1596
1923
  * Format: uuid
1597
- * @description 制作来源。该云服务器释放后本镜像仍然可用
1924
+ * @description The instance this image was captured from. The image remains usable after that instance is released
1598
1925
  */
1599
1926
  source_instance_id: string | null;
1600
1927
  /** @enum {string} */
1601
1928
  status: "provisioning" | "uploading" | "available" | "deleting" | "error";
1602
- /** @description false 表示由该镜像创建的云服务器只能通过重装系统设置新密码 */
1929
+ /** @description False means a new password can only be set by rebuilding an instance created from this image */
1603
1930
  supports_password_reset: boolean;
1604
1931
  };
1605
1932
  PrivateImageListResponseBody: {
@@ -1608,7 +1935,7 @@ export interface components {
1608
1935
  CreatePrivateImageRequestBody: {
1609
1936
  /**
1610
1937
  * Format: uuid
1611
- * @description 制作依据其系统盘,数据盘不包含在内
1938
+ * @description Captured from the system disk of this instance; data disks are not included
1612
1939
  */
1613
1940
  instance_id: string;
1614
1941
  name: string;
@@ -1634,7 +1961,7 @@ export interface components {
1634
1961
  items: components["schemas"]["PrivateNetworkResource"][] | null;
1635
1962
  };
1636
1963
  CreatePrivateNetworkRequestBody: {
1637
- /** @description 必须是 RFC1918 的私有网段,掩码在 /8 到 /24 之间,例如 10.0.0.0/16 */
1964
+ /** @description Must be an RFC 1918 private CIDR with a prefix length between /8 and /24, for example `10.0.0.0/16` */
1638
1965
  cidr: string;
1639
1966
  name: string;
1640
1967
  region_code: string;
@@ -1643,11 +1970,11 @@ export interface components {
1643
1970
  name: string;
1644
1971
  };
1645
1972
  IPv6ResponseBody: {
1646
- /** @description 已分配的 /64 前缀,未启用时为空 */
1973
+ /** @description The allocated /64 prefix; empty while IPv6 is disabled */
1647
1974
  cidr: string;
1648
1975
  enabled: boolean;
1649
1976
  /**
1650
- * @description 为 active 时表示 IPv6 已完全可用
1977
+ * @description `active` means IPv6 is fully available
1651
1978
  * @enum {string}
1652
1979
  */
1653
1980
  status: "pending" | "active" | "draining";
@@ -1666,9 +1993,9 @@ export interface components {
1666
1993
  };
1667
1994
  CreateRouteRequestBody: {
1668
1995
  description?: string;
1669
- /** @description 目的网段。不能为 0.0.0.0/0,也不能为某个子网自身的网段 */
1996
+ /** @description Destination CIDR. It cannot be `0.0.0.0/0`, nor the CIDR of a subnet of this network */
1670
1997
  destination: string;
1671
- /** @description 云服务器的私网地址,必须落在该私有网络的某个子网内 */
1998
+ /** @description Private address of an instance; must fall inside a subnet of this private network */
1672
1999
  nexthop: string;
1673
2000
  };
1674
2001
  SubnetResource: {
@@ -1689,12 +2016,12 @@ export interface components {
1689
2016
  items: components["schemas"]["SubnetResource"][] | null;
1690
2017
  };
1691
2018
  CreateSubnetRequestBody: {
1692
- /** @description 必须落在私有网络的网段内,且不能与已有子网重叠 */
2019
+ /** @description Must fall inside the CIDR of the private network and must not overlap an existing subnet */
1693
2020
  cidr: string;
1694
2021
  name: string;
1695
2022
  };
1696
2023
  NextFreeCidrResponseBody: {
1697
- /** @description 为空表示该私有网络内已无满足该掩码的空闲网段 */
2024
+ /** @description Empty when the private network has no free CIDR left for that prefix length */
1698
2025
  cidr: string;
1699
2026
  };
1700
2027
  SecurityGroupResource: {
@@ -1703,7 +2030,7 @@ export interface components {
1703
2030
  description: string;
1704
2031
  /** Format: uuid */
1705
2032
  id: string;
1706
- /** @description 默认安全组随私有网络一并释放,不可单独删除 */
2033
+ /** @description The default security group is released with its private network and cannot be deleted individually */
1707
2034
  is_default: boolean;
1708
2035
  name: string;
1709
2036
  /** Format: uuid */
@@ -1730,12 +2057,12 @@ export interface components {
1730
2057
  id: string;
1731
2058
  /**
1732
2059
  * Format: int64
1733
- * @description ICMP 协议下表示 code,而非端口
2060
+ * @description Denotes the ICMP code rather than a port when the protocol is ICMP
1734
2061
  */
1735
2062
  port_range_max: number | null;
1736
2063
  /**
1737
2064
  * Format: int64
1738
- * @description ICMP 协议下表示 type,而非端口
2065
+ * @description Denotes the ICMP type rather than a port when the protocol is ICMP
1739
2066
  */
1740
2067
  port_range_min: number | null;
1741
2068
  protocol: string | null;
@@ -1752,21 +2079,21 @@ export interface components {
1752
2079
  ethertype: "IPv4" | "IPv6";
1753
2080
  /**
1754
2081
  * Format: int64
1755
- * @description ICMP 协议下表示 code(0–255),而非端口
2082
+ * @description Denotes the ICMP code (0–255) rather than a port when the protocol is ICMP
1756
2083
  */
1757
2084
  port_range_max?: number | null;
1758
2085
  /**
1759
2086
  * Format: int64
1760
- * @description ICMP 协议下表示 type(0–255),而非端口
2087
+ * @description Denotes the ICMP type (0–255) rather than a port when the protocol is ICMP
1761
2088
  */
1762
2089
  port_range_min?: number | null;
1763
- /** @description 如 tcp、udp、icmp、ipv6-icmp。留空表示全部协议 */
2090
+ /** @description For example `tcp`, `udp`, `icmp` or `ipv6-icmp`. All protocols when omitted */
1764
2091
  protocol?: string;
1765
- /** @description 留空等同于 0.0.0.0/0 或 ::/0 */
2092
+ /** @description Equivalent to `0.0.0.0/0` or `::/0` when omitted */
1766
2093
  remote_ip_prefix?: string;
1767
2094
  };
1768
2095
  SnapshotResource: {
1769
- /** @description 由该快照恢复的云硬盘必须位于此可用区 */
2096
+ /** @description A disk restored from this snapshot must reside in this availability zone */
1770
2097
  availability_zone: string;
1771
2098
  /** Format: date-time */
1772
2099
  created_at: string;
@@ -1778,7 +2105,7 @@ export interface components {
1778
2105
  region_code: string;
1779
2106
  /**
1780
2107
  * Format: int64
1781
- * @description 创建快照时源云硬盘的容量。由该快照恢复的云硬盘不能小于此容量
2108
+ * @description Capacity of the source disk when the snapshot was created. A disk restored from it cannot be smaller
1782
2109
  */
1783
2110
  size_gb: number;
1784
2111
  /** @enum {string} */
@@ -1792,6 +2119,9 @@ export interface components {
1792
2119
  disk_id: string;
1793
2120
  name: string;
1794
2121
  };
2122
+ RenameSecurityGroupRequestBody: {
2123
+ name: string;
2124
+ };
1795
2125
  RenameSnapshotRequestBody: {
1796
2126
  name: string;
1797
2127
  };
@@ -1807,7 +2137,7 @@ export interface operations {
1807
2137
  "list-backups": {
1808
2138
  parameters: {
1809
2139
  query?: {
1810
- /** @description 只返回该云硬盘的备份 */
2140
+ /** @description Return only the backups of this disk */
1811
2141
  disk_id?: string;
1812
2142
  };
1813
2143
  header?: never;
@@ -2156,7 +2486,7 @@ export interface operations {
2156
2486
  parameters: {
2157
2487
  query?: {
2158
2488
  region_code?: string;
2159
- /** @description 与 region_code 同时提供,用于筛选可挂载的云硬盘 */
2489
+ /** @description Supplied together with `region_code` to filter attachable disks */
2160
2490
  availability_zone?: string;
2161
2491
  };
2162
2492
  header?: never;
@@ -2207,6 +2537,33 @@ export interface operations {
2207
2537
  "application/json": components["schemas"]["DiskResource"];
2208
2538
  };
2209
2539
  };
2540
+ /**
2541
+ * @description Payment required: **nothing was created.**
2542
+ *
2543
+ * Returned when `payment_method` is `online`. `meta.checkout_url` is where to send the
2544
+ * customer; `meta.order_id` is the order waiting on it.
2545
+ *
2546
+ * ## Why this is a status and not a field on a 200
2547
+ *
2548
+ * A field on a success response is something a client can forget to read, and forgetting it
2549
+ * means treating "we created nothing and are waiting for money" as "created" — which looks
2550
+ * identical from the outside until the bill does not add up. A 402 fails loudly in any
2551
+ * client that handles errors at all.
2552
+ *
2553
+ * ## What happens after they pay
2554
+ *
2555
+ * The money lands in the balance and the order is settled from it. The resource is **not**
2556
+ * created automatically: placing it again is the customer's move, because between paying
2557
+ * and coming back they may have changed their mind. The balance is theirs either way.
2558
+ */
2559
+ 402: {
2560
+ headers: {
2561
+ [name: string]: unknown;
2562
+ };
2563
+ content: {
2564
+ "application/json": components["schemas"]["Error"];
2565
+ };
2566
+ };
2210
2567
  /** @description Error */
2211
2568
  default: {
2212
2569
  headers: {
@@ -2608,7 +2965,10 @@ export interface operations {
2608
2965
  };
2609
2966
  "list-instances": {
2610
2967
  parameters: {
2611
- query?: never;
2968
+ query?: {
2969
+ /** @description Only instances carrying this label, written as `key:value` — for example `env:prod`. Both halves are matched exactly */
2970
+ label?: string;
2971
+ };
2612
2972
  header?: never;
2613
2973
  path?: never;
2614
2974
  cookie?: never;
@@ -2657,6 +3017,33 @@ export interface operations {
2657
3017
  "application/json": components["schemas"]["LaunchInstanceResponseBody"];
2658
3018
  };
2659
3019
  };
3020
+ /**
3021
+ * @description Payment required: **nothing was created.**
3022
+ *
3023
+ * Returned when `payment_method` is `online`. `meta.checkout_url` is where to send the
3024
+ * customer; `meta.order_id` is the order waiting on it.
3025
+ *
3026
+ * ## Why this is a status and not a field on a 200
3027
+ *
3028
+ * A field on a success response is something a client can forget to read, and forgetting it
3029
+ * means treating "we created nothing and are waiting for money" as "created" — which looks
3030
+ * identical from the outside until the bill does not add up. A 402 fails loudly in any
3031
+ * client that handles errors at all.
3032
+ *
3033
+ * ## What happens after they pay
3034
+ *
3035
+ * The money lands in the balance and the order is settled from it. The resource is **not**
3036
+ * created automatically: placing it again is the customer's move, because between paying
3037
+ * and coming back they may have changed their mind. The balance is theirs either way.
3038
+ */
3039
+ 402: {
3040
+ headers: {
3041
+ [name: string]: unknown;
3042
+ };
3043
+ content: {
3044
+ "application/json": components["schemas"]["Error"];
3045
+ };
3046
+ };
2660
3047
  /** @description Error */
2661
3048
  default: {
2662
3049
  headers: {
@@ -2763,7 +3150,7 @@ export interface operations {
2763
3150
  };
2764
3151
  };
2765
3152
  };
2766
- "act-on-instance": {
3153
+ "run-instance-command": {
2767
3154
  parameters: {
2768
3155
  query?: never;
2769
3156
  header?: never;
@@ -2774,7 +3161,7 @@ export interface operations {
2774
3161
  };
2775
3162
  requestBody: {
2776
3163
  content: {
2777
- "application/json": components["schemas"]["ActOnInstanceRequestBody"];
3164
+ "application/json": components["schemas"]["RunCommandRequestBody"];
2778
3165
  };
2779
3166
  };
2780
3167
  responses: {
@@ -2784,7 +3171,7 @@ export interface operations {
2784
3171
  [name: string]: unknown;
2785
3172
  };
2786
3173
  content: {
2787
- "application/json": components["schemas"]["InstanceResource"];
3174
+ "application/json": components["schemas"]["CommandResultResponseBody"];
2788
3175
  };
2789
3176
  };
2790
3177
  /** @description Error */
@@ -2832,7 +3219,7 @@ export interface operations {
2832
3219
  "get-instance-console-output": {
2833
3220
  parameters: {
2834
3221
  query?: {
2835
- /** @description 返回末尾多少行,0 表示全部 */
3222
+ /** @description Number of trailing lines to return; 0 returns the entire output */
2836
3223
  lines?: number;
2837
3224
  };
2838
3225
  header?: never;
@@ -2863,6 +3250,76 @@ export interface operations {
2863
3250
  };
2864
3251
  };
2865
3252
  };
3253
+ "set-instance-labels": {
3254
+ parameters: {
3255
+ query?: never;
3256
+ header?: never;
3257
+ path: {
3258
+ instanceId: string;
3259
+ };
3260
+ cookie?: never;
3261
+ };
3262
+ requestBody: {
3263
+ content: {
3264
+ "application/json": components["schemas"]["SetInstanceLabelsRequestBody"];
3265
+ };
3266
+ };
3267
+ responses: {
3268
+ /** @description OK */
3269
+ 200: {
3270
+ headers: {
3271
+ [name: string]: unknown;
3272
+ };
3273
+ content: {
3274
+ "application/json": components["schemas"]["InstanceResource"];
3275
+ };
3276
+ };
3277
+ /** @description Error */
3278
+ default: {
3279
+ headers: {
3280
+ [name: string]: unknown;
3281
+ };
3282
+ content: {
3283
+ "application/json": components["schemas"]["Error"];
3284
+ };
3285
+ };
3286
+ };
3287
+ };
3288
+ "set-instance-notes": {
3289
+ parameters: {
3290
+ query?: never;
3291
+ header?: never;
3292
+ path: {
3293
+ instanceId: string;
3294
+ };
3295
+ cookie?: never;
3296
+ };
3297
+ requestBody: {
3298
+ content: {
3299
+ "application/json": components["schemas"]["SetInstanceNotesRequestBody"];
3300
+ };
3301
+ };
3302
+ responses: {
3303
+ /** @description OK */
3304
+ 200: {
3305
+ headers: {
3306
+ [name: string]: unknown;
3307
+ };
3308
+ content: {
3309
+ "application/json": components["schemas"]["InstanceResource"];
3310
+ };
3311
+ };
3312
+ /** @description Error */
3313
+ default: {
3314
+ headers: {
3315
+ [name: string]: unknown;
3316
+ };
3317
+ content: {
3318
+ "application/json": components["schemas"]["Error"];
3319
+ };
3320
+ };
3321
+ };
3322
+ };
2866
3323
  "reset-instance-password": {
2867
3324
  parameters: {
2868
3325
  query?: never;
@@ -2898,6 +3355,41 @@ export interface operations {
2898
3355
  };
2899
3356
  };
2900
3357
  };
3358
+ "reboot-instance": {
3359
+ parameters: {
3360
+ query?: never;
3361
+ header?: never;
3362
+ path: {
3363
+ instanceId: string;
3364
+ };
3365
+ cookie?: never;
3366
+ };
3367
+ requestBody: {
3368
+ content: {
3369
+ "application/json": components["schemas"]["RebootInstanceRequestBody"];
3370
+ };
3371
+ };
3372
+ responses: {
3373
+ /** @description OK */
3374
+ 200: {
3375
+ headers: {
3376
+ [name: string]: unknown;
3377
+ };
3378
+ content: {
3379
+ "application/json": components["schemas"]["InstanceResource"];
3380
+ };
3381
+ };
3382
+ /** @description Error */
3383
+ default: {
3384
+ headers: {
3385
+ [name: string]: unknown;
3386
+ };
3387
+ content: {
3388
+ "application/json": components["schemas"]["Error"];
3389
+ };
3390
+ };
3391
+ };
3392
+ };
2901
3393
  "rebuild-instance": {
2902
3394
  parameters: {
2903
3395
  query?: never;
@@ -3030,6 +3522,68 @@ export interface operations {
3030
3522
  };
3031
3523
  };
3032
3524
  };
3525
+ "start-instance": {
3526
+ parameters: {
3527
+ query?: never;
3528
+ header?: never;
3529
+ path: {
3530
+ instanceId: string;
3531
+ };
3532
+ cookie?: never;
3533
+ };
3534
+ requestBody?: never;
3535
+ responses: {
3536
+ /** @description OK */
3537
+ 200: {
3538
+ headers: {
3539
+ [name: string]: unknown;
3540
+ };
3541
+ content: {
3542
+ "application/json": components["schemas"]["InstanceResource"];
3543
+ };
3544
+ };
3545
+ /** @description Error */
3546
+ default: {
3547
+ headers: {
3548
+ [name: string]: unknown;
3549
+ };
3550
+ content: {
3551
+ "application/json": components["schemas"]["Error"];
3552
+ };
3553
+ };
3554
+ };
3555
+ };
3556
+ "stop-instance": {
3557
+ parameters: {
3558
+ query?: never;
3559
+ header?: never;
3560
+ path: {
3561
+ instanceId: string;
3562
+ };
3563
+ cookie?: never;
3564
+ };
3565
+ requestBody?: never;
3566
+ responses: {
3567
+ /** @description OK */
3568
+ 200: {
3569
+ headers: {
3570
+ [name: string]: unknown;
3571
+ };
3572
+ content: {
3573
+ "application/json": components["schemas"]["InstanceResource"];
3574
+ };
3575
+ };
3576
+ /** @description Error */
3577
+ default: {
3578
+ headers: {
3579
+ [name: string]: unknown;
3580
+ };
3581
+ content: {
3582
+ "application/json": components["schemas"]["Error"];
3583
+ };
3584
+ };
3585
+ };
3586
+ };
3033
3587
  "list-instance-disks": {
3034
3588
  parameters: {
3035
3589
  query?: never;
@@ -3296,7 +3850,7 @@ export interface operations {
3296
3850
  "list-operation-logs": {
3297
3851
  parameters: {
3298
3852
  query?: {
3299
- /** @description 只看某一种操作,取值与接口的 operation id 一致 */
3853
+ /** @description Return a single kind of operation; the value matches the operation id of the endpoint */
3300
3854
  action?: string;
3301
3855
  limit?: number;
3302
3856
  offset?: number;
@@ -3421,7 +3975,7 @@ export interface operations {
3421
3975
  "list-private-images": {
3422
3976
  parameters: {
3423
3977
  query?: {
3424
- /** @description 只返回该地区的镜像。镜像只能用于所在地区 */
3978
+ /** @description Return only the images of this region. An image can only be used in the region that holds it */
3425
3979
  region_code?: string;
3426
3980
  };
3427
3981
  header?: never;
@@ -3581,7 +4135,7 @@ export interface operations {
3581
4135
  "list-private-networks": {
3582
4136
  parameters: {
3583
4137
  query?: {
3584
- /** @description 不传时返回全部地区 */
4138
+ /** @description Returns every region when omitted */
3585
4139
  region_code?: string;
3586
4140
  };
3587
4141
  header?: never;
@@ -4058,7 +4612,7 @@ export interface operations {
4058
4612
  parameters: {
4059
4613
  query?: {
4060
4614
  region_code?: string;
4061
- /** @description 只返回该私有网络下的安全组 */
4615
+ /** @description Return only the security groups of this private network */
4062
4616
  private_network_id?: string;
4063
4617
  };
4064
4618
  header?: never;
@@ -4180,6 +4734,41 @@ export interface operations {
4180
4734
  };
4181
4735
  };
4182
4736
  };
4737
+ "rename-security-group": {
4738
+ parameters: {
4739
+ query?: never;
4740
+ header?: never;
4741
+ path: {
4742
+ securityGroupId: string;
4743
+ };
4744
+ cookie?: never;
4745
+ };
4746
+ requestBody: {
4747
+ content: {
4748
+ "application/json": components["schemas"]["RenameSecurityGroupRequestBody"];
4749
+ };
4750
+ };
4751
+ responses: {
4752
+ /** @description OK */
4753
+ 200: {
4754
+ headers: {
4755
+ [name: string]: unknown;
4756
+ };
4757
+ content: {
4758
+ "application/json": components["schemas"]["SecurityGroupResource"];
4759
+ };
4760
+ };
4761
+ /** @description Error */
4762
+ default: {
4763
+ headers: {
4764
+ [name: string]: unknown;
4765
+ };
4766
+ content: {
4767
+ "application/json": components["schemas"]["Error"];
4768
+ };
4769
+ };
4770
+ };
4771
+ };
4183
4772
  "list-security-group-rules": {
4184
4773
  parameters: {
4185
4774
  query?: never;
@@ -4279,7 +4868,7 @@ export interface operations {
4279
4868
  "list-snapshots": {
4280
4869
  parameters: {
4281
4870
  query?: {
4282
- /** @description 只返回该云硬盘的快照 */
4871
+ /** @description Return only the snapshots of this disk */
4283
4872
  disk_id?: string;
4284
4873
  };
4285
4874
  header?: never;