CreateBucketDataRedundancyTransition

Updated at:
Copy as MD

Creates a task to convert a bucket from locally redundant storage (LRS) to zone-redundant storage (ZRS).

Usage notes

  • The bucket is in a supported region: China (Hangzhou), China (Shanghai), China (Beijing), China (Zhangjiakou), China (Ulanqab), China (Shenzhen), China (Hong Kong), Japan (Tokyo), Singapore, Indonesia (Jakarta), and Germany (Frankfurt).

  • The bucket's current redundancy type is LRS.

  • The bucket's storage class is Standard, Infrequent Access (IA), or Archive. Objects in Cold Archive or Deep Cold Archive remain in LRS after conversion. Buckets with a Cold Archive or Deep Cold Archive storage class cannot be converted.

  • This task requires the oss:CreateBucketDataRedundancyTransition permission. Grant a custom policy to a RAM user.

  • Region-to-endpoint mappings are listed in Endpoints.

Request syntax

POST /?redundancyTransition&x-oss-target-redundancy-type=ZRS HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue

Request headers

This operation uses only Common request headers.

Request parameters

Parameter

Type

Required

Example

Description

x-oss-target-redundancy-type

String

Yes

ZRS

Target redundancy type. Set to ZRS to convert the bucket from LRS to ZRS.

Response headers

This operation returns only Common response headers.

Response elements

Parameter

Type

Example

Description

BucketDataRedundancyTransition

Container

N/A

Container for the redundancy conversion task.

Parent element: None (root element).

Child element: TaskId

TaskId

String

4be5beb0f74f490186311b268bf6****

ID of the redundancy conversion task. Use this ID to query or delete the task.

Parent element: BucketDataRedundancyTransition

Child element: None

Examples

  • Sample request

    POST /?redundancyTransition&x-oss-target-redundancy-type=ZRS HTTP/1.1
    Host: oss-example.oss-cn-hangzhou.aliyuncs.com
    Date: Thu, 17 Apr 2025 08:40:17 GMT
    Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20250417/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e
  • Sample response

    HTTP/1.1 200
    x-oss-request-id: 655726F18EAD9B710C00B235
    Date: Fri, 17 Nov 2023 08:40:17 GMT
    Content-Type: application/xml
    Content-Length: 151
    Server: AliyunOSS
    
    <?xml version="1.0" encoding="UTF-8"?>
    <BucketDataRedundancyTransition>
      <TaskId>4be5beb0f74f490186311b268bf6****</TaskId>
    </BucketDataRedundancyTransition>

ossutil

Corresponding ossutil command: create-bucket-data-redundancy-transition.

Error codes

Error code

HTTP status code

Description

NoSuchBucket

404

The specified bucket does not exist.

BucketDataRedundancyTransitionTaskNotSupport

400

The bucket cannot be converted. Only LRS-to-ZRS conversion is supported.

BucketDataRedundancyTransitionTaskAlreadyExist

409

A redundancy conversion task is already running for this bucket.

BucketDataRedundancyTransitionTaskExceedLimit

400

Maximum redundancy conversion tasks reached. Delete completed tasks before creating new ones.

AccessDenied

403

This operation is not supported in the bucket's region.