google-app-engine - 无法使用 Web API 在 Google App Engine 中创建应用程序。错误 : 409 - This application already exists and cannot be re-created

标签 google-app-engine google-apis-explorer

我正在尝试使用 Google Cloud Web API 在 App Engine 中创建应用程序,如官方文档 ( https://cloud.google.com/appengine/docs/admin-api/creating-an-application ) 中所述。我用:

  • 具有有效范围( https://www.googleapis.com/auth/cloud-platformhttps://www.googleapis.com/auth/appengine.admin )的有效 OAuth token 。
  • 我已启用 App Engine API。
  • 我有一个没有 App Engine 的有效 ProjectId。

  • 当我使用 node-fetch 执行 HTTP POST 时如下:
    fetch('https://appengine.googleapis.com/v1/apps', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json',
            Authorization: `Bearer ${token}`
        },
        body: JSON.stringify({ 
            id: projectId,
            locationId:'australia-southeast1'
        })
    })
    

    然后我收到此错误消息:
    {
     "code": 409,
     "message": "This application already exists and cannot be re-created.",
     "status": "ALREADY_EXISTS"
    }
    

    这真的很奇怪,因为我的项目 ID 还没有定义 App Engine。

    有谁知道这里发生了什么?

    最佳答案

    至少不久前创建一个项目(手动)会自动创建与之关联的 GAE 应用程序资源。从您引用的文档中:

    If you choose to use an existing GCP project, you must ensure that the project does not already contain the Application resource because projects support only a single App Engine application. To check if your GCP project already contains the Application resource, you can use either the apps.get method or run the gcloud app describe command.

    关于google-app-engine - 无法使用 Web API 在 Google App Engine 中创建应用程序。错误 : 409 - This application already exists and cannot be re-created,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52111214/

    相关文章:

    python - 如何在 App Engine 中从 JSON 中排除 db.Blob

    android - 使用 Firebase Management Api 创建 androidapps 的问题

    c# - Youtube API 无效搜索查询 invalidSearchFilter 错误

    google-apis-explorer - 为什么我无法使用在线 Api Explorer 将现有 MediaItem 添加到现有相册?

    google-app-engine - 推送部署、管道、谷歌应用引擎

    java - https ://www. apis.google.com/in spring social 主机验证失败

    google-apis-explorer - Google 相册 API,pageSize 参数未返回预期结果

    dart - Uncaught Error :类 'int'没有实例getter 'length'

    python - 属性错误: 'MainHandler' object has no attribute '_render_template'

    javascript - 如何将 <select> 字段添加到我的 plupload 表单中?