getDefaultGcsBucketName不包含任何数据

Dav*_* T. 4 java google-app-engine google-cloud-storage

我正在使用app engine 1.9.7 sdk并尝试按照Google Cloud Storage客户端访问的文档进行操作.我正在尝试找到默认的存储桶名称(所以我可以用免费配额测试一下).但有2个问题:

1)每当我尝试使用

AppIdentityService appIdentity = AppIdentityServiceFactory.getAppIdentityService();
String bucketName = appIdentity.getDefaultGcsBucketName();

resp.getWriter().println("no write " + bucketName);
Run Code Online (Sandbox Code Playgroud)

我得到这个例外:

来自servlet的未捕获异常com.google.appengine.api.appidentity.AppIdentityServiceFailureException:getDefaultGcsBucketNameResponse在com.google.appengine.api.appidentity.AppIdentityServiceImpl.getDefaultGcsBucketName(AppIdentityServiceImpl.java:163)中不包含任何数据

为什么它不包含数据?

2)我不小心激活并创建了一个新的存储桶(并向其写了一个非常小的文件).怎么收费没有出现在我的每月估算费用上?

我和这个家伙有同样的问题:" getDefaultGcsBucketName响应中没有数据 "但问题是我正在使用更高版本的app引擎

小智 6

我有一个1.9.7应用程序的相同问题.转到appengine.google.com,转到管理 - >应用程序设置.滚动到页面底部,Cloud Integration并启用它.

过了一会儿,您应该会在同一页面的"基础"字段中看到Google云端存储分区.