【发布时间】:2019-08-22 17:29:35
【问题描述】:
我正在按照these 的说明设置具有云功能的 Google Cloud Endpoints。
我已经设法使用 Cloud Run 设置 ESP,并配置了端点,但现在我绑定了一个 IAM 策略以授予 ESP 调用云函数的权限。
调用时出现错误:
gcloud beta functions add-iam-policy-binding FUNCTION_NAME \
--member "serviceAccount:ESP_PROJECT_NUMBER-compute@developer.gserviceaccount.com" \
--role "roles/cloudfunctions.invoker" \
--project FUNCTIONS_PROJECT_ID
我收到以下错误:
ERROR: (gcloud.beta.functions.add-iam-policy-binding) ResponseError: status=[400], code=[Bad Request], message=[Invalid JSON payload received. Unknown name "options_requestedPolicyVersion": Cannot bind query parameter. Field 'options_requestedPolicyVersion' could not be found in request message.]
【问题讨论】:
-
确保您使用的是最新的 CLI:
gcloud components update。 -
是的,我已经这样做了。仍然得到同样的错误。还有其他想法吗?
-
我建议创建一个新的 Cloud Functions 问题:issuetracker.google.com/savedsearches/559729
-
看起来这在 259.0.0 中被破坏了。回滚到 258.0.0 就可以了: command --
gcloud components update core --version 258.0.0
标签: google-cloud-platform google-cloud-functions google-cloud-endpoints