Skip to content

ezgh objects buckets settings

Show or change a bucket's settings.

Updated View as Markdown
ezgh objects buckets settings <bucket> [--public-read=true|false] [--cors-file rules.json] [--cdn-distribution cdn_…]… [--clear-cdn-distributions] [--versioning enabled|suspended] [--yes] [flags]

Show a bucket’s public-read setting, CORS rules and the CDN distributions that may read it, or change them.

--cdn-distribution lets a CDN distribution of this organization read the bucket’s objects while the bucket stays private (ezgh cdn distributions create --origin-bucket); the flags given replace the list, and --clear-cdn-distributions empties it.

--public-read=true lets anyone read the bucket’s objects without a key, and asks first on a terminal; --yes confirms otherwise. --cors-file replaces every CORS rule with a JSON array (- reads stdin); an empty array removes them.

--versioning enabled keeps every version of an object: a write keeps the versions before it, and a delete adds a delete marker. --versioning suspended keeps the versions there are, and new writes replace the current one. It prints the bucket; versions are listed with S3 tools.

Part of ezgh objects buckets.

Examples

ezgh objects buckets settings bkt_4k2m9x0a7qpe --public-read=true --yes

echo '[{"allowedOrigins":["https://example.com"],"allowedMethods":["GET"],"maxAgeSeconds":3600}]' |
  ezgh objects buckets settings bkt_4k2m9x0a7qpe --cors-file -

ezgh objects buckets settings bkt_4k2m9x0a7qpe --cdn-distribution cdn_k2m9x0a7qpe4

ezgh objects buckets settings bkt_4k2m9x0a7qpe --versioning enabled

Flags

Flag Type Default Description
--cdn-distribution string, repeatable a CDN distribution (cdn_…) that may read the bucket’s objects; repeat for more, replacing the list
--clear-cdn-distributions boolean let no CDN distribution read the bucket
--cors-file string replace the CORS rules with this JSON array (- is stdin)
--public-read boolean let anyone read the bucket’s objects without a key
--versioning string enabled keeps every version of an object; suspended stops adding versions and keeps those there are
--yes boolean don’t ask

This command also takes the global flags.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close