我正在尝试使用google-api-nodejs-client部署我的Google云端功能。
API中的其他服务正在运行,但这始终返回404:
var cloudfunctions = google.cloudfunctions('v1beta2');
cloudfunctions.operations.get({
// name: 'us-central1/my-function',
name: 'my-function,
auth: jwtClient
},
{url: 'https://cloudfunctions.googleapis.com/v1/projects/' + GPROJECT_NAME + '/locations/us-central1/functions'},
// {url: 'https://cloudfunctions.googleapis.com/v1beta2/'+ GPROJECT_NAME + '/locations/us-central1/functions' + name}, //operations'}
(err, data) => {
console.info('err:', err);
console.info('data:', data);
resolve();
})
我尝试了各种组合,但它们都有相同的结果:
<p><b>404.</b> <ins>That’s an error.</ins>
<p>The requested URL <code>/v1/projects/my-project/locations/us-central1/functions</code> was not found on this server.
<ins>That’s all we know.</ins>
真的是谷歌吗?这就是你所知道的吗?
答案 0 :(得分:0)
哦,所以文档可能会更有帮助,但应该调用它:
cloudfunctions.projects.locations.functions.get({
name: 'projects/' + GPROJECT_NAME +
'/locations/' + REGION +
'/functions/' + functionName,
auth
}, (err, data) => {
console.info(data);
});
```