At the cluster setting level, a user must enable lifecycle policies. As it is enabled in the cluster, so use the management API:
...
The preserve query argument on the COPY operations indicates leaving other persisted headers as it is.
SeeS3 lifecycle policy examples. Note that Swarm currently only supports expiration policies.