Docs API başvurusu Yük dengeleyiciler Yük dengeleyiciler Yük dengeleyiciler Bulut sunucularınız için yönetilen L4/L7 yük dengeleyici: servisler, sağlık kontrolü, hedefler, ücretsiz Let's Encrypt sertifikası, ölçümler. AB bölgeleri.
# GET /cloud/load-balancer-types Yük dengeleyici boyutları ve fiyatları Kapsam: cloud_read listLoadBalancerTypes Bu işlemin OpenAPI parçası
Sipariş edilebilir boyutlar, sınırlar, bölgeler ve dönem başına EUR fiyatlar (KDV hariç); list_amount üstü çizili liste fiyatıdır.
Yanıtlar 200 Sizes — data: array<object> 401 Missing, invalid or revoked key
Örnekler curl CLI Python JavaScript
Kopyala curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancer-types' \
-H "Authorization: Bearer $GYRO_TOKEN"Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/load-balancer-types", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancer-types", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# GET /cloud/load-balancers Yük dengeleyicileri listele Kapsam: cloud_read listLoadBalancers Bu işlemin OpenAPI parçası
Parametreler Alan in Tür Açıklama pagequery integer limitquery integer statusquery string
Yanıtlar 200 Load balancers — data: array<LoadBalancer> 401 Missing, invalid or revoked key
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers' \
-H "Authorization: Bearer $GYRO_TOKEN"Kopyala # kaynak gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# POST /cloud/load-balancers Yük dengeleyici sipariş et Kapsam: cloud_order createLoadBalancer Bu işlemin OpenAPI parçası
Bakiyeden sipariş + ödeme (sunucularla aynı para kuralları): "confirm": true, Idempotency-Key başlığı, teklif için dry_run. Yaklaşık bir dakikada hazır; sonra servis ve hedef ekleyin.
Parametreler Alan in Tür Açıklama Idempotency-Keyheader string
İstek gövdesi Alan Tür Açıklama sizestring (small, medium, large) product_idinteger regionstring (eu-de-1, eu-de-2, eu-fi-1) cyclestring end_customer_idinteger dry_runboolean confirmboolean project_idinteger Optional project for the new service(s) (0 = default project). Checked before the order: unknown id = 404 project_not_found (GyroAPI order endpoints) or 422 checkout_blocked with [project_not_found] (POST /orders).
Yanıtlar 201 Ordered — data: object 200 Quote (dry_run) — data: object 400 Malformed request (e.g. missing Idempotency-Key) 401 Missing, invalid or revoked key 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"size": "small", "product_id": 1, "region": "eu-de-1", "cycle": "string", "end_customer_id": 1, "dry_run": true, "confirm": true, "project_id": 1}'Kopyala gyro lb create --help # tüm seçeneklerKopyala # kaynak gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
h["Idempotency-Key"] = str(uuid.uuid4())
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers", headers=h, json={"size": "small", "product_id": 1, "region": "eu-de-1", "cycle": "string", "end_customer_id": 1, "dry_run": True, "confirm": True, "project_id": 1}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({"size": "small", "product_id": 1, "region": "eu-de-1", "cycle": "string", "end_customer_id": 1, "dry_run": true, "confirm": true, "project_id": 1}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# GET /cloud/load-balancers/{id} Yük dengeleyiciyi getir Kapsam: cloud_read getLoadBalancer Bu işlemin OpenAPI parçası
Parametreler Alan in Tür Açıklama id zorunlu path integer
Yanıtlar 200 Load balancer — data: LoadBalancer 401 Missing, invalid or revoked key 404 Not found — also returned for objects owned by someone else
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345' \
-H "Authorization: Bearer $GYRO_TOKEN"Kopyala # kaynak gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# DELETE /cloud/load-balancers/{id} Yük dengeleyiciyi sil (iptal) Kapsam: cloud_delete deleteLoadBalancer Bu işlemin OpenAPI parçası
confirm=true gerekir. immediate=true hemen iptal eder: trafik ve faturalama durur, yük dengeleyici ve sertifikaları hemen kalıcı olarak silinir. immediate yoksa iptal talebi açılır.
Parametreler Alan in Tür Açıklama id zorunlu path integer confirmquery boolean immediatequery boolean
Yanıtlar 202 Cancelling — data: object 401 Missing, invalid or revoked key 404 Not found — also returned for objects owned by someone else 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345' \
-H "Authorization: Bearer $GYRO_TOKEN"Kopyala gyro lb delete 12345Kopyala # kaynak gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345", {
method: "DELETE",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# GET /cloud/load-balancers/{id}/services Yük dengeleyicinin servislerini (portlarını) listele Kapsam: services_read typed_get_load_balancers__id__services Bu işlemin OpenAPI parçası
Servisler, sağlık kontrolü ve HTTP seçenekleriyle; ayrıca sertifikalar ve sınırlar.
Parametreler Alan in Tür Açıklama id zorunlu path integer Service id
Yanıtlar 200 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services' \
-H "Authorization: Bearer $GYRO_TOKEN"Kopyala gyro lb service list 12345Kopyala # kaynak gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# POST /cloud/load-balancers/{id}/services Servis ekle Kapsam: services_write typed_post_load_balancers__id__services Bu işlemin OpenAPI parçası
Dinleyici ekler. HTTPS en az bir sertifika ister; TLS yük dengeleyicide sonlanır, hedeflere HTTP gider. Şifreli geçiş için TCP 443.
Parametreler Alan in Tür Açıklama id zorunlu path integer Service id
İstek gövdesi Alan Tür Açıklama protocol zorunlu string (tcp, http, https) listen_port zorunlu integer Port the load balancer listens on destination_port zorunlu integer Port on the targets proxyprotocolboolean Send PROXY protocol header to targets hc_protocolstring (tcp, http) Health check type hc_portinteger hc_intervalinteger 3-60 s hc_timeoutinteger 1-30 s, below interval hc_retriesinteger 0-5 hc_pathstring HTTP check path (starts with /) hc_domainstring HTTP check Host header hc_status_codesstring Comma separated, e.g. 2??,3?? hc_tlsboolean HTTP check over TLS stickyboolean Sticky sessions (cookie) cookie_namestring cookie_lifetimeinteger idle_timeoutinteger Idle timeout (s) certificatesstring HTTPS: comma separated certificate ids of this load balancer redirect_httpboolean HTTPS: redirect port 80 to HTTPS (port 80 must be free) confirmboolean
Yanıtlar 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"protocol": "tcp", "listen_port": 1, "destination_port": 1, "proxyprotocol": true, "hc_protocol": "tcp", "hc_port": 1, "hc_interval": 1, "hc_timeout": 1, "hc_retries": 1, "hc_path": "string", "hc_domain": "string", "hc_status_codes": "string", "hc_tls": true, "sticky": true, "cookie_name": "string", "cookie_lifetime": 1, "idle_timeout": 1, "certificates": "string", "redirect_http": true, "confirm": true}'Kopyala gyro lb service add 12345 --help # tüm seçeneklerKopyala # kaynak gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services", headers=h, json={"protocol": "tcp", "listen_port": 1, "destination_port": 1, "proxyprotocol": True, "hc_protocol": "tcp", "hc_port": 1, "hc_interval": 1, "hc_timeout": 1, "hc_retries": 1, "hc_path": "string", "hc_domain": "string", "hc_status_codes": "string", "hc_tls": True, "sticky": True, "cookie_name": "string", "cookie_lifetime": 1, "idle_timeout": 1, "certificates": "string", "redirect_http": True, "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"protocol": "tcp", "listen_port": 1, "destination_port": 1, "proxyprotocol": true, "hc_protocol": "tcp", "hc_port": 1, "hc_interval": 1, "hc_timeout": 1, "hc_retries": 1, "hc_path": "string", "hc_domain": "string", "hc_status_codes": "string", "hc_tls": true, "sticky": true, "cookie_name": "string", "cookie_lifetime": 1, "idle_timeout": 1, "certificates": "string", "redirect_http": true, "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# PATCH /cloud/load-balancers/{id}/services/{port} Servisi güncelle Kapsam: services_write typed_patch_load_balancers__id__services__port Bu işlemin OpenAPI parçası
{port} servisinin seçeneklerini değiştirir. Protokol değişmez (silip ekleyin).
Parametreler Alan in Tür Açıklama id zorunlu path integer Service id port zorunlu path string Listen port
İstek gövdesi Alan Tür Açıklama destination_portinteger Port on the targets proxyprotocolboolean Send PROXY protocol header to targets hc_protocolstring (tcp, http) Health check type hc_portinteger hc_intervalinteger 3-60 s hc_timeoutinteger 1-30 s, below interval hc_retriesinteger 0-5 hc_pathstring HTTP check path (starts with /) hc_domainstring HTTP check Host header hc_status_codesstring Comma separated, e.g. 2??,3?? hc_tlsboolean HTTP check over TLS stickyboolean Sticky sessions (cookie) cookie_namestring cookie_lifetimeinteger idle_timeoutinteger Idle timeout (s) certificatesstring HTTPS: comma separated certificate ids of this load balancer redirect_httpboolean HTTPS: redirect port 80 to HTTPS (port 80 must be free) confirmboolean
Yanıtlar 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s -X PATCH 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services/1' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"destination_port": 1, "proxyprotocol": true, "hc_protocol": "tcp", "hc_port": 1, "hc_interval": 1, "hc_timeout": 1, "hc_retries": 1, "hc_path": "string", "hc_domain": "string", "hc_status_codes": "string", "hc_tls": true, "sticky": true, "cookie_name": "string", "cookie_lifetime": 1, "idle_timeout": 1, "certificates": "string", "redirect_http": true, "confirm": true}'Kopyala gyro lb service update 12345 --help # tüm seçeneklerKopyala # kaynak gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.patch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services/1", headers=h, json={"destination_port": 1, "proxyprotocol": True, "hc_protocol": "tcp", "hc_port": 1, "hc_interval": 1, "hc_timeout": 1, "hc_retries": 1, "hc_path": "string", "hc_domain": "string", "hc_status_codes": "string", "hc_tls": True, "sticky": True, "cookie_name": "string", "cookie_lifetime": 1, "idle_timeout": 1, "certificates": "string", "redirect_http": True, "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services/1", {
method: "PATCH",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"destination_port": 1, "proxyprotocol": true, "hc_protocol": "tcp", "hc_port": 1, "hc_interval": 1, "hc_timeout": 1, "hc_retries": 1, "hc_path": "string", "hc_domain": "string", "hc_status_codes": "string", "hc_tls": true, "sticky": true, "cookie_name": "string", "cookie_lifetime": 1, "idle_timeout": 1, "certificates": "string", "redirect_http": true, "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# DELETE /cloud/load-balancers/{id}/services/{port} Servisi sil Kapsam: services_write typed_delete_load_balancers__id__services__port Bu işlemin OpenAPI parçası
{port} portundaki dinlemeyi durdurur. "confirm": true gerekir.
Parametreler Alan in Tür Açıklama id zorunlu path integer Service id port zorunlu path string Listen port
İstek gövdesi Alan Tür Açıklama confirmboolean
Yanıtlar 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services/1' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"confirm": true}'Kopyala gyro lb service delete 12345 --help # tüm seçeneklerKopyala # kaynak gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services/1", headers=h, json={"confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services/1", {
method: "DELETE",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# GET /cloud/load-balancers/{id}/targets Hedefleri sağlık durumuyla listele Kapsam: services_read typed_get_load_balancers__id__targets Bu işlemin OpenAPI parçası
Hedefler, servis başına sağlık durumu ve eklenebilecek bulut sunucular / fiziksel sunucu IP'leri.
Parametreler Alan in Tür Açıklama id zorunlu path integer Service id
Yanıtlar 200 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/targets' \
-H "Authorization: Bearer $GYRO_TOKEN"Kopyala gyro lb target list 12345Kopyala # kaynak gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/targets", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/targets", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# POST /cloud/load-balancers/{id}/targets Hedef ekle Kapsam: services_write typed_post_load_balancers__id__targets Bu işlemin OpenAPI parçası
type=server (server = bulut sunucu hizmet no, aynı bölge), type=all (tüm bulut sunucularınız, yeniler otomatik) ya da type=ip (fiziksel sunucu IP'niz). use_private_ip için özel ağ bağlı olmalı.
Parametreler Alan in Tür Açıklama id zorunlu path integer Service id
İstek gövdesi Alan Tür Açıklama type zorunlu string (server, all, ip) serverinteger Cloud server id (type=server) ipstring Dedicated server IP (type=ip) use_private_ipboolean confirmboolean
Yanıtlar 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/targets' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"type": "server", "server": 1, "ip": "string", "use_private_ip": true, "confirm": true}'Kopyala gyro lb target add 12345 --help # tüm seçeneklerKopyala # kaynak gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/targets", headers=h, json={"type": "server", "server": 1, "ip": "string", "use_private_ip": True, "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/targets", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"type": "server", "server": 1, "ip": "string", "use_private_ip": true, "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# DELETE /cloud/load-balancers/{id}/targets Hedefi çıkar Kapsam: services_write typed_delete_load_balancers__id__targets Bu işlemin OpenAPI parçası
Eklemedeki alanlar; sorguda (?type=server&server=123&confirm=true) ya da JSON gövdede. "confirm": true gerekir.
Parametreler Alan in Tür Açıklama id zorunlu path integer Service id typequery string server | all | ip serverquery string Cloud server id ipquery string Dedicated server IP
İstek gövdesi Alan Tür Açıklama typestring serverinteger ipstring confirmboolean
Yanıtlar 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/targets' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"type": "string", "server": 1, "ip": "string", "confirm": true}'Kopyala gyro lb target remove 12345 --help # tüm seçeneklerKopyala # kaynak gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/targets", headers=h, json={"type": "string", "server": 1, "ip": "string", "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/targets", {
method: "DELETE",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"type": "string", "server": 1, "ip": "string", "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# GET /cloud/load-balancers/{id}/certificates Sertifikaları listele Kapsam: services_read typed_get_load_balancers__id__certificates Bu işlemin OpenAPI parçası
Yüklenen ve Let's Encrypt sertifikaları (Let's Encrypt kendiliğinden yenilenir), bekleyen istek ve doğrulama yönlendirme adresi.
Parametreler Alan in Tür Açıklama id zorunlu path integer Service id
Yanıtlar 200 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates' \
-H "Authorization: Bearer $GYRO_TOKEN"Kopyala gyro lb cert list 12345Kopyala # kaynak gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# POST /cloud/load-balancers/{id}/certificates Sertifika yükle Kapsam: services_write typed_post_load_balancers__id__certificates Bu işlemin OpenAPI parçası
PEM sertifika zinciri + şifresiz özel anahtar. Anahtar yalnız yük dengeleyiciye gönderilir; panelde saklanmaz, loglanmaz.
Parametreler Alan in Tür Açıklama id zorunlu path integer Service id
İstek gövdesi Alan Tür Açıklama namestring certificate zorunlu string PEM chain private_key zorunlu string PEM key (unencrypted) confirmboolean
Yanıtlar 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "string", "certificate": "string", "private_key": "string", "confirm": true}'Kopyala gyro lb cert upload 12345 --help # tüm seçeneklerKopyala # kaynak gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates", headers=h, json={"name": "string", "certificate": "string", "private_key": "string", "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"name": "string", "certificate": "string", "private_key": "string", "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# POST /cloud/load-balancers/{id}/certificates/letsencrypt Ücretsiz Let's Encrypt sertifikası iste Kapsam: services_write typed_post_load_balancers__id__certificates_letsencrypt Bu işlemin OpenAPI parçası
A kaydı bu yük dengeleyiciye yönlenmiş en çok 10 ad. Hedefleriniz /.well-known/acme-challenge/<token> isteklerini GET certificates'taki adrese yönlendirmeli; acme=waiting yanıtı ad başına kontrolü verir, yönlendirmeyi düzeltip verify çağırın.
Parametreler Alan in Tür Açıklama id zorunlu path integer Service id
İstek gövdesi Alan Tür Açıklama domains zorunlu string Comma separated names confirmboolean
Yanıtlar 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/letsencrypt' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"domains": "string", "confirm": true}'Kopyala gyro lb cert letsencrypt 12345 --help # tüm seçeneklerKopyala # kaynak gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/letsencrypt", headers=h, json={"domains": "string", "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/letsencrypt", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"domains": "string", "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# DELETE /cloud/load-balancers/{id}/certificates/letsencrypt Bekleyen Let's Encrypt isteğini iptal et Kapsam: services_write typed_delete_load_balancers__id__certificates_letsencrypt Bu işlemin OpenAPI parçası
Bekleyen isteği bırakır. "confirm": true gerekir.
Parametreler Alan in Tür Açıklama id zorunlu path integer Service id
İstek gövdesi Alan Tür Açıklama confirmboolean
Yanıtlar 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/letsencrypt' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"confirm": true}'Kopyala gyro lb cert cancel 12345 --help # tüm seçeneklerKopyala # kaynak gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/letsencrypt", headers=h, json={"confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/letsencrypt", {
method: "DELETE",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# POST /cloud/load-balancers/{id}/certificates/letsencrypt/verify Bekleyen Let's Encrypt isteğini sürdür Kapsam: services_write typed_post_load_balancers__id__certificates_letsencrypt_verify Bu işlemin OpenAPI parçası
Yönlendirmeyi yeniden dener, doğrulatır ve sertifikayı yükler (acme=issued).
Parametreler Alan in Tür Açıklama id zorunlu path integer Service id
İstek gövdesi Alan Tür Açıklama confirmboolean
Yanıtlar 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/letsencrypt/verify' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"confirm": true}'Kopyala gyro lb cert verify 12345 --help # tüm seçeneklerKopyala # kaynak gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/letsencrypt/verify", headers=h, json={"confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/letsencrypt/verify", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# DELETE /cloud/load-balancers/{id}/certificates/{cid} Sertifikayı sil Kapsam: services_write typed_delete_load_balancers__id__certificates__cid Bu işlemin OpenAPI parçası
Yalnız bir serviste kullanılmayan sertifikalar. "confirm": true gerekir.
Parametreler Alan in Tür Açıklama id zorunlu path integer Service id cid zorunlu path string Certificate id
İstek gövdesi Alan Tür Açıklama confirmboolean
Yanıtlar 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/1' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"confirm": true}'Kopyala gyro lb cert delete 12345 --help # tüm seçeneklerKopyala # kaynak gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/1", headers=h, json={"confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/1", {
method: "DELETE",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# GET /cloud/load-balancers/{id}/settings Algoritma, ters DNS, özel ağ Kapsam: services_read typed_get_load_balancers__id__settings Bu işlemin OpenAPI parçası
Algoritma, PTR kayıtları, aynı bölgedeki özel ağlarınız ve sınırlar.
Parametreler Alan in Tür Açıklama id zorunlu path integer Service id
Yanıtlar 200 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/settings' \
-H "Authorization: Bearer $GYRO_TOKEN"Kopyala gyro lb settings 12345Kopyala # kaynak gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/settings", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/settings", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# PUT /cloud/load-balancers/{id}/algorithm Dağıtım algoritmasını değiştir Kapsam: services_write typed_put_load_balancers__id__algorithm Bu işlemin OpenAPI parçası
round_robin ya da least_connections.
Parametreler Alan in Tür Açıklama id zorunlu path integer Service id
İstek gövdesi Alan Tür Açıklama algorithm zorunlu string (round_robin, least_connections) confirmboolean
Yanıtlar 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s -X PUT 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/algorithm' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"algorithm": "round_robin", "confirm": true}'Kopyala gyro lb algorithm set 12345 --help # tüm seçeneklerKopyala # kaynak gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.put("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/algorithm", headers=h, json={"algorithm": "round_robin", "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/algorithm", {
method: "PUT",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"algorithm": "round_robin", "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# PUT /cloud/load-balancers/{id}/rdns Ters DNS ayarla Kapsam: services_write typed_put_load_balancers__id__rdns Bu işlemin OpenAPI parçası
Yük dengeleyici IP'lerinden biri için PTR; boş değer varsayılana döndürür.
Parametreler Alan in Tür Açıklama id zorunlu path integer Service id
İstek gövdesi Alan Tür Açıklama ip zorunlu string ptrstring confirmboolean
Yanıtlar 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s -X PUT 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/rdns' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"ip": "string", "ptr": "string", "confirm": true}'Kopyala gyro lb rdns set 12345 --help # tüm seçeneklerKopyala # kaynak gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.put("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/rdns", headers=h, json={"ip": "string", "ptr": "string", "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/rdns", {
method: "PUT",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"ip": "string", "ptr": "string", "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# POST /cloud/load-balancers/{id}/network Özel ağa bağla Kapsam: services_write typed_post_load_balancers__id__network Bu işlemin OpenAPI parçası
Aynı bölgedeki özel ağlarınızdan biri (GET settings).
Parametreler Alan in Tür Açıklama id zorunlu path integer Service id
İstek gövdesi Alan Tür Açıklama network zorunlu integer confirmboolean
Yanıtlar 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/network' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"network": 1, "confirm": true}'Kopyala gyro lb network attach 12345 --help # tüm seçeneklerKopyala # kaynak gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/network", headers=h, json={"network": 1, "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/network", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"network": 1, "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# DELETE /cloud/load-balancers/{id}/network/{nid} Özel ağdan ayır Kapsam: services_write typed_delete_load_balancers__id__network__nid Bu işlemin OpenAPI parçası
Özel IP kullanan hedefler önce çıkarılmalı. "confirm": true gerekir.
Parametreler Alan in Tür Açıklama id zorunlu path integer Service id nid zorunlu path string Private network id
İstek gövdesi Alan Tür Açıklama confirmboolean
Yanıtlar 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/network/1' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"confirm": true}'Kopyala gyro lb network detach 12345 --help # tüm seçeneklerKopyala # kaynak gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/network/1", headers=h, json={"confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/network/1", {
method: "DELETE",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# GET /cloud/load-balancers/{id}/metrics Yük dengeleyici ölçümleri Kapsam: services_read typed_get_load_balancers__id__metrics Bu işlemin OpenAPI parçası
Açık bağlantı, yeni bağlantı/sn, istek/sn, bant genişliği (Mbit/s).
Parametreler Alan in Tür Açıklama id zorunlu path integer Service id periodquery string 24h | 7d | 30d
Yanıtlar 200 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/metrics' \
-H "Authorization: Bearer $GYRO_TOKEN"Kopyala gyro lb metrics 12345Kopyala # kaynak gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Kopyala import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/metrics", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])Kopyala const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/metrics", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);