Dom*_*rga 4 google-cloud-storage google-cloud-platform gcloud google-cloud-functions
我正在尝试按照此处的指南部署云存储触发器: https: //cloud.google.com/functions/docs/tutorials/storage#object_finalize
我想监听我的默认“美国多区域”存储桶中的任何最终确定。不幸的是,当我尝试通过 gcloud cli 部署函数触发器时,如上面的链接所述:
gcloud functions deploy **** \
--gen2 \
--region=us-central1 \
--project=**** \
--trigger-event-filters="type=google.cloud.storage.object.v1.finalized" \
--trigger-event-filters="bucket={my-multi-region-bucket}"
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
INVALID_ARGUMENT: Cannot create trigger ****:
Bucket '****' is in location 'us', but the trigger location is 'us-central1'.
The trigger must be in the same location as the bucket.
Try redeploying and changing the trigger location to 'us'.
Run Code Online (Sandbox Code Playgroud)
Dom*_*rga 12
--trigger-location=us
我终于通过简单地添加如下所示的内容使其工作:
gcloud functions deploy **** \
--gen2 \
--region=us-central1 \
--project=**** \
--trigger-event-filters="type=google.cloud.storage.object.v1.finalized" \
--trigger-event-filters="bucket={my-multi-region-bucket}" \
--trigger-location=us
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
720 次 |
最近记录: |