| description |
|---|
Commands for managing eCDN (embedded Content Delivery Network) zones, certificates, security, WAF, and more. |
Commands for managing eCDN (embedded Content Delivery Network) for B2C Commerce storefronts.
All eCDN commands support these flags:
| Flag | Description | Environment Variable |
|---|---|---|
--tenant-id |
B2C Commerce tenant ID | SFCC_TENANT_ID |
--short-code |
API short code | SFCC_SHORT_CODE |
--json |
Output as JSON | - |
Commands that operate on a specific zone use the --zone / -z flag:
| Flag | Description |
|---|---|
--zone, -z |
Zone ID (32-char hex) or zone name |
Zone names are resolved to IDs automatically via case-insensitive lookup.
eCDN commands require OAuth authentication with these scopes:
| Operation Type | Required Scope |
|---|---|
| Read operations | sfcc.cdn-zones |
| Write operations | sfcc.cdn-zones.rw |
For complete setup instructions, see the Authentication Guide.
List all CDN zones for a tenant.
b2c ecdn zones list --tenant-id zzxy_prd| Column | Description |
|---|---|
| Name | Zone name |
| ID | Zone ID |
| Status | Zone status |
| Type | Zone type (storefront) |
Create a new storefront zone.
b2c ecdn zones create --tenant-id zzxy_prd --storefront-hostname www.example.com --origin-hostname origin.example.com| Flag | Description | Required |
|---|---|---|
--storefront-hostname |
Customer-facing hostname | Yes |
--origin-hostname |
Origin server hostname | Yes |
Purge cached content from the CDN.
# Purge by path
b2c ecdn cache purge --zone my-zone --path /products --path /categories
# Purge by cache tag
b2c ecdn cache purge --zone my-zone --tag product-123
# Purge everything
b2c ecdn cache purge --zone my-zone --purge-everything| Flag | Description |
|---|---|
--path |
Path to purge (can be repeated) |
--tag |
Cache tag to purge (can be repeated) |
--host |
Host for path purging |
--purge-everything |
Purge all cached content |
At least one purge method must be specified.
Toggle OCAPI caching page rule.
b2c ecdn cache ocapi-toggle --zone my-zone --enabled
b2c ecdn cache ocapi-toggle --zone my-zone --no-enabled| Flag | Description |
|---|---|
--enabled |
Enable or disable OCAPI caching |
List certificates for a zone.
b2c ecdn certificates list --zone my-zoneAdd a certificate to a zone.
b2c ecdn certificates add --zone my-zone --hostname www.example.com --certificate-file ./cert.pem --private-key-file ./key.pem| Flag | Description | Required |
|---|---|---|
--hostname |
Custom hostname | Yes |
--certificate-file |
Path to certificate PEM file | Yes |
--private-key-file |
Path to private key PEM file | Yes |
Get certificate details.
b2c ecdn certificates get --zone my-zone --certificate-id abc123Update a certificate.
b2c ecdn certificates update --zone my-zone --certificate-id abc123 --certificate-file ./new-cert.pem --private-key-file ./new-key.pemDelete a certificate.
b2c ecdn certificates delete --zone my-zone --certificate-id abc123Validate a custom hostname certificate.
b2c ecdn certificates validate --zone my-zone --certificate-id abc123Get security settings for a zone.
b2c ecdn security get --zone my-zoneDisplays settings including:
- SSL mode
- Always use HTTPS
- Minimum TLS version
- TLS 1.3 status
- Automatic HTTPS rewrites
- Opportunistic encryption
Update security settings.
b2c ecdn security update --zone my-zone --ssl-mode full --min-tls-version 1.2 --always-use-https| Flag | Description | Options |
|---|---|---|
--ssl-mode |
SSL/TLS mode | off, flexible, full, strict |
--min-tls-version |
Minimum TLS version | 1.0, 1.1, 1.2, 1.3 |
--always-use-https / --no-always-use-https |
Force HTTPS | - |
--tls-1-3 / --no-tls-1-3 |
Enable TLS 1.3 | - |
--automatic-https-rewrites / --no-automatic-https-rewrites |
Rewrite HTTP links | - |
--opportunistic-encryption / --no-opportunistic-encryption |
Enable opportunistic encryption | - |
Get speed optimization settings.
b2c ecdn speed get --zone my-zoneUpdate speed optimization settings.
b2c ecdn speed update --zone my-zone --browser-cache-ttl 14400 --auto-minify-html --auto-minify-css --auto-minify-js| Flag | Description |
|---|---|
--browser-cache-ttl |
Browser cache TTL in seconds |
--auto-minify-html / --no-auto-minify-html |
Auto-minify HTML |
--auto-minify-css / --no-auto-minify-css |
Auto-minify CSS |
--auto-minify-js / --no-auto-minify-js |
Auto-minify JavaScript |
--brotli / --no-brotli |
Enable Brotli compression |
--early-hints / --no-early-hints |
Enable Early Hints |
--h2-prioritization / --no-h2-prioritization |
HTTP/2 prioritization |
--image-resizing / --no-image-resizing |
Enable image resizing |
--mirage / --no-mirage |
Enable Mirage |
--polish |
Polish mode (off, lossless, lossy) |
--prefetch-preload / --no-prefetch-preload |
Prefetch preload |
--rocket-loader / --no-rocket-loader |
Rocket Loader |
List WAF v1 rule groups.
b2c ecdn waf groups list --zone my-zoneUpdate a WAF v1 group.
b2c ecdn waf groups update --zone my-zone --group-id abc123 --mode on| Flag | Description | Options |
|---|---|---|
--mode |
Group mode | on, off |
List WAF v1 rules in a group.
b2c ecdn waf rules list --zone my-zone --group-id abc123Get details of a WAF v1 rule.
b2c ecdn waf rules get --zone my-zone --rule-id abc123Update a WAF v1 rule.
b2c ecdn waf rules update --zone my-zone --rule-id abc123 --mode onList WAF v2 rulesets.
b2c ecdn waf rulesets list --zone my-zoneUpdate a WAF v2 ruleset.
b2c ecdn waf rulesets update --zone my-zone --ruleset-id abc123 --action blockList WAF v2 managed rules.
b2c ecdn waf managed-rules list --zone my-zoneUpdate a WAF v2 managed rule.
b2c ecdn waf managed-rules update --zone my-zone --rule-id abc123 --action blockGet OWASP ModSecurity package settings.
b2c ecdn waf owasp get --zone my-zoneUpdate OWASP package settings.
b2c ecdn waf owasp update --zone my-zone --sensitivity highMigrate a zone from WAF v1 to WAF v2.
b2c ecdn waf migrate --zone my-zoneList custom firewall rules.
b2c ecdn firewall list --zone my-zoneCreate a custom firewall rule.
b2c ecdn firewall create --zone my-zone --description "Block bad bots" --action block --filter '(cf.client.bot)'| Flag | Description | Required |
|---|---|---|
--description |
Rule description | Yes |
--action |
Rule action (block, challenge, js_challenge, managed_challenge, allow, log, bypass) |
Yes |
--filter |
Firewall filter expression | Yes |
--paused |
Create rule in paused state | No |
--priority |
Rule priority | No |
Get a firewall rule.
b2c ecdn firewall get --zone my-zone --rule-id abc123Update a firewall rule.
b2c ecdn firewall update --zone my-zone --rule-id abc123 --action challengeDelete a firewall rule.
b2c ecdn firewall delete --zone my-zone --rule-id abc123Reorder firewall rules.
b2c ecdn firewall reorder --zone my-zone --rule-ids id1,id2,id3List rate limiting rules.
b2c ecdn rate-limit list --zone my-zoneCreate a rate limiting rule.
b2c ecdn rate-limit create --zone my-zone --description "API rate limit" --threshold 100 --period 60 --action block --match-url '/api/*'| Flag | Description | Required |
|---|---|---|
--description |
Rule description | Yes |
--threshold |
Request threshold | Yes |
--period |
Period in seconds | Yes |
--action |
Action (block, challenge, js_challenge, managed_challenge, log, simulate) |
Yes |
--match-url |
URL pattern to match | Yes |
--match-methods |
HTTP methods (comma-separated) | No |
--timeout |
Block timeout in seconds | No |
Get a rate limiting rule.
b2c ecdn rate-limit get --zone my-zone --rule-id abc123Update a rate limiting rule.
b2c ecdn rate-limit update --zone my-zone --rule-id abc123 --threshold 200Delete a rate limiting rule.
b2c ecdn rate-limit delete --zone my-zone --rule-id abc123Create a Logpush ownership challenge token for destination verification.
b2c ecdn logpush ownership --zone my-zone --destination-path 's3://my-bucket/logs?region=us-east-1'List Logpush jobs.
b2c ecdn logpush jobs list --zone my-zoneCreate a Logpush job.
b2c ecdn logpush jobs create --zone my-zone --name "HTTP logs" --destination-path 's3://my-bucket/logs?region=us-east-1' --log-type http_requests --log-fields ClientRequestHost,ClientRequestMethod| Flag | Description | Required |
|---|---|---|
--name |
Job name | Yes |
--destination-path |
Log destination path | Yes |
--log-type |
Type of logs (http_requests, firewall_events, nel_reports, dns_logs) |
Yes |
--log-fields |
Comma-separated log fields | No |
--filter |
JSON filter expression | No |
--enabled |
Enable job on creation | No |
Get Logpush job details.
b2c ecdn logpush jobs get --zone my-zone --job-id 123456Update a Logpush job.
b2c ecdn logpush jobs update --zone my-zone --job-id 123456 --enabled
b2c ecdn logpush jobs update --zone my-zone --job-id 123456 --no-enabledDelete a Logpush job.
b2c ecdn logpush jobs delete --zone my-zone --job-id 123456List Page Shield notification webhooks.
b2c ecdn page-shield notifications list --tenant-id zzxy_prdCreate a notification webhook.
b2c ecdn page-shield notifications create --tenant-id zzxy_prd --url https://example.com/webhook --secret my-secret --zones zone1,zone2Delete a notification webhook.
b2c ecdn page-shield notifications delete --tenant-id zzxy_prd --webhook-id abc123List Page Shield policies.
b2c ecdn page-shield policies list --zone my-zoneCreate a Page Shield policy.
b2c ecdn page-shield policies create --zone my-zone --action allow --value script-src --expression 'http.request.uri.path contains "/trusted/"'| Flag | Description | Required |
|---|---|---|
--action |
Policy action (allow, log) |
Yes |
--value |
Policy value (e.g., script-src) |
Yes |
--expression |
Policy expression | No |
--description |
Policy description | No |
--enabled |
Enable policy | No |
Get a Page Shield policy.
b2c ecdn page-shield policies get --zone my-zone --policy-id abc123Update a Page Shield policy.
b2c ecdn page-shield policies update --zone my-zone --policy-id abc123 --enabledDelete a Page Shield policy.
b2c ecdn page-shield policies delete --zone my-zone --policy-id abc123List detected scripts.
b2c ecdn page-shield scripts list --zone my-zoneGet script details.
b2c ecdn page-shield scripts get --zone my-zone --script-id abc123Get MRT ruleset for a zone.
b2c ecdn mrt-rules get --zone my-zoneCreate MRT rules to route requests to a Managed Runtime environment.
b2c ecdn mrt-rules create --zone my-zone --mrt-hostname customer-pwa.mobify-storefront.com --expressions '(http.host eq "example.com")' --descriptions "Route to PWA"| Flag | Description | Required |
|---|---|---|
--mrt-hostname |
Managed Runtime instance hostname | Yes |
--expressions |
Comma-separated rule expressions | Yes |
--descriptions |
Comma-separated rule descriptions | No |
Update MRT ruleset hostname or add new rules.
b2c ecdn mrt-rules update --zone my-zone --mrt-hostname new-customer-pwa.mobify-storefront.comDelete an MRT ruleset and all rules.
b2c ecdn mrt-rules delete --zone my-zoneUpdate an individual MRT rule.
b2c ecdn mrt-rules rules update --zone my-zone --ruleset-id abc123 --rule-id def456 --enabledDelete an individual MRT rule.
b2c ecdn mrt-rules rules delete --zone my-zone --ruleset-id abc123 --rule-id def456List mTLS certificates.
b2c ecdn mtls list --tenant-id zzxy_prdCreate an mTLS certificate for code upload authentication.
b2c ecdn mtls create --tenant-id zzxy_prd --name "Build Server" --ca-certificate-file ./ca.pem --leaf-certificate-file ./leaf.pem| Flag | Description | Required |
|---|---|---|
--name |
Certificate name | Yes |
--ca-certificate-file |
Path to CA certificate PEM | Yes |
--leaf-certificate-file |
Path to leaf certificate PEM | Yes |
Get mTLS certificate details.
b2c ecdn mtls get --tenant-id zzxy_prd --certificate-id abc123Delete an mTLS certificate.
b2c ecdn mtls delete --tenant-id zzxy_prd --certificate-id abc123Get cipher suites configuration.
b2c ecdn cipher-suites get --zone my-zoneUpdate cipher suites settings.
# Use a preset suite type
b2c ecdn cipher-suites update --zone my-zone --suite-type Modern
# Use custom ciphers
b2c ecdn cipher-suites update --zone my-zone --suite-type Custom --ciphers "ECDHE-ECDSA-AES128-GCM-SHA256,ECDHE-RSA-AES128-GCM-SHA256"| Flag | Description | Required |
|---|---|---|
--suite-type |
Cipher suite type (Compatible, Modern, Custom, Legacy) |
Yes |
--ciphers |
Comma-separated cipher list (required for Custom) | Conditional |
Get origin header modification settings (MRT type).
b2c ecdn origin-headers get --zone my-zoneSet or update origin header modification.
b2c ecdn origin-headers set --zone my-zone --header-value my-secret-value
b2c ecdn origin-headers set --zone my-zone --header-value my-secret-value --header-name x-custom-header| Flag | Description | Required |
|---|---|---|
--header-value |
Value of the header to forward to origin | Yes |
--header-name |
Name of the header (cannot be changed for MRT origin) | No |
Delete origin header modification.
b2c ecdn origin-headers delete --zone my-zone