# Cloud Scheduler V1 Client - Class AppEngineRouting (2.2.0)

2.2.0 (latest) 2.1.2 2.0.5 1.10.5 1.9.4 1.8.3 1.7.1 1.6.8 Reference documentation and code samples for the Cloud Scheduler V1 Client class AppEngineRouting.

App Engine Routing.

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

Generated from protobuf message `google.cloud.scheduler.v1.AppEngineRouting`

## Namespace

Google \\ Cloud \\ Scheduler \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ service` | `string` App service. By default, the job is sent to the service which is the default service when the job is attempted. |
| `↳ version` | `string` App version. By default, the job is sent to the version which is the default version when the job is attempted. |
| `↳ instance` | `string` App instance. By default, the job is sent to an instance which is available when the job 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#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 job is sent to. For more information about how App Engine requests are routed, see [here](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed). The host is constructed as: \* \* `host = [application_domain_name]` `| [service] + '.' + [application_domain_name]` `| [version] + '.' + [application_domain_name]` `| [version_dot_service]+ '.' + [application_domain_name]` `| [instance] + '.' + [application_domain_name]` `| [instance_dot_service] + '.' + [application_domain_name]` `| [instance_dot_version] + '.' + [application_domain_name]` `| [instance_dot_version_dot_service] + '.' + [application_domain_name]` \* \* `application_domain_name` = The domain name of the app, for example |

### getService

App service.

By default, the job is sent to the service which is the default
service when the job is attempted.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setService

App service.

By default, the job is sent to the service which is the default
service when the job is attempted.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getVersion

App version.

By default, the job is sent to the version which is the default
version when the job is attempted.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setVersion

App version.

By default, the job is sent to the version which is the default
version when the job is attempted.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getInstance

App instance.

By default, the job is sent to an instance which is available when
the job 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#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).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setInstance

App instance.

By default, the job is sent to an instance which is available when
the job 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#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).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getHost

Output only. The host that the job is sent to.

For more information about how App Engine requests are routed, see
[here](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
The host is constructed as:

- `host = [application_domain_name]`  
  `| [service] + '.' + [application_domain_name]`  
  `| [version] + '.' + [application_domain_name]`  
  `| [version_dot_service]+ '.' + [application_domain_name]`  
  `| [instance] + '.' + [application_domain_name]`  
  `| [instance_dot_service] + '.' + [application_domain_name]`  
  `| [instance_dot_version] + '.' + [application_domain_name]`  
  `| [instance_dot_version_dot_service] + '.' + [application_domain_name]`
- `application_domain_name` = The domain name of the app, for example
- `service =` [service](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getService__)
- `version =` [version](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getVersion__)
- `version_dot_service =` [version](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getVersion__) `+ '.' +` [service](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getService__)
- `instance =` [instance](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getInstance__)
- `instance_dot_service =` [instance](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getInstance__) `+ '.' +` [service](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getService__)
- `instance_dot_version =` [instance](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getInstance__) `+ '.' +` [version](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getVersion__)
- `instance_dot_version_dot_service =` [instance](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getInstance__) `+ '.' +` [version](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getVersion__) `+ '.' +` [service](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getService__) If [service](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getService__) is empty, then the job will be sent to the service which is the default service when the job is attempted. If [version](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getVersion__) is empty, then the job will be sent to the version which is the default version when the job is attempted. If [instance](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getInstance__) is empty, then the job will be sent to an instance which is available when the job is attempted. If [service](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getService__), [version](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getVersion__), or [instance](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getInstance__) is invalid, then the job will be sent to the default version of the default service when the job is attempted.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setHost

Output only. The host that the job is sent to.

For more information about how App Engine requests are routed, see
[here](https://cloud.google.com/appengine/docs/standard/python/how-requests-are-routed).
The host is constructed as:

- `host = [application_domain_name]`  
  `| [service] + '.' + [application_domain_name]`  
  `| [version] + '.' + [application_domain_name]`  
  `| [version_dot_service]+ '.' + [application_domain_name]`  
  `| [instance] + '.' + [application_domain_name]`  
  `| [instance_dot_service] + '.' + [application_domain_name]`  
  `| [instance_dot_version] + '.' + [application_domain_name]`  
  `| [instance_dot_version_dot_service] + '.' + [application_domain_name]`
- `application_domain_name` = The domain name of the app, for example
- `service =` [service](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getService__)
- `version =` [version](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getVersion__)
- `version_dot_service =` [version](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getVersion__) `+ '.' +` [service](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getService__)
- `instance =` [instance](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getInstance__)
- `instance_dot_service =` [instance](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getInstance__) `+ '.' +` [service](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getService__)
- `instance_dot_version =` [instance](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getInstance__) `+ '.' +` [version](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getVersion__)
- `instance_dot_version_dot_service =` [instance](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getInstance__) `+ '.' +` [version](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getVersion__) `+ '.' +` [service](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getService__) If [service](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getService__) is empty, then the job will be sent to the service which is the default service when the job is attempted. If [version](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getVersion__) is empty, then the job will be sent to the version which is the default version when the job is attempted. If [instance](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getInstance__) is empty, then the job will be sent to an instance which is available when the job is attempted. If [service](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getService__), [version](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getVersion__), or [instance](https://docs.cloud.google.com/php/docs/reference/cloud-scheduler/latest/V1.AppEngineRouting#_Google_Cloud_Scheduler_V1_AppEngineRouting__getInstance__) is invalid, then the job will be sent to the default version of the default service when the job is attempted.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |