DigitalOcean.LoadBalancer.create

You're seeing just the function create, go back to DigitalOcean.LoadBalancer module for more information.

Specs

Create a load balancer.

Examples

iex> DigitalOcean.LoadBalancer.create(
...>   name: "example-lb-01",
...>   region: "nyc3",
...>   forwarding_rules: [
...>     %{
...>       entry_protocol: "http",
...>       entry_port: 80,
...>       target_port: 80,
...>       certificate_id: "",
...>       tls_passthrough: false
...>     }
...>   ],
...>   health_check: %{
...>     protocol: "http",
...>     port: 80,
...>     path: "/",
...>     check_interval_seconds: 10,
...>     response_timeout_seconds: 5,
...>     healthy_threshold: 5,
...>     unhealthy_threshold: 3
...>   },
...>   sticky_sessions: %{
...>     type: "none"
...>   },
...>   droplet_ids: [
...>     3164444,
...>     3164445
...>   ]
...> ) |> DigitalOcean.request()
{ :ok, %DigitalOcean.Response{} }