- [JSON representation](https://docs.cloud.google.com/tasks/docs/reference/rest/v2/AppEngineRouting#SCHEMA_REPRESENTATION)

App Engine Routing.

Defines routing characteristics specific to App Engine - service, version, and instance.

For more information about services, versions, and instances see [An Overview of App Engine](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine), [Microservices Architecture on Google App Engine](https://cloud.google.com/appengine/docs/python/microservices-on-app-engine), [App Engine Standard request routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed), and [App Engine Flex request routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed).

Using `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/AppEngineRouting` requires [`appengine.applications.get`](https://cloud.google.com/appengine/docs/admin-api/access-control) Google IAM permission for the project and the following scope:

`https://www.googleapis.com/auth/cloud-platform`

| JSON representation |
|---|
| ``` { "service": string, "version": string, "instance": string, "host": string } ``` |

| Fields ||
|---|---|
| `service` | `string` App service. By default, the task is sent to the service which is the default service when the task is attempted. For some queues or tasks which were created using the App Engine Task Queue API, `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/AppEngineRouting#FIELDS.host` is not parsable into `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/AppEngineRouting#FIELDS.service`, `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/AppEngineRouting#FIELDS.version`, and `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/AppEngineRouting#FIELDS.instance`. For example, some tasks which were created using the App Engine SDK use a custom domain name; custom domains are not parsed by Cloud Tasks. If `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/AppEngineRouting#FIELDS.host` is not parsable, then `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/AppEngineRouting#FIELDS.service`, `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/AppEngineRouting#FIELDS.version`, and `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/AppEngineRouting#FIELDS.instance` are the empty string. |
| `version` | `string` App version. By default, the task is sent to the version which is the default version when the task is attempted. For some queues or tasks which were created using the App Engine Task Queue API, `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/AppEngineRouting#FIELDS.host` is not parsable into `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/AppEngineRouting#FIELDS.service`, `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/AppEngineRouting#FIELDS.version`, and `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/AppEngineRouting#FIELDS.instance`. For example, some tasks which were created using the App Engine SDK use a custom domain name; custom domains are not parsed by Cloud Tasks. If `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/AppEngineRouting#FIELDS.host` is not parsable, then `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/AppEngineRouting#FIELDS.service`, `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/AppEngineRouting#FIELDS.version`, and `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/AppEngineRouting#FIELDS.instance` are the empty string. |
| `instance` | `string` App instance. By default, the task is sent to an instance which is available when the task is attempted. Requests can only be sent to a specific instance if [manual scaling is used in App Engine Standard](https://cloud.google.com/appengine/docs/python/an-overview-of-app-engine?hl=en_US#scaling_types_and_instance_classes). App Engine Flex does not support instances. For more information, see [App Engine Standard request routing](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed) and [App Engine Flex request routing](https://cloud.google.com/appengine/docs/flexible/python/how-requests-are-routed). |
| `host` | `string` Output only. The host that the task is sent to. The host is constructed from the domain name of the app associated with the queue's project ID (for example .appspot.com), and the `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/AppEngineRouting#FIELDS.service`, `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/AppEngineRouting#FIELDS.version`, and `https://docs.cloud.google.com/tasks/docs/reference/rest/v2/AppEngineRouting#FIELDS.instance`. Tasks which were created using the App Engine SDK might have a custom domain name. For more information, see [How Requests are Routed](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). |