![](/img/trans.png)
[英](GCloud SQL) Is there a way to opting in to maintenance notifications via CLI or API?
[英]Adding restrictions to API Keys using the gcloud alpha CLI
使用gcloud alpha 服务现在完全可以以编程方式生成密钥:
gcloud alpha services api-keys create
然后我可以启用地图 JavaScript API 使用
gcloud services enable maps-backend.googleapis.com
此时我需要对该密钥设置一些 HTTP 引用限制,但services api-keys update
命令仅更新 API 密钥的元数据。
我该如何进行?
看起来(还没有尝试过 API)好像您可以在create
和update
时使用--allowed-referrers
执行此操作:
https://cloud.google.com/sdk/gcloud/reference/alpha/services/api-keys/create
https://cloud.google.com/sdk/gcloud/reference/alpha/services/api-keys/update
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.