【问题标题】:Error binding IAM policy when setting up cloud functions with endpoints使用端点设置云功能时绑定 IAM 策略时出错
【发布时间】: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


【解决方案1】:

请注意,这是一个错误,现已由 Google 开发团队更新。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-11-02
    • 2021-05-13
    • 2021-10-16
    • 1970-01-01
    • 2021-10-10
    • 1970-01-01
    • 2019-11-09
    • 2020-11-08
    相关资源
    最近更新 更多