Create a plan
POST/v1/plans
Protects servers, volumes or a bucket under a protection policy. The policy sets the schedule, the retention and where backups are kept. The plan names what is protected and how consistent each backup is. A resource the service can protect only in part is refused with an account of what would and would not be covered.
Any member of the project the token is scoped to.
Request
Responses
- 201
- 400
- 401
- 403
- 404
- 409
- 413
- 415
- 422
- 503
- 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's roles do not allow creating plans in its project. Or the token is not scoped to a project, so the plan would be owned by nobody.
quota_exceeded: The resources would take the project over its resource-count or protected-bytes quota, or the project is already over its stored-bytes quota. quota names the limit.
Not Found.
not_found: A named resource does not exist, or belongs to another project.
Conflict.
partial_coverage_unaccepted: Some disks cannot be protected and partial_coverage was not sent. coverage carries the account, its digest and the body that accepts it.
partial_coverage_stale: partial_coverage.digest does not match the account the resources have now, usually because a disk was attached since it was shown. coverage carries the new account.
conflict: The project already has a plan of this name, counting deleted plans not yet purged.
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 not acceptable, and fields names each one. For example, name is missing. resource_kind is not volume, instance or bucket, or is bucket on a cloud with no object gateway. resource_ids is empty, repeats an id or names more than one bucket. policy_id is missing, unknown, not offered to this project or not active. policy_id names a policy with an instant tier for a bucket plan. consistency is not crash or filesystem, or is set on a bucket plan. encryption is not barbican or none. encryption asks for encryption, or is left out, on a cloud with no key manager. labels breaks the label rules or uses a reserved prefix. An excluded_disks entry matches no disk of the named resources, or more than one.
protection_refused: A named resource has nothing that can be protected, because every one of its disks is refused or because excluded_disks leaves none. Or partial_coverage.accept is false. refusals and coverage say which disks and why.
Service Unavailable.
discovery_unavailable: The service cannot inspect the resources. Resource discovery is not configured, or there is no object gateway for a bucket plan, or OpenStack would not say which project owns a resource.
An error, as an RFC 7807 problem document.