All Products
Search
Document Center

Object Storage Service:put-bucket-rtc

Last Updated:Mar 20, 2026

Enables or disables Replication Time Control (RTC) for an existing cross-region replication (CRR) rule.

Prerequisites

Before you begin, make sure you have:

  • An OSS bucket with at least one CRR rule configured

  • The ID of the CRR rule you want to update

  • The oss:PutBucketRtc permission (Alibaba Cloud root accounts have this permission by default; RAM users and Security Token Service (STS) credentials require explicit authorization)

To grant a RAM user the oss:PutBucketRtc permission, see Attach a custom policy to a RAM user.

Syntax

ossutil api put-bucket-rtc --bucket <value> --rtc-configuration <value> [flags]

Parameters

ParameterTypeDescription
--bucketstringThe name of the bucket
--rtc-configurationstringThe RTC configuration, in XML or JSON format

For all available flags, see Command-line options.

This command maps to the PutBucketRTC API operation. For a full description of all parameters, see the API reference.

--rtc-configuration

Pass the configuration inline or from a file using the file:// prefix.

XML schema

<RtcConfiguration>
  <RTC>
    <Status>enabled|disabled</Status>
  </RTC>
  <ID>string</ID>
</RtcConfiguration>

JSON schema

{
  "RTC": {
    "Status": "enabled|disabled"
  },
  "ID": "string"
}
FieldTypeDescription
StatusstringRTC status. Valid values: enabled, disabled
IDstringThe ID of the CRR rule to update

Examples

Enable RTC using an XML file

  1. Create rtc-configuration.xml:

       <?xml version="1.0" encoding="UTF-8"?>
       <RtcConfiguration>
           <RTC>
               <Status>enabled</Status>
           </RTC>
           <ID>rtc-configuration</ID>
       </RtcConfiguration>
  2. Run the command:

       ossutil api put-bucket-rtc --bucket examplebucket --rtc-configuration file://rtc-configuration.xml

Enable RTC using a JSON file

  1. Create rtc-configuration.json:

       {
           "RTC": {
               "Status": "enabled"
           },
           "ID": "rtc-configuration"
       }
  2. Run the command:

       ossutil api put-bucket-rtc --bucket examplebucket --rtc-configuration file://rtc-configuration.json

Enable RTC with inline JSON

ossutil api put-bucket-rtc --bucket examplebucket --rtc-configuration "{\"RTC\":{\"Status\":\"enabled\"},\"ID\":\"rtc-configuration\"}"

What's next