Change a plan
PATCH/v1/plans/:id
Renames a plan, pauses or resumes it, changes what it protects or moves it to another policy. A resource taken out of a plan is retired: its backups stop, and the ones it has stay restorable until they expire.
Any member of the project the token is scoped to.
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 413
- 415
- 422
- 503
- default
OK
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 changing plans. Or the plan is under a mandatory policy, the token is not an operator's, and enabled is false or resource_ids is empty for a plan that is running.
quota_exceeded: The added resources, or the move to the new policy, would take the project over its quota.
Not Found.
not_found: No plan has this id, or it belongs to another project, or it is deleted. Or a resource named in resource_ids does not exist or belongs to another project.
Conflict.
partial_coverage_unaccepted: The new resource set has disks that cannot be protected, or a disk that cannot be protected has appeared since the plan's account was accepted, and no acceptance was sent.
partial_coverage_stale: partial_coverage.digest does not match the account the resources have now.
conflict: The project already has another plan of the new 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 not acceptable, and fields names each one. For example, name is empty. policy_id is unknown, not offered to this project or not active. policy_id names a policy with an instant tier for a bucket plan. A project-scoped token moves the plan to a policy that offers less protection than its current one. consistency is not crash or filesystem, or is set on a bucket plan. resource_ids names more than one bucket. An excluded_disks entry matches no disk, or more than one. partial_coverage is sent without a non-empty resource_ids or excluded_disks.
protection_refused: A resource has nothing that can be protected. Or partial_coverage.accept is false.
Service Unavailable.
discovery_unavailable: The change needs the resources inspected again and the service cannot inspect them right now.
An error, as an RFC 7807 problem document.