OpenAPI English gyrohosting.com ↗
Markdown olarak görClaude'da aç ↗

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_readlistLoadBalancerTypesBu 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

200Sizes — data: array<object>
401Missing, invalid or revoked key

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancer-types' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro lb types
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"])
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 listeleKapsam: cloud_readlistLoadBalancersBu işlemin OpenAPI parçası

Parametreler

AlaninTürAçıklama
pagequeryinteger
limitqueryinteger
statusquerystring

Yanıtlar

200Load balancers — data: array<LoadBalancer>
401Missing, invalid or revoked key

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro lb list
# 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
}
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"])
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ş etKapsam: cloud_ordercreateLoadBalancerBu 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

AlaninTürAçıklama
Idempotency-Keyheaderstring

İstek gövdesi

AlanTürAçı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_idintegerOptional 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

201Ordered — data: object
200Quote (dry_run) — data: object
400Malformed request (e.g. missing Idempotency-Key)
401Missing, invalid or revoked key
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

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}'
gyro lb create --help    # tüm seçenekler
# 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
}
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"])
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 getirKapsam: cloud_readgetLoadBalancerBu işlemin OpenAPI parçası

Parametreler

AlaninTürAçıklama
id zorunlupathinteger

Yanıtlar

200Load balancer — data: LoadBalancer
401Missing, invalid or revoked key
404Not found — also returned for objects owned by someone else

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro lb get 12345
# 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
}
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"])
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_deletedeleteLoadBalancerBu 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

AlaninTürAçıklama
id zorunlupathinteger
confirmqueryboolean
immediatequeryboolean

Yanıtlar

202Cancelling — data: object
401Missing, invalid or revoked key
404Not found — also returned for objects owned by someone else
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro lb delete 12345
# 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
}
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"])
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ı) listeleKapsam: services_readtyped_get_load_balancers__id__servicesBu işlemin OpenAPI parçası

Servisler, sağlık kontrolü ve HTTP seçenekleriyle; ayrıca sertifikalar ve sınırlar.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

Yanıtlar

200Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro lb service list 12345
# 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
}
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"])
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 ekleKapsam: services_writetyped_post_load_balancers__id__servicesBu 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

AlaninTürAçıklama
id zorunlupathintegerService id

İstek gövdesi

AlanTürAçıklama
protocol zorunlustring (tcp, http, https)
listen_port zorunluintegerPort the load balancer listens on
destination_port zorunluintegerPort on the targets
proxyprotocolbooleanSend PROXY protocol header to targets
hc_protocolstring (tcp, http)Health check type
hc_portinteger
hc_intervalinteger3-60 s
hc_timeoutinteger1-30 s, below interval
hc_retriesinteger0-5
hc_pathstringHTTP check path (starts with /)
hc_domainstringHTTP check Host header
hc_status_codesstringComma separated, e.g. 2??,3??
hc_tlsbooleanHTTP check over TLS
stickybooleanSticky sessions (cookie)
cookie_namestring
cookie_lifetimeinteger
idle_timeoutintegerIdle timeout (s)
certificatesstringHTTPS: comma separated certificate ids of this load balancer
redirect_httpbooleanHTTPS: redirect port 80 to HTTPS (port 80 must be free)
confirmboolean

Yanıtlar

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

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}'
gyro lb service add 12345 --help    # tüm seçenekler
# 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
}
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"])
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üncelleKapsam: services_writetyped_patch_load_balancers__id__services__portBu işlemin OpenAPI parçası

{port} servisinin seçeneklerini değiştirir. Protokol değişmez (silip ekleyin).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
port zorunlupathstringListen port

İstek gövdesi

AlanTürAçıklama
destination_portintegerPort on the targets
proxyprotocolbooleanSend PROXY protocol header to targets
hc_protocolstring (tcp, http)Health check type
hc_portinteger
hc_intervalinteger3-60 s
hc_timeoutinteger1-30 s, below interval
hc_retriesinteger0-5
hc_pathstringHTTP check path (starts with /)
hc_domainstringHTTP check Host header
hc_status_codesstringComma separated, e.g. 2??,3??
hc_tlsbooleanHTTP check over TLS
stickybooleanSticky sessions (cookie)
cookie_namestring
cookie_lifetimeinteger
idle_timeoutintegerIdle timeout (s)
certificatesstringHTTPS: comma separated certificate ids of this load balancer
redirect_httpbooleanHTTPS: redirect port 80 to HTTPS (port 80 must be free)
confirmboolean

Yanıtlar

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

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}'
gyro lb service update 12345 --help    # tüm seçenekler
# 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
}
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"])
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 silKapsam: services_writetyped_delete_load_balancers__id__services__portBu işlemin OpenAPI parçası

{port} portundaki dinlemeyi durdurur. "confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
port zorunlupathstringListen port

İstek gövdesi

AlanTürAçıklama
confirmboolean

Yanıtlar

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

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}'
gyro lb service delete 12345 --help    # tüm seçenekler
# 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
}
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"])
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 listeleKapsam: services_readtyped_get_load_balancers__id__targetsBu işlemin OpenAPI parçası

Hedefler, servis başına sağlık durumu ve eklenebilecek bulut sunucular / fiziksel sunucu IP'leri.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

Yanıtlar

200Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/targets' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro lb target list 12345
# 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
}
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"])
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 ekleKapsam: services_writetyped_post_load_balancers__id__targetsBu 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

AlaninTürAçıklama
id zorunlupathintegerService id

İstek gövdesi

AlanTürAçıklama
type zorunlustring (server, all, ip)
serverintegerCloud server id (type=server)
ipstringDedicated server IP (type=ip)
use_private_ipboolean
confirmboolean

Yanıtlar

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

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}'
gyro lb target add 12345 --help    # tüm seçenekler
# 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
}
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"])
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 çıkarKapsam: services_writetyped_delete_load_balancers__id__targetsBu işlemin OpenAPI parçası

Eklemedeki alanlar; sorguda (?type=server&server=123&confirm=true) ya da JSON gövdede. "confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
typequerystringserver | all | ip
serverquerystringCloud server id
ipquerystringDedicated server IP

İstek gövdesi

AlanTürAçıklama
typestring
serverinteger
ipstring
confirmboolean

Yanıtlar

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

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}'
gyro lb target remove 12345 --help    # tüm seçenekler
# 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
}
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"])
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ı listeleKapsam: services_readtyped_get_load_balancers__id__certificatesBu 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

AlaninTürAçıklama
id zorunlupathintegerService id

Yanıtlar

200Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro lb cert list 12345
# 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
}
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"])
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ükleKapsam: services_writetyped_post_load_balancers__id__certificatesBu işlemin OpenAPI parçası

PEM sertifika zinciri + şifresiz özel anahtar. Anahtar yalnız yük dengeleyiciye gönderilir; panelde saklanmaz, loglanmaz.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

İstek gövdesi

AlanTürAçıklama
namestring
certificate zorunlustringPEM chain
private_key zorunlustringPEM key (unencrypted)
confirmboolean

Yanıtlar

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

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}'
gyro lb cert upload 12345 --help    # tüm seçenekler
# 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
}
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"])
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ı isteKapsam: services_writetyped_post_load_balancers__id__certificates_letsencryptBu 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

AlaninTürAçıklama
id zorunlupathintegerService id

İstek gövdesi

AlanTürAçıklama
domains zorunlustringComma separated names
confirmboolean

Yanıtlar

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

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}'
gyro lb cert letsencrypt 12345 --help    # tüm seçenekler
# 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
}
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"])
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 etKapsam: services_writetyped_delete_load_balancers__id__certificates_letsencryptBu işlemin OpenAPI parçası

Bekleyen isteği bırakır. "confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

İstek gövdesi

AlanTürAçıklama
confirmboolean

Yanıtlar

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

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}'
gyro lb cert cancel 12345 --help    # tüm seçenekler
# 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
}
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"])
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ürKapsam: services_writetyped_post_load_balancers__id__certificates_letsencrypt_verifyBu işlemin OpenAPI parçası

Yönlendirmeyi yeniden dener, doğrulatır ve sertifikayı yükler (acme=issued).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

İstek gövdesi

AlanTürAçıklama
confirmboolean

Yanıtlar

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

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}'
gyro lb cert verify 12345 --help    # tüm seçenekler
# 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
}
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"])
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ı silKapsam: services_writetyped_delete_load_balancers__id__certificates__cidBu işlemin OpenAPI parçası

Yalnız bir serviste kullanılmayan sertifikalar. "confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
cid zorunlupathstringCertificate id

İstek gövdesi

AlanTürAçıklama
confirmboolean

Yanıtlar

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

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}'
gyro lb cert delete 12345 --help    # tüm seçenekler
# 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
}
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"])
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_readtyped_get_load_balancers__id__settingsBu işlemin OpenAPI parçası

Algoritma, PTR kayıtları, aynı bölgedeki özel ağlarınız ve sınırlar.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

Yanıtlar

200Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/settings' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro lb settings 12345
# 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
}
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"])
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ştirKapsam: services_writetyped_put_load_balancers__id__algorithmBu işlemin OpenAPI parçası

round_robin ya da least_connections.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

İstek gövdesi

AlanTürAçıklama
algorithm zorunlustring (round_robin, least_connections)
confirmboolean

Yanıtlar

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

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}'
gyro lb algorithm set 12345 --help    # tüm seçenekler
# 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
}
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"])
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 ayarlaKapsam: services_writetyped_put_load_balancers__id__rdnsBu işlemin OpenAPI parçası

Yük dengeleyici IP'lerinden biri için PTR; boş değer varsayılana döndürür.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

İstek gövdesi

AlanTürAçıklama
ip zorunlustring
ptrstring
confirmboolean

Yanıtlar

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

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}'
gyro lb rdns set 12345 --help    # tüm seçenekler
# 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
}
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"])
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ğlaKapsam: services_writetyped_post_load_balancers__id__networkBu işlemin OpenAPI parçası

Aynı bölgedeki özel ağlarınızdan biri (GET settings).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

İstek gövdesi

AlanTürAçıklama
network zorunluinteger
confirmboolean

Yanıtlar

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

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}'
gyro lb network attach 12345 --help    # tüm seçenekler
# 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
}
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"])
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ırKapsam: services_writetyped_delete_load_balancers__id__network__nidBu işlemin OpenAPI parçası

Özel IP kullanan hedefler önce çıkarılmalı. "confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
nid zorunlupathstringPrivate network id

İstek gövdesi

AlanTürAçıklama
confirmboolean

Yanıtlar

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

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}'
gyro lb network detach 12345 --help    # tüm seçenekler
# 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
}
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"])
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çümleriKapsam: services_readtyped_get_load_balancers__id__metricsBu işlemin OpenAPI parçası

Açık bağlantı, yeni bağlantı/sn, istek/sn, bant genişliği (Mbit/s).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
periodquerystring24h | 7d | 30d

Yanıtlar

200Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/metrics' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro lb metrics 12345
# 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
}
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"])
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}`);