firebase-admin-node icon indicating copy to clipboard operation
firebase-admin-node copied to clipboard

[FR] Let specify function region: `getFunctions(undefined, 'southamerica-east1')`

Open gustavopch opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. Not applicable.

Describe the solution you'd like I need to specify the region of the function that I'm calling when enqueuing a task with firebase-admin:

await getFunctions().taskQueue('foo').enqueue({
  id: '123',
})

Describe alternatives you've considered None.

EDIT: Just found that it's possible to specify the region like the following snippet, but maybe still consider adding the region parameter to getFunctions() to make it similar to the JS SDK (as also suggested here) or at least mention this in the docs:

await getFunctions().taskQueue('locations/southamerica-east1/functions/foo').enqueue({
  id: '123',
})

Additional context Firebase JS SDK works that way. You can pass the region as the second argument to getFunctions(): https://firebase.google.com/docs/reference/js/functions.md#getfunctions

gustavopch avatar Jun 08 '22 18:06 gustavopch

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

google-oss-bot avatar Jun 08 '22 18:06 google-oss-bot