Type Definition digitalocean::request::LoadBalancerRequest
[−]
type LoadBalancerRequest<M, V> = Request<M, V>;
A type alias with Request<_, LoadBalancer>
specific functions.
Methods
impl LoadBalancerRequest<Create, LoadBalancer>
[src]
fn algorithm<S>(self, val: S) -> LoadBalancerRequest<Create, LoadBalancer> where
S: Display + Serialize,
S: Display + Serialize,
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".
fn forwarding_rule<T>(self, val: T) -> LoadBalancerRequest<Create, LoadBalancer> where
T: Into<ForwardingRule>,
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.
fn health_check<S>(
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> where
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> where
S: AsRef<str> + Display + Serialize,
The (optional) health check settings.
fn sticky_sessions<S>(
self,
kind: S,
cookie_name: Option<S>,
cookie_ttl_seconds: Option<usize>
) -> LoadBalancerRequest<Create, LoadBalancer> where
S: AsRef<str> + Display + Serialize,
self,
kind: S,
cookie_name: Option<S>,
cookie_ttl_seconds: Option<usize>
) -> LoadBalancerRequest<Create, LoadBalancer> where
S: AsRef<str> + Display + Serialize,
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.
fn redirect_http_to_https(
self,
setting: bool
) -> LoadBalancerRequest<Create, LoadBalancer>
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.
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.
fn tag<S>(self, tag: S) -> LoadBalancerRequest<Create, LoadBalancer> where
S: AsRef<str> + Display + Serialize,
S: AsRef<str> + Display + Serialize,
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.
impl LoadBalancerRequest<Update, LoadBalancer>
[src]
fn name<S>(self, val: S) -> LoadBalancerRequest<Update, LoadBalancer> where
S: Display + Serialize,
S: Display + Serialize,
A human-readable name for a Load Balancer instance.
fn region<S>(self, val: S) -> LoadBalancerRequest<Update, LoadBalancer> where
S: Display + Serialize,
S: Display + Serialize,
The region where the Load Balancer instance will be located.
fn algorithm<S>(self, val: S) -> LoadBalancerRequest<Update, LoadBalancer> where
S: Display + Serialize,
S: Display + Serialize,
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".
fn forwarding_rule<T>(self, val: T) -> LoadBalancerRequest<Update, LoadBalancer> where
T: Into<ForwardingRule>,
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.
fn health_check<S>(
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> where
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> where
S: AsRef<str> + Display + Serialize,
The (optional) health check settings.
fn sticky_sessions<S>(
self,
kind: S,
cookie_name: Option<S>,
cookie_ttl_seconds: Option<usize>
) -> LoadBalancerRequest<Update, LoadBalancer> where
S: AsRef<str> + Display + Serialize,
self,
kind: S,
cookie_name: Option<S>,
cookie_ttl_seconds: Option<usize>
) -> LoadBalancerRequest<Update, LoadBalancer> where
S: AsRef<str> + Display + Serialize,
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.
fn redirect_http_to_https(
self,
setting: bool
) -> LoadBalancerRequest<Update, LoadBalancer>
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.
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.
fn tag<S>(self, tag: S) -> LoadBalancerRequest<Update, LoadBalancer> where
S: AsRef<str> + Display + Serialize,
S: AsRef<str> + Display + Serialize,
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.
impl LoadBalancerRequest<Get, LoadBalancer>
[src]
fn add_droplets(self, ids: Vec<usize>) -> LoadBalancerRequest<Create, ()>
Add droplets (by id) to the load balancer.
fn remove_droplets(self, ids: Vec<usize>) -> LoadBalancerRequest<Delete, ()>
Remove droplets (by id) from the load balancer.
fn add_forwarding_rules<T>(
self,
items: Vec<T>
) -> LoadBalancerRequest<Create, ()> where
T: Into<ForwardingRule>,
self,
items: Vec<T>
) -> LoadBalancerRequest<Create, ()> where
T: Into<ForwardingRule>,
Add a forwarding rule to the Load Balancer.
fn remove_forwarding_rules<T>(
self,
items: Vec<T>
) -> LoadBalancerRequest<Delete, ()> where
T: Into<ForwardingRule>,
self,
items: Vec<T>
) -> LoadBalancerRequest<Delete, ()> where
T: Into<ForwardingRule>,
Remove a forwarding rule to the Load Balancer.