gax-nodejs icon indicating copy to clipboard operation
gax-nodejs copied to clipboard

feat: add back helper for generating "parent" path

Open bcoe opened this issue 5 years ago • 5 comments

In v3 of the translate API, we are requiring that folks generate a full parent path when interacting with the API:

parent: `projects/${projectId}/locations/${location}`,

This is fairly unwieldy, and we should reintroduce a helper for this.

CC: @alexander-fenster, @nnegrey

bcoe avatar Oct 28 '19 16:10 bcoe

Will be later this week. This will be a compatible change (just adding a few methods). @xiaozhenliu-gg5 is working on it in the generator.

alexander-fenster avatar Oct 28 '19 17:10 alexander-fenster

When I look at my project storage bucket in the gcp (or if I query the bucket's metadata from the command line) the value for the location field just says "us (multiple regions in United States)" (or "US")

Am I supposed to assume that it should be "us-central1"?

arcman77 avatar Nov 12 '19 02:11 arcman77

@arcman77, feel free to open a separate issues for this as that is a little different, but there are different types of cloud storage buckets. Regions and multi-regions. Sounds like you have a multi-regional bucket. https://cloud.google.com/storage/docs/locations#available_locations

The translation api currently supports two regions (global and us-central1) """ Note: All your resources in a single request to Translation API - Advanced must have the same location. Currently, only global and us-central1 locations are supported. For all custom resources—AutoML models, glossaries, long-running-operations—you must use us-central1. You can also use us-central1 for general translation and language detection. The global location can only be used for general translation models and language detection. """ From https://cloud.google.com/translate/docs/migrate-to-v3#resources_projects_and_locations

But the bucket location is only required if you are trying to use custom resources, if you are not, then global should be all you need.

nnegrey avatar Nov 12 '19 15:11 nnegrey

Moving this over to gax since I suspect this would need to be fixed there?

JustinBeckwith avatar Jul 15 '20 02:07 JustinBeckwith

I guess it's the gapic-generator-typescript and maybe it's just a dup of https://github.com/googleapis/gapic-generator-typescript/issues/570, but I'll take a look anyway.

alexander-fenster avatar Jul 16 '20 00:07 alexander-fenster