0

I'm trying to deploy my Google Cloud Function using the google-api-nodejs-client.

Other services within the API are working, but this always returns a 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();
        })

I've tried various combinations, but they all have the same result:

<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>

Really Google? Is that all you know?

Nicholas Albion
  • 3,096
  • 7
  • 33
  • 56

1 Answers1

0

Oh, so the documentation could be a little more helpful, but it should be called:

cloudfunctions.projects.locations.functions.get({
    name: 'projects/' + GPROJECT_NAME + 
           '/locations/' + REGION + 
           '/functions/' + functionName,
    auth
}, (err, data) => {
    console.info(data);
});

```

Nicholas Albion
  • 3,096
  • 7
  • 33
  • 56