aws ecr put-lifecycle-policy
Creates or updates the lifecycle policy for the specified repository. AWS CLI reference
3 options Its page in the AWS CLI reference
Options
--lifecycle-policy-textThe JSON repository policy text to apply to the repository.--registry-idThe Amazon Web Services account ID associated with the registry that contains the repository.--repository-nameThe name of the repository to receive the policy.