NAME

Google::Cloud::Scheduler::V1::Target - Compiled Protocol Buffers messages for google/cloud/scheduler/v1/target.proto

SYNOPSIS

use Google::Cloud::Scheduler::V1::Target;

my $msg = Google::Cloud::Scheduler::V1::Target::HttpTarget->new({
    uri => $uri,
    http_method => $http_method,
    headers => $headers,
    body => $body,
});

# Read or update a field
my $val = $msg->uri();

# Binary wire-format roundtrip
my $bytes   = $msg->serialize();
my $decoded = Google::Cloud::Scheduler::V1::Target::HttpTarget->parse($bytes);

# Canonical ProtoJSON
my $json = $msg->to_json();

DESCRIPTION

Auto-generated Protobuf message classes compiled from google/cloud/scheduler/v1/target.proto. All message classes inherit from Protobuf::Message and support new(), serialize(), parse(), to_json(), from_json(), to_text(), and to_perl().

MESSAGES

Google::Cloud::Scheduler::V1::Target::HttpTarget

Http target. The job will be pushed to the job handler by means of an HTTP request via an [http_method][google.cloud.scheduler.v1.HttpTarget.http_method] such as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP response code in the range [200 - 299]. A failure to receive a response constitutes a failed execution. For a redirected request, the response returned by the redirected request is considered.

Inherits from Protobuf::Message.

Accessors

  • $msg->uri() / $msg->uri($value)

    Type: String

    Required. The full URI path that the request will be sent to. This string must begin with either "http://" or "https://". Some examples of valid values for [uri][google.cloud.scheduler.v1.HttpTarget.uri] are: `http://acme.com` and `https://acme.com/sales:8080`. Cloud Scheduler will encode some characters for safety and compatibility. The maximum allowed URL length is 2083 characters after encoding.

  • $msg->http_method() / $msg->http_method($value)

    Type: Enum (Google::Cloud::Scheduler::V1::HttpMethod)

    Which HTTP method to use for the request.

  • $msg->headers() / $msg->headers($value)

    Type: Message (Google::Cloud::Scheduler::V1::Target::HttpTarget::HeadersEntry)

    HTTP request headers.

    This map contains the header field names and values.

    The user can specify HTTP request headers to send with the job's HTTP request. Repeated headers are not supported, but a header value can contain commas.

    The following headers represent a subset of the headers that accompany the job's HTTP request. Some HTTP request headers are ignored or replaced. A partial list of headers that are ignored or replaced is below:

    * Host: This will be computed by Cloud Scheduler and derived from [uri][google.cloud.scheduler.v1.HttpTarget.uri]. * `Content-Length`: This will be computed by Cloud Scheduler. * `User-Agent`: This will be set to `"Google-Cloud-Scheduler"`. * `X-Google-*`: Google internal use only. * `X-AppEngine-*`: Google internal use only. * `X-CloudScheduler`: This header will be set to true. * `X-CloudScheduler-JobName`: This header will contain the job name. * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in the unix-cron format, this header will contain the job schedule as an offset of UTC parsed according to RFC3339.

    If the job has a [body][google.cloud.scheduler.v1.HttpTarget.body] and the following headers are not set by the user, Cloud Scheduler sets default values:

    * `Content-Type`: This will be set to `"application/octet-stream"`. You can override this default by explicitly setting `Content-Type` to a particular media type when creating the job. For example, you can set `Content-Type` to `"application/json"`.

    The total size of headers must be less than 80KB.

  • $msg->body() / $msg->body($value)

    Type: Bytes

    HTTP request body. A request body is allowed only if the HTTP method is POST, PUT, or PATCH. It is an error to set body on a job with an incompatible [HttpMethod][google.cloud.scheduler.v1.HttpMethod].

  • $msg->oauth_token() / $msg->oauth_token($value)

    Type: Message (Google::Cloud::Scheduler::V1::Target::OAuthToken)

    If specified, an [OAuth token](https://developers.google.com/identity/protocols/OAuth2) will be generated and attached as an `Authorization` header in the HTTP request.

    This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com.

  • $msg->oidc_token() / $msg->oidc_token($value)

    Type: Message (Google::Cloud::Scheduler::V1::Target::OidcToken)

    If specified, an [OIDC](https://developers.google.com/identity/protocols/OpenIDConnect) token will be generated and attached as an `Authorization` header in the HTTP request.

    This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself.

Google::Cloud::Scheduler::V1::Target::AppEngineHttpTarget

App Engine target. The job will be pushed to a job handler by means of an HTTP request via an [http_method][google.cloud.scheduler.v1.AppEngineHttpTarget.http_method] such as HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP response code in the range [200 - 299]. Error 503 is considered an App Engine system error instead of an application error. Requests returning error 503 will be retried regardless of retry configuration and not counted against retry counts. Any other response code, or a failure to receive a response before the deadline, constitutes a failed attempt.

Inherits from Protobuf::Message.

Accessors

  • $msg->http_method() / $msg->http_method($value)

    Type: Enum (Google::Cloud::Scheduler::V1::HttpMethod)

    The HTTP method to use for the request. PATCH and OPTIONS are not permitted.

  • $msg->app_engine_routing() / $msg->app_engine_routing($value)

    Type: Message (Google::Cloud::Scheduler::V1::Target::AppEngineRouting)

    App Engine Routing setting for the job.

  • $msg->relative_uri() / $msg->relative_uri($value)

    Type: String

    The relative URI.

    The relative URL must begin with "/" and must be a valid HTTP relative URL. It can contain a path, query string arguments, and `#` fragments. If the relative URL is empty, then the root path "/" will be used. No spaces are allowed, and the maximum length allowed is 2083 characters.

  • $msg->headers() / $msg->headers($value)

    Type: Message (Google::Cloud::Scheduler::V1::Target::AppEngineHttpTarget::HeadersEntry)

    HTTP request headers.

    This map contains the header field names and values. Headers can be set when the job is created.

    Cloud Scheduler sets some headers to default values:

    * `User-Agent`: By default, this header is `"AppEngine-Google; (+http://code.google.com/appengine)"`. This header can be modified, but Cloud Scheduler will append `"AppEngine-Google; (+http://code.google.com/appengine)"` to the modified `User-Agent`. * `X-CloudScheduler`: This header will be set to true. * `X-CloudScheduler-JobName`: This header will contain the job name. * `X-CloudScheduler-ScheduleTime`: For Cloud Scheduler jobs specified in the unix-cron format, this header will contain the job schedule as an offset of UTC parsed according to RFC3339.

    If the job has a [body][google.cloud.scheduler.v1.AppEngineHttpTarget.body] and the following headers are not set by the user, Cloud Scheduler sets default values:

    * `Content-Type`: This will be set to `"application/octet-stream"`. You can override this default by explicitly setting `Content-Type` to a particular media type when creating the job. For example, you can set `Content-Type` to `"application/json"`.

    The headers below are output only. They cannot be set or overridden:

    * `Content-Length`: This is computed by Cloud Scheduler. * `X-Google-*`: For Google internal use only. * `X-AppEngine-*`: For Google internal use only.

    In addition, some App Engine headers, which contain job-specific information, are also be sent to the job handler.

  • $msg->body() / $msg->body($value)

    Type: Bytes

    Body.

    HTTP request body. A request body is allowed only if the HTTP method is POST or PUT. It will result in invalid argument error to set a body on a job with an incompatible [HttpMethod][google.cloud.scheduler.v1.HttpMethod].

Google::Cloud::Scheduler::V1::Target::PubsubTarget

Pub/Sub target. The job will be delivered by publishing a message to the given Pub/Sub topic.

Inherits from Protobuf::Message.

Accessors

  • $msg->topic_name() / $msg->topic_name($value)

    Type: String

    Required. The name of the Cloud Pub/Sub topic to which messages will be published when a job is delivered. The topic name must be in the same format as required by Pub/Sub's [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest), for example `projects/PROJECT_ID/topics/TOPIC_ID`.

    The topic must be in the same project as the Cloud Scheduler job.

  • $msg->data() / $msg->data($value)

    Type: Bytes

    The message payload for PubsubMessage.

    Pubsub message must contain either non-empty data, or at least one attribute.

  • $msg->attributes() / $msg->attributes($value)

    Type: Message (Google::Cloud::Scheduler::V1::Target::PubsubTarget::AttributesEntry)

    Attributes for PubsubMessage.

    Pubsub message must contain either non-empty data, or at least one attribute.

Google::Cloud::Scheduler::V1::Target::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).

Inherits from Protobuf::Message.

Accessors

  • $msg->service() / $msg->service($value)

    Type: String

    App service.

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

  • $msg->version() / $msg->version($value)

    Type: String

    App version.

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

  • $msg->instance() / $msg->instance($value)

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

  • $msg->host() / $msg->host($value)

    Type: 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]`</br> `| [service] + '.' + [application_domain_name]`</br> `| [version] + '.' + [application_domain_name]`</br> `| [version_dot_service]+ '.' + [application_domain_name]`</br> `| [instance] + '.' + [application_domain_name]`</br> `| [instance_dot_service] + '.' + [application_domain_name]`</br> `| [instance_dot_version] + '.' + [application_domain_name]`</br> `| [instance_dot_version_dot_service] + '.' + [application_domain_name]`

    * `application_domain_name` = The domain name of the app, for example <app-id>.appspot.com, which is associated with the job's project ID.

    * `service =` [service][google.cloud.scheduler.v1.AppEngineRouting.service]

    * `version =` [version][google.cloud.scheduler.v1.AppEngineRouting.version]

    * `version_dot_service =` [version][google.cloud.scheduler.v1.AppEngineRouting.version] `+ '.' +` [service][google.cloud.scheduler.v1.AppEngineRouting.service]

    * `instance =` [instance][google.cloud.scheduler.v1.AppEngineRouting.instance]

    * `instance_dot_service =` [instance][google.cloud.scheduler.v1.AppEngineRouting.instance] `+ '.' +` [service][google.cloud.scheduler.v1.AppEngineRouting.service]

    * `instance_dot_version =` [instance][google.cloud.scheduler.v1.AppEngineRouting.instance] `+ '.' +` [version][google.cloud.scheduler.v1.AppEngineRouting.version]

    * `instance_dot_version_dot_service =` [instance][google.cloud.scheduler.v1.AppEngineRouting.instance] `+ '.' +` [version][google.cloud.scheduler.v1.AppEngineRouting.version] `+ '.' +` [service][google.cloud.scheduler.v1.AppEngineRouting.service]

    If [service][google.cloud.scheduler.v1.AppEngineRouting.service] is empty, then the job will be sent to the service which is the default service when the job is attempted.

    If [version][google.cloud.scheduler.v1.AppEngineRouting.version] is empty, then the job will be sent to the version which is the default version when the job is attempted.

    If [instance][google.cloud.scheduler.v1.AppEngineRouting.instance] is empty, then the job will be sent to an instance which is available when the job is attempted.

    If [service][google.cloud.scheduler.v1.AppEngineRouting.service], [version][google.cloud.scheduler.v1.AppEngineRouting.version], or [instance][google.cloud.scheduler.v1.AppEngineRouting.instance] is invalid, then the job will be sent to the default version of the default service when the job is attempted.

Google::Cloud::Scheduler::V1::Target::OAuthToken

Contains information needed for generating an [OAuth token](https://developers.google.com/identity/protocols/OAuth2). This type of authorization should generally only be used when calling Google APIs hosted on *.googleapis.com.

Inherits from Protobuf::Message.

Accessors

  • $msg->service_account_email() / $msg->service_account_email($value)

    Type: String

    [Service account email](https://cloud.google.com/iam/docs/service-accounts) to be used for generating OAuth token. The service account must be within the same project as the job. The caller must have iam.serviceAccounts.actAs permission for the service account.

  • $msg->scope() / $msg->scope($value)

    Type: String

    OAuth scope to be used for generating OAuth access token. If not specified, "https://www.googleapis.com/auth/cloud-platform" will be used.

Google::Cloud::Scheduler::V1::Target::OidcToken

Contains information needed for generating an [OpenID Connect token](https://developers.google.com/identity/protocols/OpenIDConnect). This type of authorization can be used for many scenarios, including calling Cloud Run, or endpoints where you intend to validate the token yourself.

Inherits from Protobuf::Message.

Accessors

  • $msg->service_account_email() / $msg->service_account_email($value)

    Type: String

    [Service account email](https://cloud.google.com/iam/docs/service-accounts) to be used for generating OIDC token. The service account must be within the same project as the job. The caller must have iam.serviceAccounts.actAs permission for the service account.

  • $msg->audience() / $msg->audience($value)

    Type: String

    Audience to be used when generating OIDC token. If not specified, the URI specified in target will be used.

SEE ALSO

Protobuf, Protobuf::Message, Google::Cloud::Scheduler::V1::Target::Types, https://protobuf.dev/

LICENSE AND COPYRIGHT

Copyright (C) 2026 Google LLC

This program is released under the Apache 2.0 license.