s3.bucket-replication.setReplace the replication rules
rules: [{ destination, prefix?, deleteMarkerReplication? (false), existingObjects? (true), enabled?, priority?, id? }]. Both buckets need versioning Enabled; the caller also needs s3:PutObject on the destination. Two-way replication is refused. Copies start within seconds of a write; every bucket is also compared in full hourly.
Request syntax
PUT /s3/api/buckets/{name}/replication
{
"role": "string",
"rules": "array of json"
}Path parameters
nameRequiredstring
Constraints: 3-63 chars, /^[a-z0-9][a-z0-9-]*[a-z0-9]$/
Request body
roleOptionalstring
An IAM role ARN as AWS tools send it; kept for S3 GetBucketReplication, otherwise ignored
Constraints: max 2048 chars
May be null.
rulesRequiredarray of json
The rules, replacing the current ones; each names a destination bucket (name, arn:aws:s3:::name or its RN)
Response
200; data is { rules }: how many rules were saved.
A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.
Errors
- 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
- 401No credentials, or an access key that is unknown, revoked or expired.
- 403The caller's policies do not allow s3:PutReplicationConfiguration on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
- 404The resource does not exist in your organization.
Examples
The required parameters only, with example values. Replace id and the other placeholders with your own.
dcloud s3 bucket-replication set name --rules '["example"]'curl -X PUT "https://console.platform-development.deutschecloud.app/s3/api/buckets/name/replication" \
-H "Authorization: EWS-ACCESS-KEY $ACCESS_KEY" \
-H "Content-Type: application/json" \
-d '{"rules":["example"]}'Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_s3_bucket-replication_set.