pub type LoadBalancerRequest<M, V> = Request<M, V>;Expand description
A type alias with Request<_, LoadBalancer> specific functions.
Aliased Type§
pub struct LoadBalancerRequest<M, V> { /* private fields */ }Implementations§
Source§impl LoadBalancerRequest<Create, LoadBalancer>
impl LoadBalancerRequest<Create, LoadBalancer>
Sourcepub fn algorithm<S>(self, val: S) -> LoadBalancerRequest<Create, LoadBalancer>
pub fn algorithm<S>(self, val: S) -> LoadBalancerRequest<Create, LoadBalancer>
The load balancing algorithm used to determine which backend Droplet will be selected by a client. It must be either “round_robin” or “least_connections”. The default value is “round_robin”.
Sourcepub fn forwarding_rule<T>(
self,
val: T,
) -> LoadBalancerRequest<Create, LoadBalancer>where
T: Into<ForwardingRule>,
pub fn forwarding_rule<T>(
self,
val: T,
) -> LoadBalancerRequest<Create, LoadBalancer>where
T: Into<ForwardingRule>,
An array of objects specifying the forwarding rules for a Load Balancer. At least one forwarding rule is required when creating a new Load Balancer instance.
Sourcepub fn health_check<S: AsRef<str> + Display + Serialize>(
self,
protocol: S,
port: usize,
path: Option<S>,
check_interval_seconds: Option<usize>,
response_timeout_seconds: Option<usize>,
unhealthy_threshold: Option<usize>,
healthy_threshold: Option<usize>,
) -> LoadBalancerRequest<Create, LoadBalancer>
pub fn health_check<S: AsRef<str> + Display + Serialize>( self, protocol: S, port: usize, path: Option<S>, check_interval_seconds: Option<usize>, response_timeout_seconds: Option<usize>, unhealthy_threshold: Option<usize>, healthy_threshold: Option<usize>, ) -> LoadBalancerRequest<Create, LoadBalancer>
The (optional) health check settings.
Sourcepub fn sticky_sessions<S: AsRef<str> + Display + Serialize>(
self,
kind: S,
cookie_name: Option<S>,
cookie_ttl_seconds: Option<usize>,
) -> LoadBalancerRequest<Create, LoadBalancer>
pub fn sticky_sessions<S: AsRef<str> + Display + Serialize>( self, kind: S, cookie_name: Option<S>, cookie_ttl_seconds: Option<usize>, ) -> LoadBalancerRequest<Create, LoadBalancer>
The (optional) sticky sessions settings. kind must be cookies or
none. If kind is cookies then cookie_name and
cookie_ttl_seconds should be set as well.
Sourcepub fn redirect_http_to_https(
self,
setting: bool,
) -> LoadBalancerRequest<Create, LoadBalancer>
pub fn redirect_http_to_https( self, setting: bool, ) -> LoadBalancerRequest<Create, LoadBalancer>
A boolean value indicating whether HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443. Default value is false.
Sourcepub fn droplets(
self,
ids: Vec<usize>,
) -> LoadBalancerRequest<Create, LoadBalancer>
pub fn droplets( self, ids: Vec<usize>, ) -> LoadBalancerRequest<Create, LoadBalancer>
The IDs of the Droplets to be assigned to the Load Balancer.
Note: Not intended to be used alongside the tag function.
Sourcepub fn tag<S>(self, tag: S) -> LoadBalancerRequest<Create, LoadBalancer>
pub fn tag<S>(self, tag: S) -> LoadBalancerRequest<Create, LoadBalancer>
The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.
Note: Not intended to be used alongside the droplets function.
Source§impl LoadBalancerRequest<Update, LoadBalancer>
impl LoadBalancerRequest<Update, LoadBalancer>
Sourcepub fn name<S>(self, val: S) -> LoadBalancerRequest<Update, LoadBalancer>
pub fn name<S>(self, val: S) -> LoadBalancerRequest<Update, LoadBalancer>
A human-readable name for a Load Balancer instance.
Sourcepub fn region<S>(self, val: S) -> LoadBalancerRequest<Update, LoadBalancer>
pub fn region<S>(self, val: S) -> LoadBalancerRequest<Update, LoadBalancer>
The region where the Load Balancer instance will be located.
Sourcepub fn algorithm<S>(self, val: S) -> LoadBalancerRequest<Update, LoadBalancer>
pub fn algorithm<S>(self, val: S) -> LoadBalancerRequest<Update, LoadBalancer>
The load balancing algorithm used to determine which backend Droplet will be selected by a client. It must be either “round_robin” or “least_connections”. The default value is “round_robin”.
Sourcepub fn forwarding_rule<T>(
self,
val: T,
) -> LoadBalancerRequest<Update, LoadBalancer>where
T: Into<ForwardingRule>,
pub fn forwarding_rule<T>(
self,
val: T,
) -> LoadBalancerRequest<Update, LoadBalancer>where
T: Into<ForwardingRule>,
An array of objects specifying the forwarding rules for a Load Balancer. At least one forwarding rule is required when creating a new Load Balancer instance.
Sourcepub fn health_check<S: AsRef<str> + Display + Serialize>(
self,
protocol: S,
port: usize,
path: Option<S>,
check_interval_seconds: Option<usize>,
response_timeout_seconds: Option<usize>,
unhealthy_threshold: Option<usize>,
healthy_threshold: Option<usize>,
) -> LoadBalancerRequest<Update, LoadBalancer>
pub fn health_check<S: AsRef<str> + Display + Serialize>( self, protocol: S, port: usize, path: Option<S>, check_interval_seconds: Option<usize>, response_timeout_seconds: Option<usize>, unhealthy_threshold: Option<usize>, healthy_threshold: Option<usize>, ) -> LoadBalancerRequest<Update, LoadBalancer>
The (optional) health check settings.
Sourcepub fn sticky_sessions<S: AsRef<str> + Display + Serialize>(
self,
kind: S,
cookie_name: Option<S>,
cookie_ttl_seconds: Option<usize>,
) -> LoadBalancerRequest<Update, LoadBalancer>
pub fn sticky_sessions<S: AsRef<str> + Display + Serialize>( self, kind: S, cookie_name: Option<S>, cookie_ttl_seconds: Option<usize>, ) -> LoadBalancerRequest<Update, LoadBalancer>
The (optional) sticky sessions settings. kind must be cookies or
none. If kind is cookies then cookie_name and
cookie_ttl_seconds should be set as well.
Sourcepub fn redirect_http_to_https(
self,
setting: bool,
) -> LoadBalancerRequest<Update, LoadBalancer>
pub fn redirect_http_to_https( self, setting: bool, ) -> LoadBalancerRequest<Update, LoadBalancer>
A boolean value indicating whether HTTP requests to the Load Balancer on port 80 will be redirected to HTTPS on port 443. Default value is false.
Sourcepub fn droplets(
self,
ids: Vec<usize>,
) -> LoadBalancerRequest<Update, LoadBalancer>
pub fn droplets( self, ids: Vec<usize>, ) -> LoadBalancerRequest<Update, LoadBalancer>
The IDs of the Droplets to be assigned to the Load Balancer.
Note: Not intended to be used alongside the tag function.
Sourcepub fn tag<S>(self, tag: S) -> LoadBalancerRequest<Update, LoadBalancer>
pub fn tag<S>(self, tag: S) -> LoadBalancerRequest<Update, LoadBalancer>
The name of a Droplet tag corresponding to Droplets to be assigned to the Load Balancer.
Note: Not intended to be used alongside the droplets function.
Source§impl LoadBalancerRequest<Get, LoadBalancer>
impl LoadBalancerRequest<Get, LoadBalancer>
Sourcepub fn add_droplets(self, ids: Vec<usize>) -> LoadBalancerRequest<Create, ()>
pub fn add_droplets(self, ids: Vec<usize>) -> LoadBalancerRequest<Create, ()>
Add droplets (by id) to the load balancer.
Sourcepub fn remove_droplets(self, ids: Vec<usize>) -> LoadBalancerRequest<Delete, ()>
pub fn remove_droplets(self, ids: Vec<usize>) -> LoadBalancerRequest<Delete, ()>
Remove droplets (by id) from the load balancer.
Sourcepub fn add_forwarding_rules<T>(
self,
items: Vec<T>,
) -> LoadBalancerRequest<Create, ()>where
T: Into<ForwardingRule>,
pub fn add_forwarding_rules<T>(
self,
items: Vec<T>,
) -> LoadBalancerRequest<Create, ()>where
T: Into<ForwardingRule>,
Add a forwarding rule to the Load Balancer.
Sourcepub fn remove_forwarding_rules<T>(
self,
items: Vec<T>,
) -> LoadBalancerRequest<Delete, ()>where
T: Into<ForwardingRule>,
pub fn remove_forwarding_rules<T>(
self,
items: Vec<T>,
) -> LoadBalancerRequest<Delete, ()>where
T: Into<ForwardingRule>,
Remove a forwarding rule to the Load Balancer.