归档存储
更新时间:2023-03-24
归档存储
上传
std::string filename = "test_archive";
FileInputStream file(filename);
PutObjectRequest request(bucket, "test_archive", &file);
request.mutable_meta()->set_storage_class("ARCHIVE");
PutObjectResponse result;
client.put_object(request, &result);
取回
RestoreObjectRequest request(bucket, ""test_archive"");
request.set_restore_tier("Expedited"); //加急
request.set_restore_tier("Standard"); //标准
request.set_restore_tier("LowCost"); //延迟
RestoreObjectResponse response;
client.restore_object(request, &response);
print_common_response(response);