Retire a policy
POST/v1/policies/:id/retire
Retires a policy with no plans, or moves every plan onto successor in one step. The successor must be another active policy, no weaker, and offered to every project whose plans move. Backups keep their dates through the move.
Operator only: needs a system-scoped token.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 422
- default
OK
Bad Request.
invalid_request: A query parameter is malformed.
Unauthorized.
unauthenticated: The token is missing, expired or not valid.
Forbidden.
forbidden: The token lacks the policy:write permission.
Not Found.
not_found: The id is not a UUID, or no policy has it.
Conflict.
conflict: No successor is named and plans still name the policy, counting deleted plans inside their purge grace. detail says how many there are.
Unprocessable Entity.
validation_failed: successor is not a UUID. It names no policy, this policy itself, or a policy that is not active. It is not offered to every project whose plans would move, and fields lists those projects. Or it is weaker: it keeps backups for less time or keeps fewer of them, writes to a repository with a weaker lock, promises a lower recovery rung, runs less often, or is not mandatory where this one is. detail says which.
An error, as an RFC 7807 problem document.