b2c-sandbox
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseB2C Sandbox Skill
B2C沙箱技能
Only create or delete sandboxes when explicitly requested. Always confirm destructive actions.
Use the CLI plugin to manage Salesforce B2C Commerce On-demand sandboxes (ODS). Only create or delete a sandbox if explicitly asked as this may be a billable or destructible action.
b2cTip: Ifis not installed globally, useb2cinstead (e.g.,npx @salesforce/b2c-cli).npx @salesforce/b2c-cli sandbox list
Alias: Theprefix is still supported as a backward-compatible alias (e.g.,odsworks the same asb2c ods list).b2c sandbox list
仅在明确要求时创建或删除沙箱。执行破坏性操作前务必确认。
使用 CLI插件管理Salesforce B2C Commerce按需沙箱(ODS)。仅在明确要求时创建或删除沙箱,因为这可能会产生费用或造成破坏性影响。
b2c提示: 如果未全局安装,请改用b2c(例如:npx @salesforce/b2c-cli)。npx @salesforce/b2c-cli sandbox list
别名: 仍支持前缀作为向后兼容的别名(例如:ods与b2c ods list功能相同)。b2c sandbox list
Sandbox ID Formats
沙箱ID格式
Commands that operate on a specific sandbox accept two ID formats:
- UUID: The full sandbox UUID (e.g., )
abc12345-1234-1234-1234-abc123456789 - Realm-instance: The realm-instance format (e.g., or
zzzv-123)zzzv_123
The realm-instance format uses the 4-character realm code followed by a dash or underscore and the instance number. When using a realm-instance format, the CLI will automatically look up the corresponding UUID.
针对特定沙箱操作的命令支持两种ID格式:
- UUID: 完整的沙箱UUID(例如:)
abc12345-1234-1234-1234-abc123456789 - 领域实例格式: 领域-实例格式(例如:或
zzzv-123)zzzv_123
领域实例格式由4个字符的领域代码,后跟短横线或下划线及实例编号组成。使用领域实例格式时,CLI会自动查找对应的UUID。
Examples
示例
List Sandboxes
列出沙箱
bash
b2c sandbox listbash
b2c sandbox listfor realm zzpq with JSON output
针对领域zzpq,输出JSON格式结果
b2c sandbox list --realm zzpq --json
b2c sandbox list --realm zzpq --json
filter by status and those created by a specific user, only print the columns id,state,hostname
按状态和特定创建者筛选,仅显示id、state、hostname列
b2c sandbox list --filter-params 'state=started,creating&createdBy=clavery@salesforce.com' --realm zzpq --columns id,state,hostname
undefinedb2c sandbox list --filter-params 'state=started,creating&createdBy=clavery@salesforce.com' --realm zzpq --columns id,state,hostname
undefinedCreate Sandbox
创建沙箱
Only create a sandbox if explicitly asked as this may be a billable action.
bash
undefined仅在明确要求时创建沙箱,因为这可能会产生费用。
bash
undefinedcreate in realm zzpq with 4 hour TTL (0 = infinite); json output and wait for completion (this may take 5-10 minutes; timeout is 10 minutes)
在领域zzpq中创建沙箱,TTL为4小时(0表示永久);输出JSON格式结果并等待创建完成(可能需要5-10分钟;超时时间为10分钟)
b2c sandbox create --realm zzpq --ttl 4 --json --wait
b2c sandbox create --realm zzpq --ttl 4 --json --wait
create in realm zzpq with large profile (medium is default)
在领域zzpq中创建配置为large规格的沙箱(默认是medium)
b2c sandbox create --realm zzpq --profile large
b2c sandbox create --realm zzpq --profile large
create without automatic OCAPI/WebDAV permissions
创建沙箱时不自动配置OCAPI/WebDAV权限
b2c sandbox create --realm zzpq --no-set-permissions
b2c sandbox create --realm zzpq --no-set-permissions
use a different client ID for default permissions
使用其他客户端ID配置默认权限
b2c sandbox create --realm zzpq --permissions-client-id my-other-client
b2c sandbox create --realm zzpq --permissions-client-id my-other-client
custom OCAPI settings (replaces defaults)
自定义OCAPI设置(替换默认配置)
b2c sandbox create --realm zzpq --ocapi-settings '[{"client_id":"my-client","resources":[{"resource_id":"/code_versions","methods":["get"]}]}]'
b2c sandbox create --realm zzpq --ocapi-settings '[{"client_id":"my-client","resources":[{"resource_id":"/code_versions","methods":["get"]}]}]'
with start/stop scheduler
配置启动/停止调度器
b2c sandbox create --realm zzpq --start-scheduler '{"weekdays":["MONDAY","TUESDAY"],"time":"08:00:00Z"}' --stop-scheduler '{"weekdays":["MONDAY","TUESDAY"],"time":"19:00:00Z"}'
b2c sandbox create --realm zzpq --start-scheduler '{"weekdays":["MONDAY","TUESDAY"],"time":"08:00:00Z"}' --stop-scheduler '{"weekdays":["MONDAY","TUESDAY"],"time":"19:00:00Z"}'
get full log trace output to debug
获取完整日志跟踪输出以进行调试
b2c sandbox create --realm zzpq --log-level trace
undefinedb2c sandbox create --realm zzpq --log-level trace
undefinedGet/Start/Stop/Restart/Delete Sandbox
获取/启动/停止/重启/删除沙箱
Commands that operate on a specific sandbox support both UUID and realm-instance formats:
bash
undefined针对特定沙箱操作的命令同时支持UUID和领域实例格式:
bash
undefinedUsing UUID
使用UUID
b2c sandbox get abc12345-1234-1234-1234-abc123456789
b2c sandbox start abc12345-1234-1234-1234-abc123456789
b2c sandbox stop abc12345-1234-1234-1234-abc123456789
b2c sandbox get abc12345-1234-1234-1234-abc123456789
b2c sandbox start abc12345-1234-1234-1234-abc123456789
b2c sandbox stop abc12345-1234-1234-1234-abc123456789
Using realm-instance format
使用领域实例格式
b2c sandbox get zzzv-123
b2c sandbox start zzzv_123
b2c sandbox stop zzzv-123
b2c sandbox restart zzzv-123
b2c sandbox delete zzzv-123 --force
undefinedb2c sandbox get zzzv-123
b2c sandbox start zzzv_123
b2c sandbox stop zzzv-123
b2c sandbox restart zzzv-123
b2c sandbox delete zzzv-123 --force
undefinedMore Commands
更多命令
See for a full list of available commands and options in the topic.
b2c sandbox --helpsandbox如需查看主题下的所有可用命令和选项,请执行。
sandboxb2c sandbox --help