3

My gcloud tools default to us-west1 but when I create a queue and try to use via java and apis, I get this error

"Location 'us-west1' is not a valid location. Use ListLocations to list valid locations.",

and when I try to list locations like it says with gcloud, I get this

Deans-The-Machine dean$ gcloud tasks queues list
QUEUE_NAME        STATE    MAX_NUM_OF_TASKS  MAX_RATE (/sec)  MAX_ATTEMPTS
staging-scrapers  RUNNING  25                2.0              3

How do I get the locations list with gcloud command line?

thanks, Dean

Dean Hiller
  • 19,235
  • 25
  • 129
  • 212
  • Use the command `gcloud tasks locations list` to see supported locations. Use `us-east4`. https://cloud.google.com/sdk/gcloud/reference/tasks/locations/list – John Hanley Aug 01 '20 at 05:40
  • @JohnHanley That command lists one and 'only' one location for me us-central1 . Why is there only one location? That seems odd. all my servers are running in us-west1 so I wanted to run google cloud tasks there. – Dean Hiller Aug 01 '20 at 22:08

2 Answers2

1

As per the documentation it seems that Cloud Task is not available in us-west1.

Taking a look at the Cloud Tasks overview you will see that Cloud Tasks requires an App Engine app to be able to host the queues. If you take a look at the currently available regions for GAE, you will see that the region us-westt is not listed, therefore, you cannot host the Cloud Tasks queues in that specific region.

I found this Feature Request asking for add us-west1 in the available Regions for App Engine

Andie Vanille
  • 820
  • 5
  • 14
1

The cloud tasks can be created where the App Engine is deployed.

To access the Cloud Tasks service using Cloud Tasks API , you must have a project that contains an App Engine app that hosts the Cloud Tasks queues that you create. This app is located in a specific region which serves as the LOCATION_ID parameter for your Cloud Tasks requests, so make a note of it.

As per the location, Google App Engine is not available in us-west1

Vikram Shinde
  • 1,022
  • 6
  • 17