/// 设置存储桶跨地域复制规则
        public void PutBucketReplication()
        {
            //.cssg-snippet-body-start:[put-bucket-replication]
            string bucket   = "examplebucket-1250000000"; //格式:BucketName-APPID
            string ownerUin = "100000000001";             //发起者身份标示: OwnerUin
            string subUin   = "100000000001";             //发起者身份标示: SubUin
            PutBucketReplicationRequest request = new PutBucketReplicationRequest(bucket);

            //设置 replication
            PutBucketReplicationRequest.RuleStruct ruleStruct =
                new PutBucketReplicationRequest.RuleStruct();
            ruleStruct.id       = "replication_01";               //用来标注具体 Rule 的名称
            ruleStruct.isEnable = true;                           //标识 Rule 是否生效 :true, 生效; false, 不生效
            ruleStruct.appid    = "1250000000";                   //APPID
            ruleStruct.region   = "ap-beijing";                   //目标存储桶地域信息
            ruleStruct.bucket   = "destinationbucket-1250000000"; //格式:BucketName-APPID
            ruleStruct.prefix   = "34";                           //前缀匹配策略
            List <PutBucketReplicationRequest.RuleStruct> ruleStructs =
                new List <PutBucketReplicationRequest.RuleStruct>();

            ruleStructs.Add(ruleStruct);
            request.SetReplicationConfiguration(ownerUin, subUin, ruleStructs);

            try
            {
                PutBucketReplicationResult result = cosXml.PutBucketReplication(request);
                Console.WriteLine(result.GetResultInfo());
            }
            catch (COSXML.CosException.CosClientException clientEx)
            {
                Console.WriteLine("CosClientException: " + clientEx);
            }
            catch (COSXML.CosException.CosServerException serverEx)
            {
                Console.WriteLine("CosServerException: " + serverEx.GetInfo());
            }

            //.cssg-snippet-body-end
        }