Create a policy
POST/v1/policies
Sets when backups run, how long each is kept and where it is stored. It can also set the recovery and verification it promises. A public policy is offered to every project. An assigned one is offered only to the domains and projects in assigned_to.
Operator only: needs a system-scoped token.
Request
Responses
- 201
- 400
- 401
- 403
- 409
- 413
- 415
- 422
- default
Created
Bad Request.
invalid_request: The body is not a single JSON object, names a field this operation does not take, or gives a value of the wrong type.
Unauthorized.
unauthenticated: The token is missing, expired or not valid.
Forbidden.
forbidden: The token lacks the policy:write permission. Or assigned_to is given and the token lacks policy:assign.
Conflict.
conflict: Another policy already has this name.
Request Entity Too Large.
body_too_large: The body is larger than the service accepts.
Unsupported Media Type.
unsupported_media_type: The body is not sent as application/json.
Unprocessable Entity.
validation_failed: A field is missing or not acceptable, and fields names each one. name is empty. visibility or state has another value. A duration or id does not parse. The schedule breaks a rule of its own, such as a window that opens and closes at the same time. The ladder keeps nothing. A repository is missing, not registered or of the wrong kind. The copy repository is the backup repository. The retention is shorter than a locked repository's floor, or longer than its ceiling or the cloud's longest lock. The recovery site is missing or not registered. No repository is reachable from the recovery site. transport is not the rung's own. rpo_target is below the cadence on a cold or warm rung, or below the mirror snapshot interval this cloud drives on a hot one.
An error, as an RFC 7807 problem document.