Cloud Functions for Firebase - 未配置结算帐户
Cloud Functions for Firebase - Billing account not configured
我刚刚为 Firebase 实施了新的 Cloud Functions,但日志中有些东西让我很困扰:
Billing account not configured. External network is not accessible and
quotas are severily limited. Configure billing account to remove these
restrictions
我居然成功地从外网访问了这个功能,所以我想知道我是否真的必须提供我的结算帐户? firebase 文档中没有关于此的内容。
我正在使用 Spark 订阅计划进行个人测试,如果我还不打算支付任何费用,我不想添加账单信息。
当未配置计费帐户时,"Billing account not configured" 警告消息由 Google Cloud Functions 自动记录。这并不意味着您的代码无法正常工作,而只是作为提醒,以防万一您遇到问题。
限制是关于出站访问 - 例如您的函数可以从通用互联网请求资源吗?使用函数响应 webhook 或访问 Google-内部服务(如实时数据库)绝对没问题。
如果您想调用第三方网络服务(例如),您需要启用计费。
对于其他配额,请查看:https://firebase.google.com/pricing/ - 如您所见,调用次数(撰写本文时为 125,000 次)以及 CPU 和内存(40k cpu-秒和 40k GB-秒)在免费套餐中。
第一次调用发生了,但当它在 spark 计划中并从外部网络调用时被标记(查看日志)
在撰写本文时,名为 BLAZE(现收现付)的计划允许联网(外部访问)并具有永久免费层。
每月免费提供前 2,000,000 次调用、400,000 GB 秒、200,000 CPU 秒和 5GB 的互联网出口流量。您只需为超出此免费配额的使用量付费。
有关云函数定价的更多信息https://cloud.google.com/functions/pricing
Doug stevenson's answers 对我帮助最大:
TL;DR: 这是一条警告信息。如果你不打外呼就可以了
That warning message appears for all functions when executing on the Spark plan. It's just a warning - you can ignore it if you're doing doing any outbound networking in your own own.
We're looking into getting that message changed or removed so that it's less confusing.
[...]
确保您的项目已link发送到结算帐户。
如果您导航至 https://console.cloud.google.com/billing
您应该能够在此处找到您的 Firebase 项目。如果没有,那么您需要转到项目列表,然后从您的项目菜单中选择 select 计费,然后 link 一个计费帐户。
是的,您需要从现有的免费计划 spark 升级到 blaze 计划。
在您超过 Spark 计划收益之前,我们不会向您收费。
1.Depreciate Node Version 设置节点版本8
"engines": {
"node": "8"
},
2.Then 按照你们知道的命令部署 firebase
> firebase deploy
然后你会在你的终端中得到这种类型的 https://i.stack.imgur.com/4hWQZ.png 输出
如果您注意到 上图标有红线 这是您的 firebase 项目托管区域。 如果您也得到相同的结果 一切完成了,我们进入最后一步
手动我们必须达到我们的项目终点
https://yourregion-firebaseprojectname.cloudfunctions.net/yourfunctionname
(exported function name)
In my case
https://us-central1-socialape-d5dab.cloudfunctions.net/helloWorld
或按照以下步骤操作
1.Depreciate node version to 8
2. firebase deploy
3. you'll get deploy complete message above that message you'll see
functions[helloWorld(us-central)]:Succesful update operation .
4. this us-central is your project hosted region
prefix to this [helloWorld is your function name get this information from uour output terminal.
5. After that https://yourregion-firebaseprojectname.cloudfunctions.net/yourfunctionname
(exported function name) which is helloWorld
我刚刚为 Firebase 实施了新的 Cloud Functions,但日志中有些东西让我很困扰:
Billing account not configured. External network is not accessible and quotas are severily limited. Configure billing account to remove these restrictions
我居然成功地从外网访问了这个功能,所以我想知道我是否真的必须提供我的结算帐户? firebase 文档中没有关于此的内容。
我正在使用 Spark 订阅计划进行个人测试,如果我还不打算支付任何费用,我不想添加账单信息。
当未配置计费帐户时,"Billing account not configured" 警告消息由 Google Cloud Functions 自动记录。这并不意味着您的代码无法正常工作,而只是作为提醒,以防万一您遇到问题。
限制是关于出站访问 - 例如您的函数可以从通用互联网请求资源吗?使用函数响应 webhook 或访问 Google-内部服务(如实时数据库)绝对没问题。
如果您想调用第三方网络服务(例如),您需要启用计费。
对于其他配额,请查看:https://firebase.google.com/pricing/ - 如您所见,调用次数(撰写本文时为 125,000 次)以及 CPU 和内存(40k cpu-秒和 40k GB-秒)在免费套餐中。
第一次调用发生了,但当它在 spark 计划中并从外部网络调用时被标记(查看日志)
在撰写本文时,名为 BLAZE(现收现付)的计划允许联网(外部访问)并具有永久免费层。
每月免费提供前 2,000,000 次调用、400,000 GB 秒、200,000 CPU 秒和 5GB 的互联网出口流量。您只需为超出此免费配额的使用量付费。
有关云函数定价的更多信息https://cloud.google.com/functions/pricing
Doug stevenson's answers 对我帮助最大:
TL;DR: 这是一条警告信息。如果你不打外呼就可以了
That warning message appears for all functions when executing on the Spark plan. It's just a warning - you can ignore it if you're doing doing any outbound networking in your own own.
We're looking into getting that message changed or removed so that it's less confusing.
[...]
确保您的项目已link发送到结算帐户。
如果您导航至 https://console.cloud.google.com/billing
您应该能够在此处找到您的 Firebase 项目。如果没有,那么您需要转到项目列表,然后从您的项目菜单中选择 select 计费,然后 link 一个计费帐户。
是的,您需要从现有的免费计划 spark 升级到 blaze 计划。 在您超过 Spark 计划收益之前,我们不会向您收费。
1.Depreciate Node Version 设置节点版本8
"engines": {
"node": "8"
},
2.Then 按照你们知道的命令部署 firebase
> firebase deploy
然后你会在你的终端中得到这种类型的 https://i.stack.imgur.com/4hWQZ.png 输出
如果您注意到 上图标有红线 这是您的 firebase 项目托管区域。 如果您也得到相同的结果 一切完成了,我们进入最后一步
手动我们必须达到我们的项目终点
https://yourregion-firebaseprojectname.cloudfunctions.net/yourfunctionname
(exported function name)
In my case https://us-central1-socialape-d5dab.cloudfunctions.net/helloWorld
或按照以下步骤操作
1.Depreciate node version to 8
2. firebase deploy
3. you'll get deploy complete message above that message you'll see
functions[helloWorld(us-central)]:Succesful update operation .
4. this us-central is your project hosted region
prefix to this [helloWorld is your function name get this information from uour output terminal.
5. After that https://yourregion-firebaseprojectname.cloudfunctions.net/yourfunctionname
(exported function name) which is helloWorld