API | 操作名 | 操作描述 |
恢复归档对象 | 将归档类型的对象取回访问 |
try{// 存储桶名称,此处填入格式必须为 bucketname-APPID, 其中 APPID 获取参考 https://console.tencentcloud.com/developerstring bucket = "examplebucket-1250000000";string key = "exampleobject"; //对象键RestoreObjectRequest request = new RestoreObjectRequest(bucket, key);//恢复时间request.SetExpireDays(3);request.SetTier(COSXML.Model.Tag.RestoreConfigure.Tier.Bulk);//执行请求RestoreObjectResult result = cosXml.RestoreObject(request);//请求成功Console.WriteLine(result.GetResultInfo());}catch (COSXML.CosException.CosClientException clientEx){//请求失败Console.WriteLine("CosClientException: " + clientEx);}catch (COSXML.CosException.CosServerException serverEx){//请求失败Console.WriteLine("CosServerException: " + serverEx.GetInfo());}
本页内容是否解决了您的问题?