ezgh cdn distributions update <distribution> [--name n] [--description d] [--origin-bucket b] [--origin-host h] [--origin-protocol p] [--origin-port p] [--host-header h] [--domain hostname=crt_…]… [--clear-domains] [--rewrite pattern=/replacement]… [--clear-rewrites] [--waf waf_…|--no-waf] [--enable|--disable] [flags]Change a distribution. Only what’s given changes; --domain replaces the list of domains, and --clear-domains removes them all; --rewrite replaces the list of rewrites, and --clear-rewrites removes them all; --tag replaces its tags, and --clear-tags removes them. A disabled distribution keeps its settings and serves nothing until it’s enabled again.
Part of ezgh cdn distributions.
Examples
ezgh cdn distributions update cdn_k2m9x0a7qpe4 --origin-host new-lb.example.com
ezgh cdn distributions update cdn_k2m9x0a7qpe4 --domain www.example.com=crt_2m9x0a7qpe4k --domain example.com=crt_2m9x0a7qpe4k
ezgh cdn distributions update cdn_k2m9x0a7qpe4 --waf waf_4k2m9x0a7qpe
ezgh cdn distributions update cdn_k2m9x0a7qpe4 --disableFlags
| Flag | Type | Default | Description |
|---|---|---|---|
--clear-domains |
boolean | remove all its domains | |
--clear-rewrites |
boolean | remove all its rewrites | |
--clear-tags |
boolean | remove its tags | |
--description |
string | what it’s for (“” removes it) | |
--disable |
boolean | keep it, but serve nothing for it | |
--domain |
string, repeatable | a domain and the Web Certificates certificate that covers it, hostname=crt_…; repeat for more (at most 10), replacing the list | |
--enable |
boolean | serve it again | |
--host-header |
string | the Host header the origin gets: viewer (the visitor’s) or origin (its host) | |
--name |
string | its name | |
--no-waf |
boolean | detach its WAF: its requests stop being inspected | |
--origin-bucket |
string | instead of --origin-host: an Object Storage bucket of this organization, by name, read privately; the bucket’s settings must list the distribution (ezgh objects buckets settings --cdn-distribution) |
|
--origin-host |
string | the origin’s hostname or IPv4 address, on the internet | |
--origin-port |
int | the origin’s port | |
--origin-protocol |
string | http or https; with https the origin’s certificate must be valid for its host | |
--rewrite |
string, repeatable | a path rewrite, pattern=/replacement: a request whose path matches the regular expression is sent to the origin as the replacement path ($1 is the first capture group); repeat for more, tried in order (at most 10), replacing the list | |
--tag |
string, repeatable | a tag, key=value; repeat for more, replacing its tags | |
--waf |
string | an EZGH WAF in the project, waf_…, that inspects every request before the origin (needs waf.wafs.attach) |
This command also takes the global flags.