tcb cloudrun version delete
Delete historical versions of a CloudBase Run service in batches.
Usage
tcb cloudrun version delete -e <envId> -s <serviceName> --version-names <versionName>
Parameters
| Parameter | Required | Description | Default |
|---|---|---|---|
-e, --env-id <envId> | No | Environment ID | — |
-s, --service-name <serviceName> | No | Service name; reads cloudbaserc.json when omitted, otherwise prompts | — |
--version-names <versionNames> | No | Version names to delete, comma-separated; prompts when omitted | — |
--is-delete-server <bool> | No | Whether to delete the service, effective only when deleting the last version | false |
--is-delete-image <bool> | No | Whether to delete the image, effective only when deleting the service | false |
--operator-remark <remark> | No | Operator remark | — |
--force | No | Skip the confirmation and submit the delete request | false |
--json | No | Output JSON | false |
Examples
# Delete one historical version
tcb cloudrun version delete -e env-123456 -s my-service --version-names my-service-001
# Delete several versions
tcb cloudrun version delete -e env-123456 -s my-service --version-names my-service-001,my-service-002
# Skip confirmation and output JSON
tcb cloudrun version delete -e env-123456 -s my-service --version-names my-service-001 --force --json
# Delete the last version together with the service and its image
tcb cloudrun version delete -e env-123456 -s my-service --version-names my-service-001 --is-delete-server true --is-delete-image true --force
Output
A delete request can partially succeed. With --json, check data.SuccessVersions and data.FailVersions for the result and failure reason of each version.
Notes
- Deletion is irreversible
- Without
--forcethe CLI asks for confirmation - Version deletion limits are enforced by the server; failed versions appear in
FailVersions