使用 Namespaces API,您只需为每个租户指定唯一的命名空间字符串,即可轻松在租户之间对数据进行分区。您只需使用命名空间管理器为每个租户全局设置命名空间(而不是针对特定请求明确设置命名空间)。默认情况下,支持命名空间的 API 始终使用此当前命名空间。
Namespaces API 与 Google Workspace 集成,这样您就可以将 Google Workspace 网域用作当前命名空间。由于 Google Workspace 可让您将应用部署到您拥有的任何网域,因此您可以轻松为与 Google Workspace 账号关联的所有网域设置独一无二的命名空间。
[[["易于理解","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-03-06。"],[[["The Namespaces API in Google App Engine allows for data compartmentalization, primarily used to manage multitenant applications where a single application instance serves multiple client organizations."],["This API uses the `appengine.Namespace` function and is integrated into several namespace-enabled APIs like Datastore, Memcache, Task Queue, and Search."],["By setting a unique namespace string for each tenant via the namespace manager, data can be partitioned across tenants, enabling easier management and segregation of data."],["The Namespaces API is integrated with Google Workspace, allowing for the use of a Google Workspace domain as the current namespace, enabling easy management across multiple domains."],["Beyond multitenancy, the Namespaces API can also be used to compartmentalize user information, separate admin and application data, create distinct datastore instances for testing and production, and run multiple apps within a single App Engine instance."]]],[]]