List load balancers
const options = {method: 'GET'};
fetch('https://api.example.com/v1/regions/{region}/compute/loadbalancers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/regions/{region}/compute/loadbalancers"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl --request GET \
--url https://api.example.com/v1/regions/{region}/compute/loadbalancersimport requests
url = "https://api.example.com/v1/regions/{region}/compute/loadbalancers"
response = requests.get(url)
print(response.text){
"success": true,
"data": [
{
"id": "<string>",
"name": "<string>",
"type": "internal",
"status": "active",
"algorithm": "round-robin",
"vip": "<string>",
"listeners": [
{
"port": 123,
"protocol": "TCP",
"targetPort": 123
}
],
"createdAt": "2023-11-07T05:31:56Z"
}
]
}Load Balancers
List load balancers
List network load balancers
GET
/
v1
/
regions
/
{region}
/
compute
/
loadbalancers
List load balancers
const options = {method: 'GET'};
fetch('https://api.example.com/v1/regions/{region}/compute/loadbalancers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/regions/{region}/compute/loadbalancers"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl --request GET \
--url https://api.example.com/v1/regions/{region}/compute/loadbalancersimport requests
url = "https://api.example.com/v1/regions/{region}/compute/loadbalancers"
response = requests.get(url)
print(response.text){
"success": true,
"data": [
{
"id": "<string>",
"name": "<string>",
"type": "internal",
"status": "active",
"algorithm": "round-robin",
"vip": "<string>",
"listeners": [
{
"port": 123,
"protocol": "TCP",
"targetPort": 123
}
],
"createdAt": "2023-11-07T05:31:56Z"
}
]
}Was this page helpful?