[][src]Struct gcp_client::google::cloud::scheduler::v1::HttpTarget

pub struct HttpTarget {
    pub uri: String,
    pub http_method: i32,
    pub headers: HashMap<String, String>,
    pub body: Vec<u8>,
    pub authorization_header: Option<AuthorizationHeader>,
}

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.

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

http_method: i32

Which HTTP method to use for the request.

headers: HashMap<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.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.

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

body: Vec<u8>

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

authorization_header: Option<AuthorizationHeader>

The mode for generating an Authorization header for HTTP requests.

If specified, all Authorization headers in the [HttpTarget.headers][google.cloud.scheduler.v1.HttpTarget.headers] field will be overridden.

Implementations

impl HttpTarget[src]

pub fn http_method(&self) -> HttpMethod[src]

Returns the enum value of http_method, or the default if the field is set to an invalid enum value.

pub fn set_http_method(&mut self, value: HttpMethod)[src]

Sets http_method to the provided enum value.

Trait Implementations

impl Clone for HttpTarget[src]

impl Debug for HttpTarget[src]

impl Default for HttpTarget[src]

impl Message for HttpTarget[src]

impl PartialEq<HttpTarget> for HttpTarget[src]

impl StructuralPartialEq for HttpTarget[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]