All Products
Search
Document Center

Object Storage Service:DeleteBucketReplication

Last Updated:Jun 16, 2026

Stops data replication for a bucket and deletes the replication configuration. After the rule is deleted, operations on the source bucket are no longer synced to the destination bucket.

Usage notes

  • If no data replication rules are configured for the requested bucket, this operation returns 200 OK.

  • When you delete a data replication rule, the rule is not deleted immediately. OSS needs time to perform cleanup operations, during which the rule status is closing. The rule is deleted after cleanup is complete.

  • If you call this operation for a data replication rule that is in the closing state, the operation returns 204 NoContent.

Request syntax

POST /?replication&comp=delete HTTP/1.1 
Host: BucketName.oss-cn-hangzhou.aliyuncs.com 
Date: GMT Date
Content-Length: ContentLength
Content-Type: application/xml 
Authorization: SignatureValue

<?xml version="1.0" encoding="UTF-8"?>
<ReplicationRules>
   <ID>rule id</ID>
</ReplicationRules>

Request elements

Name

Type

Required

Description

ReplicationRules

Container

Yes

A container for the data replication rule to delete.

Parent node: None

Child node: ID

ID

String

Yes

The ID of the replication rule to delete. You can obtain the rule ID from the GetBucketReplication operation.

Parent node: ReplicationRules

Child node: None

Examples

  • Request example

POST /?replication&comp=delete HTTP/1.1 
Host: oss-example.oss-cn-hangzhou.aliyuncs.com 
Date: Thu, 17 Apr 2025 15:39:18 GMT
Content-Length: 46
Content-Type: application/xml
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,AdditionalHeaders=content-length,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e

<?xml version="1.0" encoding="UTF-8"?>
<ReplicationRules>
  <ID>test_replication_1</ID>
</ReplicationRules>
  • Response example

HTTP/1.1 200 OK
x-oss-request-id: 534B371674E88A4D8906**** 
Date: Thu, 24 Sep 2015 15:39:18 GMT
Connection: close 
Content-Length: 0
Server: AliyunOSS

SDK

The following SDKs support this operation:

ossutil command-line tool

For the ossutil command for this operation, see delete-bucket-replication.

Error codes

Error code

Status code

Description

NoSuchBucket

404 NotFound

The requested bucket does not exist.

TooManyReplicationRules

400 BadRequest

The request contains more than one data replication rule.

Each request can contain only one data replication rule.

TransferAccAlreadyInUse

409Conflict

Transfer acceleration is disabled for the destination bucket specified for cross-region replication (CRR). The XML error response contains information about the source and destination buckets:

<?xml version="1.0" encoding="UTF-8"?>
<Error>
  <Code>TransferAccAlreadyInUse</Code>
  <Message>The transfer acceleration is already used by cross-region replication.</Message>
  <SourceBucket>srcBucket</SourceBucket>
  <DestinationBucket>destBucket</DestinationBucket>
  <RequestId>5F1E76142A535D373683****</RequestId>
  <HostId>oss-cn-hangzhou.aliyuncs.com</HostId>
</Error>