dcloud ecr lifecycle-defaults putSet the default and whether it is active, preview-only or off
Organizations created before the defaults existed see them preview-only until they enable them here. The answer says what would expire across the inheriting repositories.
Synopsis
dcloud ecr lifecycle-defaults put --policy policy --mode modeFlags
--policyRequiredobject
The default, in ews-lifecycle/v1 only (the AWS ECR format is accepted per repository, not here): {"version": "ews-lifecycle/v1", rules (at most 50), keep, softDeleteDays 1–30}. softDeleteDays 0 is refused with 400: a default always keeps expired images restorable for at least a day
Constraints: JSON
--modeRequiredenum
active: the hourly run expires what the default selects in every inheriting repository; preview: it only reports; off: the default does nothing
One of:
active,preview,off
Example
dcloud ecr lifecycle-defaults put --policy '{}' --mode activeGenerated from the API description, the same one the API checks requests against and the CLI is built from.