Пример #1
0
        /// 获取存储桶跨地域复制规则
        public void GetBucketReplication()
        {
            //.cssg-snippet-body-start:[get-bucket-replication]
            string bucket = "examplebucket-1250000000"; //格式:BucketName-APPID
            GetBucketReplicationRequest request = new GetBucketReplicationRequest(bucket);

            try
            {
                GetBucketReplicationResult result = cosXml.GetBucketReplication(request);
                // 存储桶的跨区域复制配置
                ReplicationConfiguration conf = result.replicationConfiguration;
            }
            catch (COSXML.CosException.CosClientException clientEx)
            {
                Console.WriteLine("CosClientException: " + clientEx);
            }
            catch (COSXML.CosException.CosServerException serverEx)
            {
                Console.WriteLine("CosServerException: " + serverEx.GetInfo());
            }

            //.cssg-snippet-body-end
        }