Python 2.7 已达到支持终止期限,并将于 2026 年 1 月 31 日
弃用。弃用后,您将无法部署 Python 2.7 应用,即使您的组织之前曾使用组织政策重新启用旧版运行时的部署也是如此。现有的 Python 2.7 应用在
弃用日期之后将继续运行并接收流量。我们建议您
迁移到最新支持的 Python 版本。
所有 App Engine 运行时环境都需要付款方式
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
自 2019 年 11 月 30 日起,仅当您的账号提供有付款方式(例如信用卡)时,您才能部署新版 App Engine 应用。自 2021 年 8 月 9 日起,所有 App Engine 应用都需要具有付款方式才能继续运行。此要求适用于所有 App Engine 运行时环境中的应用,包括 App Engine 标准环境中的 Java 8、Python 2.7、PHP 5、Go 1.11 应用。
自 2021 年 8 月 9 日起,如果正在运行的应用没有提供付款方式,则该应用将被关停。
虽然您必须为账号提供付款方式,但 App Engine 免费层级并未发生变化,并且不会消失。
我们做出本次调整的原因
要求为所有运行时使用支付方式时,可以防止欺诈和滥用行为,并让 App Engine 与 Google Cloud的其余部分保持一致。这有助于我们在您基于 App Engine 拓展业务的过程中投入更多时间来提供新功能并为您提供支持。
此外,所有 App Engine 运行时环境现在都使用 Cloud Build 在部署过程中将应用构建到容器中。Cloud Build 要求提供付款方式,因此如果付款方式不存在,则部署到 App Engine 的操作将失败。自 2021 年 8 月 9 日起,如果正在运行的应用没有提供付款方式,则该应用将被关停。您可以通过添加付款方式来恢复您的应用。
除了提供付款方式之外,您不需要对项目进行任何其他更改。Cloud Build 的更改完全在后台进行,不会影响部署命令或管理 API。
哪些内容保持不变
App Engine 上的免费层级保持不变。
您将看到的内容
如果您的项目没有有效的付款方式,您会看到以下内容:
您需要做什么
如果您的 App Engine 应用在 App Engine 标准环境中使用 Java 8、Python 2.7、PHP 5、Go 1.11 运行时环境,则您需要向项目添加付款方式。
如需向项目添加付款方式,请执行以下操作:
创建结算账号(如果您还没有结算账号)。
添加您的信用卡或其他付款方式。
将您的项目与结算账号相关联。
详细了解如何添加、移除或更新付款方式。
我们为何要进行这项调整
这项调整要实现的目标如下:
减少 App Engine 上的欺诈
欺诈会伤害 App Engine 和 Google 的所有合法用户。我们的工程和支持团队投入大量时间来预防、监控和诊断欺诈性使用情况。这会限制我们向合法客户提供的资源。此外,欺诈会耗费 Google 的资金,进而增加了每个人的费用,因为我们必须将其计入 App Engine 价格中。
根据我们使用较新运行时环境的经验来看,需要付款方式可以减少欺诈行为。
将 App Engine 与其他 Google Cloud 服务集成
App Engine 于 2008 年推出,早于 Google Cloud,并构建在完全自定义的专有架构中,因为没有更广泛的平台可以集成。现在, Google Cloud 是一个大型而复杂的平台,我们的客户要求 App Engine 与 Google Cloud中提供的服务无缝集成。
通过无服务器 VPC 访问通道,App Engine 可与其他 Google Cloud 服务集成,这使得 App Engine 与 Compute Engine 虚拟机和 Google Kubernetes Engine 集群可位于同一个 VPC 中。作为集成的一部分,我们正将 App Engine 构建迁移至 Cloud Build,这具有以下优势:
几乎所有 Google Cloud 服务都需要使用支付方式,因此这种额外的集成意味着 App Engine 也必须使用支付方式。
Cloud Build 的使用费用
Cloud Build 有一个免费层级,每个结算账号每天有 120 分钟的构建时间。例如,如果您的构建需要 5 分钟才能完成,则您一天可以部署 24 次,而不会产生任何费用。
如需详细了解超出免费层级的价格,请参阅 Cloud Build 价格。
限制费用
您可以使用以下机制来限制 App Engine 费用:
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-09-04。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-04。"],[[["\u003cp\u003eAs of August 9, 2021, all App Engine applications require a payment method to remain active, and those without will be shut down.\u003c/p\u003e\n"],["\u003cp\u003eDeployments to App Engine will fail if no payment method is present due to the use of Cloud Build for app containerization.\u003c/p\u003e\n"],["\u003cp\u003eThe App Engine free tier is still available and has not been changed.\u003c/p\u003e\n"],["\u003cp\u003eAdding a payment method is the only required action; no other changes to existing project code or configurations are needed.\u003c/p\u003e\n"],["\u003cp\u003eRequiring a payment method helps reduce fraud and increases integration with other Google Cloud services.\u003c/p\u003e\n"]]],[],null,["# Payment method required for all App Engine runtimes\n\nAs of November 30, 2019, you can only deploy new versions of your\nApp Engine apps if your account provides a\n[payment method](/billing/docs/how-to/payment-methods#available_payment_methods),\nsuch as a credit card. As of August 9, 2021, all App Engine apps require\na payment method to continue running. This requirement applies to apps\nin all App Engine runtimes, including Java 8, Python 2.7, PHP 5, and Go 1.11 apps\nin the App Engine standard environment.\n\n**As of August 9, 2021, if a running application does not have a payment method,\nit will be shut down.**\n\nWhile you must provide a payment method for your accounts,\nthe **App Engine free tier has not changed and is not going away**.\n\nWhy we made this change\n-----------------------\n\nRequiring a payment method for all runtimes prevents fraud and abuse, and\nbrings App Engine in line with the rest of Google Cloud. This allows\nus to spend more time on delivering new features and supporting you as you grow\non App Engine.\n\nIn addition, all App Engine runtimes now use Cloud Build to build\napps into a container during the deployment process. Cloud Build\nrequires a payment method, and therefore if a payment method is not\npresent, **deployments to App Engine will fail** . As of August 9, 2021,\nif a running application does not have a payment method, it **will be shut down**.\nYou can reinstate your application by adding a payment method.\n\nOther than providing a payment method, you don't need to make any other\nchanges to your project. The change to Cloud Build is entirely in the\nbackground and has no effect on deployment commands or administration APIs.\n\nWhat remains the same\n---------------------\n\n**The [free tier](/appengine/quotas) on App Engine is unchanged.**\n\nWhat you will see\n-----------------\n\nIf you do not have a valid payment method on the project, you will see:\n\n- `HTTP 500` errors returned when requests are sent to your app\n\n- App log entries in your App Engine logs that read\n \"Billing disabled. Shutting down instance.\"\n\nWhat you need to do\n-------------------\n\nYou will need to add a payment method to your project if you have\nApp Engine apps using the Java 8, Python 2.7, PHP 5, and Go 1.11 runtimes\nin the App Engine standard environment.\n\nTo add a payment method to your project:\n\n1. [Create a billing account](https://console.cloud.google.com/billing/)\n if you do not already have one.\n\n2. Add your credit card or other payment method as a payment method.\n\n3. Link your project to the billing account.\n\nLearn more about [adding, removing or updating a payment method](/billing/docs/how-to/payment-methods).\n\nWhy we are making this change\n-----------------------------\n\nThis change is driven by the following goals:\n\n- Reducing fraud on App Engine\n\n- Increasing the integration of App Engine with other Google Cloud\n services\n\n### Reduce fraud on App Engine\n\nFraud hurts all legitimate users of App Engine and Google. Our\nengineering and support teams invest significant amounts of time in preventing,\nmonitoring, and diagnosing fraudulent usage. This limits the resources we have\navailable to legitimate customers. In addition, fraud costs Google money, which\nraises costs for everyone as it must be accounted for in our pricing of\nApp Engine.\n\nWe have direct evidence from our experience with the newer runtimes that\nrequiring a payment method reduces fraud.\n\n### Integrate App Engine with other Google Cloud services\n\nApp Engine launched in 2008, predating Google Cloud, and was built in a\ncompletely custom and proprietary architecture, since there was no broader platform\nto integrate with. Now that Google Cloud is a large and sophisticated\nplatform, our customers are asking for App Engine to integrate\nseamlessly with the services available in Google Cloud.\n\nIntegration with other Google Cloud services is possible through\nServerless VPC Access, which allows App Engine to sit within\nthe same VPC as Compute Engine VMs and Google Kubernetes Engine clusters. As part of the\nintegration, we are moving App Engine builds to Cloud Build, which\nhas the following benefits:\n\n- Detailed build output including verbose warnings and errors\n\n- The ability to view build history in the Cloud Build section of\n the Cloud console\n\n- (Coming soon) The ability to include any library in your code in addition to\n the predefined set that is available in the App Engine runtimes\n\nAlmost all Google Cloud services require a payment method, so this\nadditional integration means that App Engine must also require a payment\nmethod.\n\nCosts of using Cloud Build\n--------------------------\n\nCloud Build has a free tier that includes 120 build minutes per\nbilling account, per day. For example, if your build took 5 minutes to complete,\nyou would be able to deploy 24 times a day without incurring any charges.\nFor more information on pricing beyond the free tier, see\n[Cloud Build pricing](/build/pricing).\n\nLimit your costs\n----------------\n\nYou can use the following mechanisms to limit your App Engine costs:\n\n- Set the [`max_instances`](/appengine/docs/standard/reference/app-yaml#scaling_elements)\n setting in your `app.yaml` configuration file to `1` to restrict your instance\n usage to the free tier.\n\n- [Set a budget and alerts](/billing/docs/how-to/budgets) to monitor your\n resource consumption across all Google Cloud services.\n\n- [Manually disable your app](/appengine/docs/standard/managing-projects-apps-billing#disabling_an_application)\n once it goes above a preset usage level."]]