在特定日期和时间显示 GCS 桶

Reveal GCS bucket at specific date and time

我有一个 Google Cloud Storage 存储桶,我想在特定的日期和时间展示它(使其成为 public)。如何实现?

我已经尝试了bucket的权限,只是发现对于principal allUsers我不能使用任何条件。

出现的另一种方法是使用启动脚本和 Google 调度程序编写 Google 计算实例脚本,但是这有一个不可预测的延迟,这是我的目的不能容忍的。

那还有别的方法吗?我不一定需要使用 GCS,任何其他允许我在特定时间显示 folder/files 的服务都应该足够了。

您可以执行您的 function that makes objects public in Firebase Cloud Functions with functions.pubsub.schedule().onRun():

In Cloud Functions for Firebase, scheduling logic resides in your functions code, with no special deploy-time requirements. To create a scheduled function, use functions.pubsub.schedule('your schedule').onRun((context)).