#[non_exhaustive]pub struct HttpHealthCheck {Show 13 fields
pub check_interval_sec: Option<i32>,
pub creation_timestamp: Option<String>,
pub description: Option<String>,
pub healthy_threshold: Option<i32>,
pub host: Option<String>,
pub id: Option<u64>,
pub kind: Option<String>,
pub name: Option<String>,
pub port: Option<i32>,
pub request_path: Option<String>,
pub self_link: Option<String>,
pub timeout_sec: Option<i32>,
pub unhealthy_threshold: Option<i32>,
/* private fields */
}http-health-checks only.Expand description
Represents a legacy HTTP Health Check resource.
Legacy HTTP health checks are now only required by target pool-based network load balancers. For all other load balancers, including backend service-based network load balancers, and for managed instance group auto-healing, you must use modern (non-legacy) health checks.
For more information, seeHealth checks overview.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.check_interval_sec: Option<i32>How often (in seconds) to send a health check. The default value is5 seconds.
creation_timestamp: Option<String>[Output Only] Creation timestamp inRFC3339 text format.
description: Option<String>An optional description of this resource. Provide this property when you create the resource.
healthy_threshold: Option<i32>A so-far unhealthy instance will be marked healthy after this many consecutive successes. The default value is 2.
host: Option<String>The value of the host header in the HTTP health check request. If left empty (default value), the public IP on behalf of which this health check is performed will be used.
id: Option<u64>[Output Only] The unique identifier for the resource. This identifier is defined by the server.
kind: Option<String>Output only. [Output Only] Type of the resource. Alwayscompute#httpHealthCheck for HTTP health checks.
name: Option<String>Name of the resource. Provided by the client when the resource is created.
The name must be 1-63 characters long, and comply withRFC1035.
Specifically, the name must be 1-63 characters long and match the regular
expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first
character must be a lowercase letter, and all following characters must
be a dash, lowercase letter, or digit, except the last character, which
cannot be a dash.
port: Option<i32>The TCP port number for the HTTP health check request. The default value is80.
request_path: Option<String>The request path of the HTTP health check request. The default value is/. This field does not support query parameters. Must comply withRFC3986.
self_link: Option<String>[Output Only] Server-defined URL for the resource.
timeout_sec: Option<i32>How long (in seconds) to wait before claiming failure. The default value is5 seconds. It is invalid for timeoutSec to have greater value than checkIntervalSec.
unhealthy_threshold: Option<i32>A so-far healthy instance will be marked unhealthy after this many consecutive failures. The default value is 2.
Implementations§
Source§impl HttpHealthCheck
impl HttpHealthCheck
pub fn new() -> Self
Sourcepub fn set_check_interval_sec<T>(self, v: T) -> Self
pub fn set_check_interval_sec<T>(self, v: T) -> Self
Sets the value of check_interval_sec.
§Example
let x = HttpHealthCheck::new().set_check_interval_sec(42);Sourcepub fn set_or_clear_check_interval_sec<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_check_interval_sec<T>(self, v: Option<T>) -> Self
Sets or clears the value of check_interval_sec.
§Example
let x = HttpHealthCheck::new().set_or_clear_check_interval_sec(Some(42));
let x = HttpHealthCheck::new().set_or_clear_check_interval_sec(None::<i32>);Sourcepub fn set_creation_timestamp<T>(self, v: T) -> Self
pub fn set_creation_timestamp<T>(self, v: T) -> Self
Sets the value of creation_timestamp.
§Example
let x = HttpHealthCheck::new().set_creation_timestamp("example");Sourcepub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_creation_timestamp<T>(self, v: Option<T>) -> Self
Sets or clears the value of creation_timestamp.
§Example
let x = HttpHealthCheck::new().set_or_clear_creation_timestamp(Some("example"));
let x = HttpHealthCheck::new().set_or_clear_creation_timestamp(None::<String>);Sourcepub fn set_description<T>(self, v: T) -> Self
pub fn set_description<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_description<T>(self, v: Option<T>) -> Self
Sets or clears the value of description.
§Example
let x = HttpHealthCheck::new().set_or_clear_description(Some("example"));
let x = HttpHealthCheck::new().set_or_clear_description(None::<String>);Sourcepub fn set_healthy_threshold<T>(self, v: T) -> Self
pub fn set_healthy_threshold<T>(self, v: T) -> Self
Sets the value of healthy_threshold.
§Example
let x = HttpHealthCheck::new().set_healthy_threshold(42);Sourcepub fn set_or_clear_healthy_threshold<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_healthy_threshold<T>(self, v: Option<T>) -> Self
Sets or clears the value of healthy_threshold.
§Example
let x = HttpHealthCheck::new().set_or_clear_healthy_threshold(Some(42));
let x = HttpHealthCheck::new().set_or_clear_healthy_threshold(None::<i32>);Sourcepub fn set_or_clear_host<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_host<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_id<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_name<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_port<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_port<T>(self, v: Option<T>) -> Self
Sourcepub fn set_request_path<T>(self, v: T) -> Self
pub fn set_request_path<T>(self, v: T) -> Self
Sets the value of request_path.
§Example
let x = HttpHealthCheck::new().set_request_path("example");Sourcepub fn set_or_clear_request_path<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_request_path<T>(self, v: Option<T>) -> Self
Sets or clears the value of request_path.
§Example
let x = HttpHealthCheck::new().set_or_clear_request_path(Some("example"));
let x = HttpHealthCheck::new().set_or_clear_request_path(None::<String>);Sourcepub fn set_self_link<T>(self, v: T) -> Self
pub fn set_self_link<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_self_link<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_self_link<T>(self, v: Option<T>) -> Self
Sourcepub fn set_timeout_sec<T>(self, v: T) -> Self
pub fn set_timeout_sec<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_timeout_sec<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_timeout_sec<T>(self, v: Option<T>) -> Self
Sets or clears the value of timeout_sec.
§Example
let x = HttpHealthCheck::new().set_or_clear_timeout_sec(Some(42));
let x = HttpHealthCheck::new().set_or_clear_timeout_sec(None::<i32>);Sourcepub fn set_unhealthy_threshold<T>(self, v: T) -> Self
pub fn set_unhealthy_threshold<T>(self, v: T) -> Self
Sets the value of unhealthy_threshold.
§Example
let x = HttpHealthCheck::new().set_unhealthy_threshold(42);Sourcepub fn set_or_clear_unhealthy_threshold<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_unhealthy_threshold<T>(self, v: Option<T>) -> Self
Sets or clears the value of unhealthy_threshold.
§Example
let x = HttpHealthCheck::new().set_or_clear_unhealthy_threshold(Some(42));
let x = HttpHealthCheck::new().set_or_clear_unhealthy_threshold(None::<i32>);Trait Implementations§
Source§impl Clone for HttpHealthCheck
impl Clone for HttpHealthCheck
Source§fn clone(&self) -> HttpHealthCheck
fn clone(&self) -> HttpHealthCheck
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more