Struct google_api_proto::google::cloud::scheduler::v1beta1::HttpTarget
source · pub struct HttpTarget {
pub uri: String,
pub http_method: i32,
pub headers: BTreeMap<String, String>,
pub body: Bytes,
pub authorization_header: Option<AuthorizationHeader>,
}
Expand description
Http target. The job will be pushed to the job handler by means of an HTTP request via an [http_method][google.cloud.scheduler.v1beta1.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.
Fields§
§uri: 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.v1beta1.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.
http_method: i32
Which HTTP method to use for the request.
headers: BTreeMap<String, String>
The user can specify HTTP request headers to send with the job’s HTTP request. This map contains the header field names and values. Repeated headers are not supported, but a header value can contain commas. These headers represent a subset of the headers that will accompany the job’s HTTP request. Some HTTP request headers will be ignored or replaced. A partial list of headers that will be ignored or replaced is below:
- Host: This will be computed by Cloud Scheduler and derived from [uri][google.cloud.scheduler.v1beta1.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.
The total size of headers must be less than 80KB.
body: 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.v1beta1.HttpMethod].
The mode for generating an Authorization
header for HTTP requests.
If specified, all Authorization
headers in the
[HttpTarget.headers][google.cloud.scheduler.v1beta1.HttpTarget.headers]
field will be overridden.
Implementations§
source§impl HttpTarget
impl HttpTarget
sourcepub fn http_method(&self) -> HttpMethod
pub fn http_method(&self) -> HttpMethod
Returns the enum value of http_method
, or the default if the field is set to an invalid enum value.
sourcepub fn set_http_method(&mut self, value: HttpMethod)
pub fn set_http_method(&mut self, value: HttpMethod)
Sets http_method
to the provided enum value.
Trait Implementations§
source§impl Clone for HttpTarget
impl Clone for HttpTarget
source§fn clone(&self) -> HttpTarget
fn clone(&self) -> HttpTarget
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for HttpTarget
impl Debug for HttpTarget
source§impl Default for HttpTarget
impl Default for HttpTarget
source§impl Message for HttpTarget
impl Message for HttpTarget
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for HttpTarget
impl PartialEq for HttpTarget
source§fn eq(&self, other: &HttpTarget) -> bool
fn eq(&self, other: &HttpTarget) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for HttpTarget
Auto Trait Implementations§
impl !Freeze for HttpTarget
impl RefUnwindSafe for HttpTarget
impl Send for HttpTarget
impl Sync for HttpTarget
impl Unpin for HttpTarget
impl UnwindSafe for HttpTarget
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request