gcp上的无服务器添加自定义http路径

时间:2018-11-30 12:44:05

标签: google-cloud-functions serverless-framework serverless

我具有在Google Cloud Functions上部署的无服务器功能,但我希望它位于自定义的http路径而不是函数处理程序名称。

functions:
  board_meta:
    memorySize: 128
    handler: boardMeta
    events:
      - http: board-meta

所需的路径为board-meta,但这只是忽略了- http: board-meta的方向。并以boardMeta作为路径部署该功能。

我也尝试过:

functions:
  board_meta:
    memorySize: 128
    handler: boardMeta
    events:
      - http: 
        path: board-meta

这会导致错误:

Deployment failed: CONDITION_NOT_MET

     "/httpsTrigger/url": domain: validation; keyword: type; message: instance does not match any allowed primitive type; allowed: ["string"]; found: "null"

0 个答案:

没有答案