dcloud s3 bucket-objects delete-prefixDelete everything under a folder; with prefix "" and allVersions, empty the bucket
allVersions: true needs s3:DeleteObjectVersion and deletes every version and delete marker for good. Each call works ~20 seconds and answers { deleted, failed, errors, done, cursor }; while done is false, call again with cursor. A key your policies keep is reported in errors and stays.
Synopsis
dcloud s3 bucket-objects delete-prefix name --prefix prefix --all-versions allVersions [flags]Arguments
<name>Requiredstring
Also accepted as
--name. Constraints: 3-63 chars, /^[a-z0-9][a-z0-9-]*[a-z0-9]$/
Flags
--prefixRequiredstring
A folder ending in /; "" is the whole bucket
Constraints: max 1024 chars
--all-versionsRequiredboolean (--all-versions / --no-all-versions)
true: every version and delete marker, for good (Empty bucket). false: the current objects, as Delete does (a versioned bucket keeps them as old versions)
--cursorOptionalobject
From the previous answer, when it said done: false
Constraints: JSON
Example
dcloud s3 bucket-objects delete-prefix name --prefix example --all-versionsGenerated from the API description, the same one the API checks requests against and the CLI is built from.