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, names no policy, this policy or one not active, or is not offered to every project whose plans would move (fields lists them). Or it is weaker in retention, lock, recovery tier, cadence or being mandatory. detail says which.
An error, as an RFC 7807 problem document.