/// 获取存储桶生命周期 public void GetBucketLifecycle() { //.cssg-snippet-body-start:[get-bucket-lifecycle] try { string bucket = "examplebucket-1250000000"; //格式:BucketName-APPID GetBucketLifecycleRequest request = new GetBucketLifecycleRequest(bucket); //执行请求 GetBucketLifecycleResult result = cosXml.GetBucketLifecycle(request); //存储桶的生命周期配置 LifecycleConfiguration conf = result.lifecycleConfiguration; } catch (COSXML.CosException.CosClientException clientEx) { //请求失败 Console.WriteLine("CosClientException: " + clientEx); } catch (COSXML.CosException.CosServerException serverEx) { //请求失败 Console.WriteLine("CosServerException: " + serverEx.GetInfo()); } //.cssg-snippet-body-end }