b2c-ecdn
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseB2C eCDN Skill
B2C eCDN 技能
Use the CLI plugin to manage eCDN (embedded Content Delivery Network) zones, certificates, security settings, and more.
b2cTip: Ifis not installed globally, useb2cinstead (e.g.,npx @salesforce/b2c-cli).npx @salesforce/b2c-cli ecdn zones list
使用 CLI插件来管理eCDN(嵌入式内容分发网络)区域、证书、安全设置等内容。
b2c提示: 如果没有全局安装,请改用b2c(例如:npx @salesforce/b2c-cli)。npx @salesforce/b2c-cli ecdn zones list
Prerequisites
前提条件
- OAuth credentials with scope (read operations)
sfcc.cdn-zones - OAuth credentials with scope (write operations)
sfcc.cdn-zones.rw - Tenant ID for your B2C Commerce organization
- 拥有权限范围的OAuth凭证(读取操作)
sfcc.cdn-zones - 拥有权限范围的OAuth凭证(写入操作)
sfcc.cdn-zones.rw - 你的B2C Commerce组织的租户ID
Examples
示例
List CDN Zones
列出CDN区域
bash
undefinedbash
undefinedlist all CDN zones for a tenant
list all CDN zones for a tenant
b2c ecdn zones list --tenant-id zzxy_prd
b2c ecdn zones list --tenant-id zzxy_prd
list with JSON output
list with JSON output
b2c ecdn zones list --tenant-id zzxy_prd --json
undefinedb2c ecdn zones list --tenant-id zzxy_prd --json
undefinedCreate a Storefront Zone
创建店面区域
bash
undefinedbash
undefinedcreate a new storefront zone
create a new storefront zone
b2c ecdn zones create --tenant-id zzxy_prd --storefront-hostname www.example.com --origin-hostname origin.example.com
undefinedb2c ecdn zones create --tenant-id zzxy_prd --storefront-hostname www.example.com --origin-hostname origin.example.com
undefinedPurge Cache
清除缓存
bash
undefinedbash
undefinedpurge cache for specific paths
purge cache for specific paths
b2c ecdn cache purge --tenant-id zzxy_prd --zone my-zone --path /products --path /categories
b2c ecdn cache purge --tenant-id zzxy_prd --zone my-zone --path /products --path /categories
purge by cache tags
purge by cache tags
b2c ecdn cache purge --tenant-id zzxy_prd --zone my-zone --tag product-123 --tag category-456
b2c ecdn cache purge --tenant-id zzxy_prd --zone my-zone --tag product-123 --tag category-456
purge everything
purge everything
b2c ecdn cache purge --tenant-id zzxy_prd --zone my-zone --purge-everything
undefinedb2c ecdn cache purge --tenant-id zzxy_prd --zone my-zone --purge-everything
undefinedManage Certificates
管理证书
bash
undefinedbash
undefinedlist certificates for a zone
list certificates for a zone
b2c ecdn certificates list --tenant-id zzxy_prd --zone my-zone
b2c ecdn certificates list --tenant-id zzxy_prd --zone my-zone
add a new certificate
add a new certificate
b2c ecdn certificates add --tenant-id zzxy_prd --zone my-zone --hostname www.example.com --certificate-file ./cert.pem --private-key-file ./key.pem
b2c ecdn certificates add --tenant-id zzxy_prd --zone my-zone --hostname www.example.com --certificate-file ./cert.pem --private-key-file ./key.pem
get certificate details
get certificate details
b2c ecdn certificates get --tenant-id zzxy_prd --zone my-zone --certificate-id abc123
b2c ecdn certificates get --tenant-id zzxy_prd --zone my-zone --certificate-id abc123
validate a custom hostname
validate a custom hostname
b2c ecdn certificates validate --tenant-id zzxy_prd --zone my-zone --certificate-id abc123
undefinedb2c ecdn certificates validate --tenant-id zzxy_prd --zone my-zone --certificate-id abc123
undefinedSecurity Settings
安全设置
bash
undefinedbash
undefinedget security settings
get security settings
b2c ecdn security get --tenant-id zzxy_prd --zone my-zone
b2c ecdn security get --tenant-id zzxy_prd --zone my-zone
update security settings
update security settings
b2c ecdn security update --tenant-id zzxy_prd --zone my-zone --ssl-mode full --min-tls-version 1.2 --always-use-https
undefinedb2c ecdn security update --tenant-id zzxy_prd --zone my-zone --ssl-mode full --min-tls-version 1.2 --always-use-https
undefinedSpeed Settings
速度设置
bash
undefinedbash
undefinedget speed optimization settings
get speed optimization settings
b2c ecdn speed get --tenant-id zzxy_prd --zone my-zone
b2c ecdn speed get --tenant-id zzxy_prd --zone my-zone
update speed settings
update speed settings
b2c ecdn speed update --tenant-id zzxy_prd --zone my-zone --browser-cache-ttl 14400 --auto-minify-html --auto-minify-css
undefinedb2c ecdn speed update --tenant-id zzxy_prd --zone my-zone --browser-cache-ttl 14400 --auto-minify-html --auto-minify-css
undefinedAdditional Topics
其他主题
For less commonly used eCDN features, see the reference files:
- SECURITY.md — WAF (v1 and v2), custom firewall rules, rate limiting, and Page Shield (CSP policies, script detection, notification webhooks)
- ADVANCED.md — Logpush jobs, MRT routing rules, mTLS certificates, cipher suite configuration, and origin header modification
针对不太常用的eCDN功能,请查阅参考文件:
- SECURITY.md — WAF(v1和v2)、自定义防火墙规则、速率限制和Page Shield(CSP策略、脚本检测、通知webhook)
- ADVANCED.md — Logpush作业、MRT路由规则、mTLS证书、密码套件配置和源站头部修改
Configuration
配置
The tenant ID can be set via environment variable:
- : B2C Commerce tenant ID
SFCC_TENANT_ID
The flag accepts either:
--zone- Zone ID (32-character hex string)
- Zone name (human-readable, case-insensitive lookup)
租户ID可通过环境变量设置:
- : B2C Commerce租户ID
SFCC_TENANT_ID
--zone- 区域ID(32位十六进制字符串)
- 区域名称(人类可读,不区分大小写查找)
OAuth Scopes
OAuth权限范围
| Operation | Required Scope |
|---|---|
| Read operations | |
| Write operations | |
| 操作 | 所需权限范围 |
|---|---|
| 读取操作 | |
| 写入操作 | |
More Commands
更多命令
See for a full list of available commands and options in the topic.
b2c ecdn --helpecdn查看获取主题下所有可用命令和选项的完整列表。
b2c ecdn --helpecdn