lib/google/cloud/scheduler/v1beta1/doc/google/cloud/scheduler/v1beta1/target.rb in google-cloud-scheduler-0.2.0 vs lib/google/cloud/scheduler/v1beta1/doc/google/cloud/scheduler/v1beta1/target.rb in google-cloud-scheduler-0.3.0
- old
+ new
@@ -16,13 +16,12 @@
module Google
module Cloud
module Scheduler
module V1beta1
# Http target. The job will be pushed to the job handler by means of
- # an HTTP request via an
- # {Google::Cloud::Scheduler::V1beta1::HttpTarget#http_method http_method} such as
- # HTTP POST, HTTP GET, etc. The job is acknowledged by means of an HTTP
+ # an HTTP request via an {Google::Cloud::Scheduler::V1beta1::HttpTarget#http_method 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.
# @!attribute [rw] uri
# @return [String]
@@ -57,21 +56,39 @@
# @!attribute [rw] body
# @return [String]
# 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 {Google::Cloud::Scheduler::V1beta1::HttpMethod HttpMethod}.
+ # @!attribute [rw] oauth_token
+ # @return [Google::Cloud::Scheduler::V1beta1::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 be used when sending requests to a GCP
+ # endpoint.
+ # @!attribute [rw] oidc_token
+ # @return [Google::Cloud::Scheduler::V1beta1::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 should be used when sending requests to third
+ # party endpoints.
class HttpTarget; end
# App Engine target. The job will be pushed to a job handler by means
- # of an HTTP request via an
- # {Google::Cloud::Scheduler::V1beta1::AppEngineHttpTarget#http_method 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.
+ # of an HTTP request via an {Google::Cloud::Scheduler::V1beta1::AppEngineHttpTarget#http_method 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.
# @!attribute [rw] http_method
# @return [Google::Cloud::Scheduler::V1beta1::HttpMethod]
# The HTTP method to use for the request. PATCH and OPTIONS are not
# permitted.
# @!attribute [rw] app_engine_routing
@@ -97,14 +114,14 @@
# * `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.
#
- # If the job has an
- # {Google::Cloud::Scheduler::V1beta1::AppEngineHttpTarget#body body}, Cloud
- # Scheduler sets the following headers:
+ # If the job has an {Google::Cloud::Scheduler::V1beta1::AppEngineHttpTarget#body body}, Cloud Scheduler sets
+ # the following headers:
#
# * `Content-Type`: By default, the `Content-Type` header is set to
# `"application/octet-stream"`. The default can be overridden by explictly
# setting `Content-Type` to a particular media type when the job is
# created.
@@ -113,26 +130,21 @@
# output only. It cannot be changed.
#
# The headers below are output only. They cannot be set or overridden:
#
# * `X-Google-*`: For Google internal use only.
- # * `X-AppEngine-*`: For Google internal use only. See
- # [Reading request
- # headers](https://cloud.google.com/appengine/docs/python/taskqueue/push/creating-handlers#reading_request_headers).
+ # * `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; see
- # [request
- # headers](https://cloud.google.com/appengine/docs/standard/python/config/cron#securing_urls_for_cron).
+ # job-specific information, are also be sent to the job handler.
# @!attribute [rw] body
# @return [String]
# 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
- # {Google::Cloud::Scheduler::V1beta1::HttpMethod HttpMethod}.
+ # job with an incompatible {Google::Cloud::Scheduler::V1beta1::HttpMethod HttpMethod}.
class AppEngineHttpTarget; end
# Pub/Sub target. The job will be delivered by publishing a message to
# the given Pub/Sub topic.
# @!attribute [rw] topic_name
@@ -219,55 +231,81 @@
#
# * `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 =`
- # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service}
+ # * `service =` {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service}
#
- # * `version =`
- # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version}
+ # * `version =` {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version}
#
# * `version_dot_service =`
- # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version} `+ '.'
- # +` {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service}
+ # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version} `+ '.' +`
+ # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service}
#
- # * `instance =`
- # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance}
+ # * `instance =` {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance}
#
# * `instance_dot_service =`
- # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance} `+
- # '.' +` {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service}
+ # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance} `+ '.' +`
+ # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service}
#
# * `instance_dot_version =`
- # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance} `+
- # '.' +` {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version}
+ # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance} `+ '.' +`
+ # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version}
#
# * `instance_dot_version_dot_service =`
- # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance} `+
- # '.' +` {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version}
- # `+ '.' +`
+ # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance} `+ '.' +`
+ # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version} `+ '.' +`
# {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service}
#
#
- # If {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service} is
- # empty, then the job will be sent to the service which is the default
- # service when the job is attempted.
+ # If {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service} is empty, then the job will be sent
+ # to the service which is the default service when the job is attempted.
#
- # If {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version} is
- # empty, then the job will be sent to the version which is the default
- # version when the job is attempted.
+ # If {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version} is empty, then the job will be sent
+ # to the version which is the default version when the job is attempted.
#
- # If {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance} is
- # empty, then the job will be sent to an instance which is available when the
- # job is attempted.
+ # If {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance instance} is empty, then the job will be
+ # sent to an instance which is available when the job is attempted.
#
# If {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#service service},
# {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#version version}, or
- # {Google::Cloud::Scheduler::V1beta1::AppEngineRouting#instance 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::V1beta1::AppEngineRouting#instance instance} is invalid, then the job will be sent
+ # to the default version of the default service when the job is attempted.
class AppEngineRouting; end
+
+ # Contains information needed for generating an
+ # [OAuth token](https://developers.google.com/identity/protocols/OAuth2).
+ # This type of authorization should be used when sending requests to a GCP
+ # endpoint.
+ # @!attribute [rw] service_account_email
+ # @return [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.
+ # @!attribute [rw] scope
+ # @return [String]
+ # OAuth scope to be used for generating OAuth access token.
+ # If not specified, "https://www.googleapis.com/auth/cloud-platform"
+ # will be used.
+ class OAuthToken; end
+
+ # Contains information needed for generating an
+ # [OpenID Connect
+ # token](https://developers.google.com/identity/protocols/OpenIDConnect). This
+ # type of authorization should be used when sending requests to third party
+ # endpoints.
+ # @!attribute [rw] service_account_email
+ # @return [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.
+ # @!attribute [rw] audience
+ # @return [String]
+ # Audience to be used when generating OIDC token. If not specified, the URI
+ # specified in target will be used.
+ class OidcToken; end
# The HTTP method used to execute the job.
module HttpMethod
# HTTP method unspecified. Defaults to POST.
HTTP_METHOD_UNSPECIFIED = 0
\ No newline at end of file