tencent cloud

Cloud Object Storage

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Overview
Features
Use Cases
Strengths
Concepts
Regions and Access Endpoints
Specifications and Limits
Service Regions and Service Providers
Billing
Billing Overview
Billing Method
Billable Items
Free Tier
Billing Examples
Viewing and Downloading Bill
Payment Overdue
FAQs
Getting Started
Console
Getting Started with COSBrowser
User Guide
Creating Request
Bucket
Object
Data Management
Batch Operation
Global Acceleration
Monitoring and Alarms
Operations Center
Data Processing
Content Moderation
Smart Toolbox
Data Processing Workflow
Application Integration
User Tools
Tool Overview
Installation and Configuration of Environment
COSBrowser
COSCLI (Beta)
COSCMD
COS Migration
FTP Server
Hadoop
COSDistCp
HDFS TO COS
GooseFS-Lite
Online Tools
Diagnostic Tool
Use Cases
Overview
Access Control and Permission Management
Performance Optimization
Accessing COS with AWS S3 SDK
Data Disaster Recovery and Backup
Domain Name Management Practice
Image Processing
Audio/Video Practices
Workflow
Direct Data Upload
Content Moderation
Data Security
Data Verification
Big Data Practice
COS Cost Optimization Solutions
Using COS in the Third-party Applications
Migration Guide
Migrating Local Data to COS
Migrating Data from Third-Party Cloud Storage Service to COS
Migrating Data from URL to COS
Migrating Data Within COS
Migrating Data Between HDFS and COS
Data Lake Storage
Cloud Native Datalake Storage
Metadata Accelerator
GooseFS
Data Processing
Data Processing Overview
Image Processing
Media Processing
Content Moderation
File Processing Service
File Preview
Troubleshooting
Obtaining RequestId
Slow Upload over Public Network
403 Error for COS Access
Resource Access Error
POST Object Common Exceptions
API Documentation
Introduction
Common Request Headers
Common Response Headers
Error Codes
Request Signature
Action List
Service APIs
Bucket APIs
Object APIs
Batch Operation APIs
Data Processing APIs
Job and Workflow
Content Moderation APIs
Cloud Antivirus API
SDK Documentation
SDK Overview
Preparations
Android SDK
C SDK
C++ SDK
.NET(C#) SDK
Flutter SDK
Go SDK
iOS SDK
Java SDK
JavaScript SDK
Node.js SDK
PHP SDK
Python SDK
React Native SDK
Mini Program SDK
Error Codes
Harmony SDK
Endpoint SDK Quality Optimization
Security and Compliance
Data Disaster Recovery
Data Security
Cloud Access Management
FAQs
Popular Questions
General
Billing
Domain Name Compliance Issues
Bucket Configuration
Domain Names and CDN
Object Operations
Logging and Monitoring
Permission Management
Data Processing
Data Security
Pre-signed URL Issues
SDKs
Tools
APIs
Agreements
Service Level Agreement
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary

GET Bucket replication

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2025-12-15 10:07:36

Overview

This API is used to query the cross-bucket replication configuration of a bucket. When calling this API, you need to carry a request signature.


Requests

Request example

GET /?replication HTTP/1.1
Host: <BucketName-APPID>.cos.<Region>.myqcloud.com
Date: GMT Date
Authorization: Auth String
Note:
In Host: <BucketName-APPID>.cos.<Region>.myqcloud.com, <BucketName-APPID> is the bucket name followed by the APPID, such as examplebucket-1250000000 (see Bucket Overview > Basic Information and Bucket Overview > Bucket Naming Conventions), and <Region> is a COS region (see Regions and Access Endpoints).
Authorization: Auth String (See Request Signature for details.)

Request headers

This API only uses Common Request Headers.

Request body

The request body of this request is empty.

Response

Response headers

This API only returns Common Response Headers.

Response body

The response body returns application/xml data. The following contains all the nodes:
<ReplicationConfiguration>
<Role>qcs::cam::uin/<OwnerUin>:uin/<SubUin></Role>
<Rule>
<Status></Status>
<ID></ID>
<Prefix></Prefix>
<Destination>
<Bucket>qcs::cos:<Region>::<BucketName-APPID></Bucket>
<StorageClass></StorageClass>
</Destination>
<DeleteMarkerReplication>
<Status></Status>
</DeleteMarkerReplication>
</Rule>
</ReplicationConfiguration>
The nodes are described as follows:
Node Name (Keyword)
Parent Node
Description
Type
ReplicationConfiguration
None
All replication configurations
Container
Role
ReplicationConfiguration
Request initiator identifier, formatted as qcs::cam::uin/<OwnerUin>:uin/<SubUin>,Where <OwnerUin> is the main account UIN, and <SubUin> can be either the main account UIN or an authorized sub-account UIN
String
Rule
ReplicationConfiguration
Specific configuration. You can set a maximum of 1,000 rules, which should apply to the same destination bucket
Container
ID
ReplicationConfiguration.Rule
Name of a specific rule
String
Status
ReplicationConfiguration.Rule
Rule status identifier. Enumerated values: Enabled, Disabled
String
Prefix
ReplicationConfiguration.Rule
Prefix matching policy. Policies cannot overlap; otherwise, an error will be returned. To match the root directory, leave this parameter empty.
String
Destination
ReplicationConfiguration.Rule
Destination bucket information
Container
Bucket
ReplicationConfiguration.Rule.Destination
Resource identifier, formatted as qcs::cos:[region]::[BucketName-APPID],For details, please refer to the Resource Description Method
String
StorageClass
ReplicationConfiguration.Rule.Destination
Storage class. Enumerated values: STANDARD, INTELLIGENT_TIERING, STANDARD_IA, ARCHIVE, DEEP_ARCHIVE. Defaults to the storage class of the source bucket.
String
DeleteMarkerReplication
ReplicationConfiguration.Rule
Whether to sync the delete marker
Container
Status
ReplicationConfiguration.Rule. DeleteMarkerReplication
Whether to sync the delete marker. Valid values: Disabled, Enabled. Default value: Enabled.
String

Error codes

This API returns uniform error responses and error codes. For more information, see Error Codes.

Examples

Request

The following example queries the configuration of the originbucket-1250000000 bucket:
GET /?replication HTTP/1.1
Date: Fri, 14 Apr 2019 07:17:19 GMT
Authorization: q-sign-algorithm=sha1&q-ak=************************************&q-sign-time=1503895278;1503895638&q-key-time=1503895278;1503895638&q-header-list=host&q-url-param-list=replication&q-signature=****************************************
Host: originbucket-1250000000.cos.ap-guangzhou.myqcloud.com
Content-Length: 0

Response

After the request above is made, COS returns the following response, indicating that the cross-bucket replication configuration of the bucket is enabled. The ReplicationConfiguration indicates that all objects prefixed with testPrefix in the originbucket-1250000000 bucket are to be replicated. Storage classes of the replicated objects are subject to those of the source bucket.
Content-Type: application/xml
Content-Length: 309
Connection: keep-alive
Date: Fri, 14 Apr 2019 07:17:19 GMT
Server: tencent-cos
x-cos-replication-rule-creation-time: Fri, 14 Apr 2019 07:06:19 GMT
x-cos-request-id: NWQwMzQ5ZmZfMjBiNDU4NjRfNjAwOV84MzA2****
<ReplicationConfiguration>
<Role>qcs::cam::uin/100000000001:uin/100000000001</Role>
<Rule>
<Status>Enabled</Status>
<ID>RuleId_01</ID>
<Prefix>testPrefix</Prefix>
<Destination>
<Bucket>qcs::cos:ap-guangzhou::destinationbucket-1250000000</Bucket>
</Destination>
</Rule>
</ReplicationConfiguration>


Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan