Change a repository
PATCH/v1/repositories/:id
Changes the endpoint, region, credentials, reachable sites or object lock. Credentials are replaced as a pair. What decides where data lives, such as the bucket, pool or chunk size, cannot change. Once an object lock's grace period has passed, its mode and granularity are fixed, and its minimum and maximum retention can only rise. A change that would leave a policy or vault unable to keep its terms is refused.
Operator only: needs a system-scoped token.
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 grant repository:register. Or the request changes object_lock, clear_object_lock or soft_delete_grace and they do not grant repository:lock.
Not Found.
not_found: The id is not a UUID, or no repository has it.
Conflict.
conflict: The retention contract is past its grace period, and the request would remove it, change its mode or granularity, lower min_retention or max_retention, or restate changeable_until. detail names the date the grace period ended.
conflict: Raising min_retention would leave active policies keeping backups here for less. Or lowering max_retention would leave policies keeping them for longer. fields names the policies.
conflict: The vault on this repository offers terms the change would break. fields names the vault.
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: Access keys are sent for a driver other than s3, or without their pair. endpoint or region is sent for a driver other than s3. soft_delete_grace is sent for an rbd tier. A site or replica id is not a UUID. A duration does not parse. The retention contract is incomplete or inconsistent. Object lock is asked of a driver other than s3. environment_credentials is sent with access keys, or for an rbd tier.
repository_unreadable: The chunk repository is at another site, the request changes its access keys, endpoint or region, and listing it from here with the result failed. Nothing was changed.
Service Unavailable.
kms_unavailable: New access keys were sent, but no key manager is configured to seal them.
An error, as an RFC 7807 problem document.