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

Ağ

Sunucunun ters DNS kayıtları ve gelen trafik güvenlik duvarı.

#GET/cloud/servers/{id}/rdns

Ters DNS kayıtlarını listeleKapsam: cloud_readlistRdnsBu işlemin OpenAPI parçası

tr-ist-1 (Gyro Bulut İstanbul): her adres (birincil ve ek IPv4) için otomatik PTR <a-b-c-d>.ip.gyrohosting.com ve eşleşen A kaydı vardır. hostname ile kendi tam alan adınızı yazın (saniyeler içinde yayında); boş değer varsayılana döndürür. Gyro alan adları altı ve korunan marka adları reddedilir (HTTP 422, açıklayıcı mesaj); sunucu başına saatte en çok 30 değişiklik. E-posta teslimi için adınızın A kaydı bu adresi göstermeli (zorunlu değil). Sunucu silinince ya da ek IP bırakılınca PTR kaldırılır.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerServer id (= service id in the client area)

Yanıtlar

200PTR records of the server's addresses — data: array<RdnsEntry>
404Not found — also returned for objects owned by someone else

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/rdns' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro server rdns list 12345
# kaynak gyro_server_rdns: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_rdns
resource "gyro_server_rdns" "mail" {
  server_id = gyro_server.web.id
  ip        = gyro_server.web.ipv4
  hostname  = "mail.example.com"
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/rdns", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/rdns", {
  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/servers/{id}/rdns

Bir adresin PTR kaydını ayarla (veya sıfırla)Kapsam: cloud_writesetRdnsBu işlemin OpenAPI parçası

tr-ist-1 (Gyro Bulut İstanbul): her adres (birincil ve ek IPv4) için otomatik PTR <a-b-c-d>.ip.gyrohosting.com ve eşleşen A kaydı vardır. hostname ile kendi tam alan adınızı yazın (saniyeler içinde yayında); boş değer varsayılana döndürür. Gyro alan adları altı ve korunan marka adları reddedilir (HTTP 422, açıklayıcı mesaj); sunucu başına saatte en çok 30 değişiklik. E-posta teslimi için adınızın A kaydı bu adresi göstermeli (zorunlu değil). Sunucu silinince ya da ek IP bırakılınca PTR kaldırılır.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerServer id (= service id in the client area)

İstek gövdesi

AlanTürAçıklama
ip zorunlustringAn address of this server (IPv6 addresses inside the server's /64 are allowed)
hostnamestringFQDN; empty string resets to the default

Yanıtlar

200Updated list — data: array<RdnsEntry>
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 PUT 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/rdns' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ip": "string", "hostname": "string"}'
gyro server rdns set 12345 --help    # tüm seçenekler
# kaynak gyro_server_rdns: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_rdns
resource "gyro_server_rdns" "mail" {
  server_id = gyro_server.web.id
  ip        = gyro_server.web.ipv4
  hostname  = "mail.example.com"
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.put("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/rdns", headers=h, json={"ip": "string", "hostname": "string"}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/rdns", {
  method: "PUT",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"ip": "string", "hostname": "string"}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#GET/cloud/servers/{id}/firewall

Gelen trafik güvenlik duvarı kurallarıKapsam: cloud_readgetFirewallBu işlemin OpenAPI parçası

v1'de salt okunur. Boş liste Gyro güvenlik duvarı uygulanmadığı (tüm gelen trafiğin sunucuya ulaştığı) anlamına gelir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerServer id (= service id in the client area)

Yanıtlar

200Rules — data: array<FirewallRule>
404Not found — also returned for objects owned by someone else

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/firewall' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro server firewall list 12345
# kaynak gyro_firewall: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/firewall
# Web server: 80/443 open to everyone, SSH only from the office, everything else denied.
resource "gyro_firewall" "web" {
  server_id      = 1234
  default_action = "deny"

  rule {
    action      = "allow"
    protocol    = "tcp"
    port        = "80,443"
    description = "web"
  }
  rule {
    action   = "allow"
    protocol = "udp"
    port     = "443"
  }
  rule {
    action = "allow"
    port   = "22"
    source = "203.0.113.10"
  }
}

# Database: open, but 3306 closed to one address; outbound SMTP blocked.
resource "gyro_firewall" "db" {
  server_id      = 1235
  default_action = "allow"

  rule {
    action = "deny"
    port   = "3306"
    source = "198.51.100.7"
  }
  rule {
    direction = "out"
    action    = "deny"
    port      = "25"
  }
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/firewall", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/firewall", {
  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/servers/{id}/firewall/rules

Gelen trafik kuralı ekleKapsam: cloud_writeaddFirewallRuleBu işlemin OpenAPI parçası

Parametreler

AlaninTürAçıklama
id zorunlupathintegerServer id (= service id in the client area)

İstek gövdesi

AlanTürAçıklama
priorityintegerPosition (1 = evaluated first). Default = last. First matching rule wins.
directionstring (in, out)in = inbound to the server, out = new outbound connections (network firewall only)
actionstring (allow, deny)
protocolstring (tcp, udp, tcp_udp, icmp, all)
sourcestringany | IPv4/CIDR list (comma separated, max 10). For direction out: the remote address. Country sources (country:XX / not-country:XX) are accepted only when capabilities.country_filter is true (currently not offered).
destinationstringany (all IPs of the server) or one IP address of the server
portstringany | 22 | 80,443 | 1000-2000 (not for icmp/all)
descriptionstring
source_ipsarray<string>Legacy - CIDRs (use source)
permanentbooleanNetwork firewall - skip the 5 minute trial and make the change permanent at once
confirm_warningsbooleanApply even when the change has warnings (lock-out risk, shadowed or duplicate rules, private sources)

Yanıtlar

201All rules after the change — data: array<FirewallRule>
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 POST 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/firewall/rules' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"protocol": "tcp", "port": "22", "source_ips": ["203.0.113.0/24"]}'
gyro server firewall rule add 12345 --help    # tüm seçenekler
# kaynak gyro_firewall: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/firewall
# Web server: 80/443 open to everyone, SSH only from the office, everything else denied.
resource "gyro_firewall" "web" {
  server_id      = 1234
  default_action = "deny"

  rule {
    action      = "allow"
    protocol    = "tcp"
    port        = "80,443"
    description = "web"
  }
  rule {
    action   = "allow"
    protocol = "udp"
    port     = "443"
  }
  rule {
    action = "allow"
    port   = "22"
    source = "203.0.113.10"
  }
}

# Database: open, but 3306 closed to one address; outbound SMTP blocked.
resource "gyro_firewall" "db" {
  server_id      = 1235
  default_action = "allow"

  rule {
    action = "deny"
    port   = "3306"
    source = "198.51.100.7"
  }
  rule {
    direction = "out"
    action    = "deny"
    port      = "25"
  }
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/firewall/rules", headers=h, json={"protocol": "tcp", "port": "22", "source_ips": ["203.0.113.0/24"]}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/firewall/rules", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"protocol": "tcp", "port": "22", "source_ips": ["203.0.113.0/24"]}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#DELETE/cloud/servers/{id}/firewall/rules/{n}

Güvenlik duvarı kuralı sil (son kural confirm ister)Kapsam: cloud_writedeleteFirewallRuleBu işlemin OpenAPI parçası

Parametreler

AlaninTürAçıklama
id zorunlupathintegerServer id (= service id in the client area)
n zorunlupathinteger1-based position from GET /firewall
confirmqueryboolean

Yanıtlar

200Remaining rules — data: array<FirewallRule>
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/servers/12345/firewall/rules/1' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro server firewall rule delete 12345
# kaynak gyro_firewall: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/firewall
# Web server: 80/443 open to everyone, SSH only from the office, everything else denied.
resource "gyro_firewall" "web" {
  server_id      = 1234
  default_action = "deny"

  rule {
    action      = "allow"
    protocol    = "tcp"
    port        = "80,443"
    description = "web"
  }
  rule {
    action   = "allow"
    protocol = "udp"
    port     = "443"
  }
  rule {
    action = "allow"
    port   = "22"
    source = "203.0.113.10"
  }
}

# Database: open, but 3306 closed to one address; outbound SMTP blocked.
resource "gyro_firewall" "db" {
  server_id      = 1235
  default_action = "allow"

  rule {
    action = "deny"
    port   = "3306"
    source = "198.51.100.7"
  }
  rule {
    direction = "out"
    action    = "deny"
    port      = "25"
  }
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/firewall/rules/1", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/firewall/rules/1", {
  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/servers/{id}/firewall/policy

Ağ güvenlik duvarı politikası (kurallar, varsayılan kural, durum)Kapsam: cloud_readgetFirewallPolicyBu işlemin OpenAPI parçası

Parametreler

AlaninTürAçıklama
id zorunlupathintegerServer id (= service id in the client area)

Yanıtlar

200Policy — data: FirewallPolicy
404Not found — also returned for objects owned by someone else
409The network firewall add-on is not active on this server (firewall_not_enabled)

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/firewall/policy' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro firewall get 12345
# kaynak gyro_firewall: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/firewall
# Web server: 80/443 open to everyone, SSH only from the office, everything else denied.
resource "gyro_firewall" "web" {
  server_id      = 1234
  default_action = "deny"

  rule {
    action      = "allow"
    protocol    = "tcp"
    port        = "80,443"
    description = "web"
  }
  rule {
    action   = "allow"
    protocol = "udp"
    port     = "443"
  }
  rule {
    action = "allow"
    port   = "22"
    source = "203.0.113.10"
  }
}

# Database: open, but 3306 closed to one address; outbound SMTP blocked.
resource "gyro_firewall" "db" {
  server_id      = 1235
  default_action = "allow"

  rule {
    action = "deny"
    port   = "3306"
    source = "198.51.100.7"
  }
  rule {
    direction = "out"
    action    = "deny"
    port      = "25"
  }
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/firewall/policy", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/firewall/policy", {
  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/servers/{id}/firewall/policy

Ağ güvenlik duvarı politikasını değiştirKapsam: cloud_writeputFirewallPolicyBu işlemin OpenAPI parçası

Parametreler

AlaninTürAçıklama
id zorunlupathintegerServer id (= service id in the client area)

İstek gövdesi

AlanTürAçıklama
default_actionstring (allow, deny)
pingboolean
rules zorunluarray<FirewallRuleInput>
permanentbooleanSkip the 5 minute trial (otherwise call POST /firewall/policy/confirm within 5 minutes or the change is reverted)
confirm_warningsboolean

Yanıtlar

200Policy after the change — data: FirewallPolicy
404Not found — also returned for objects owned by someone else
409firewall_not_enabled
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/servers/12345/firewall/policy' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"default_action": "deny", "rules": [{"action": "allow", "protocol": "tcp", "port": "80,443", "source": "any"}, {"action": "allow", "protocol": "tcp", "port": "22", "source": "203.0.113.10"}]}'
gyro firewall set 12345 --help    # tüm seçenekler
# kaynak gyro_firewall: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/firewall
# Web server: 80/443 open to everyone, SSH only from the office, everything else denied.
resource "gyro_firewall" "web" {
  server_id      = 1234
  default_action = "deny"

  rule {
    action      = "allow"
    protocol    = "tcp"
    port        = "80,443"
    description = "web"
  }
  rule {
    action   = "allow"
    protocol = "udp"
    port     = "443"
  }
  rule {
    action = "allow"
    port   = "22"
    source = "203.0.113.10"
  }
}

# Database: open, but 3306 closed to one address; outbound SMTP blocked.
resource "gyro_firewall" "db" {
  server_id      = 1235
  default_action = "allow"

  rule {
    action = "deny"
    port   = "3306"
    source = "198.51.100.7"
  }
  rule {
    direction = "out"
    action    = "deny"
    port      = "25"
  }
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.put("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/firewall/policy", headers=h, json={"default_action": "deny", "rules": [{"action": "allow", "protocol": "tcp", "port": "80,443", "source": "any"}, {"action": "allow", "protocol": "tcp", "port": "22", "source": "203.0.113.10"}]}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/firewall/policy", {
  method: "PUT",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"default_action": "deny", "rules": [{"action": "allow", "protocol": "tcp", "port": "80,443", "source": "any"}, {"action": "allow", "protocol": "tcp", "port": "22", "source": "203.0.113.10"}]}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#DELETE/cloud/servers/{id}/firewall/policy

Güvenlik duvarı kurallarınızı kaldırKapsam: cloud_writedeleteFirewallPolicyBu işlemin OpenAPI parçası

Parametreler

AlaninTürAçıklama
id zorunlupathintegerServer id (= service id in the client area)

Yanıtlar

200Policy after the change — data: FirewallPolicy
404Not found — also returned for objects owned by someone else
409firewall_not_enabled

Örnekler

curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/firewall/policy' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro firewall delete 12345
# kaynak gyro_firewall: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/firewall
# Web server: 80/443 open to everyone, SSH only from the office, everything else denied.
resource "gyro_firewall" "web" {
  server_id      = 1234
  default_action = "deny"

  rule {
    action      = "allow"
    protocol    = "tcp"
    port        = "80,443"
    description = "web"
  }
  rule {
    action   = "allow"
    protocol = "udp"
    port     = "443"
  }
  rule {
    action = "allow"
    port   = "22"
    source = "203.0.113.10"
  }
}

# Database: open, but 3306 closed to one address; outbound SMTP blocked.
resource "gyro_firewall" "db" {
  server_id      = 1235
  default_action = "allow"

  rule {
    action = "deny"
    port   = "3306"
    source = "198.51.100.7"
  }
  rule {
    direction = "out"
    action    = "deny"
    port      = "25"
  }
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/firewall/policy", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/firewall/policy", {
  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}`);

#POST/cloud/servers/{id}/firewall/policy/confirm

Güvenlik duvarı denemesini kalıcı yapKapsam: cloud_writeconfirmFirewallPolicyBu işlemin OpenAPI parçası

Parametreler

AlaninTürAçıklama
id zorunlupathintegerServer id (= service id in the client area)

Yanıtlar

200Policy — data: FirewallPolicy
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 POST 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/firewall/policy/confirm' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro firewall confirm 12345
# kaynak gyro_firewall: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/firewall
# Web server: 80/443 open to everyone, SSH only from the office, everything else denied.
resource "gyro_firewall" "web" {
  server_id      = 1234
  default_action = "deny"

  rule {
    action      = "allow"
    protocol    = "tcp"
    port        = "80,443"
    description = "web"
  }
  rule {
    action   = "allow"
    protocol = "udp"
    port     = "443"
  }
  rule {
    action = "allow"
    port   = "22"
    source = "203.0.113.10"
  }
}

# Database: open, but 3306 closed to one address; outbound SMTP blocked.
resource "gyro_firewall" "db" {
  server_id      = 1235
  default_action = "allow"

  rule {
    action = "deny"
    port   = "3306"
    source = "198.51.100.7"
  }
  rule {
    direction = "out"
    action    = "deny"
    port      = "25"
  }
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/firewall/policy/confirm", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/firewall/policy/confirm", {
  method: "POST",
  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/servers/{id}/ips

Sunucunun IPv4 adresleriKapsam: cloud_readlistServerIpsBu işlemin OpenAPI parçası

Asgari ücret: her eklenen IP en az 6 saat ücretlendirilir (pricing.minimum_hours): daha erken bırakılsa da asgari süre (bırakırken) düşülür; aynı adresi yeniden almak yeni bir asgari süre başlatır. Bir sunucuya 60 dakikada en çok adds_per_hour (varsayılan 10) adres eklenebilir. Ek IPv4 adresleri adres başına ön ödemeli bakiyeden saatlik ücretlendirilir (varsayılan adres başına aylık 2 €, güncel fiyat pricing alanında); eklendiği saatten çıkarıldığı saate kadar. Sunucu başına en çok max (varsayılan 5). Adres sunucuya otomatik tanımlanır (birincil arayüze /32, yeniden başlatma ve yeniden kurulumda korunur); ters DNS: PUT /cloud/servers/{id}/rdns.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerServer id (tr-ist-1)

Yanıtlar

200OK — data: ServerIps
404Not found — also returned for objects owned by someone else
409not_actionable (suspended / busy)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
501not_supported (not a tr-ist-1 Gyro Compute server)

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/ips' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro server ip list 12345
# kaynak gyro_server_ip: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_ip
resource "gyro_server_ip" "extra" {
  count     = 2
  server_id = gyro_server.web.id
}

output "extra_ips" {
  value = gyro_server_ip.extra[*].ip
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/ips", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/ips", {
  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/servers/{id}/ips

Ek IPv4 adresi ekleKapsam: cloud_writeaddServerIpsBu işlemin OpenAPI parçası

Asgari ücret: her eklenen IP en az 6 saat ücretlendirilir (pricing.minimum_hours): daha erken bırakılsa da asgari süre (bırakırken) düşülür; aynı adresi yeniden almak yeni bir asgari süre başlatır. Bir sunucuya 60 dakikada en çok adds_per_hour (varsayılan 10) adres eklenebilir. Ek IPv4 adresleri adres başına ön ödemeli bakiyeden saatlik ücretlendirilir (varsayılan adres başına aylık 2 €, güncel fiyat pricing alanında); eklendiği saatten çıkarıldığı saate kadar. Sunucu başına en çok max (varsayılan 5). Adres sunucuya otomatik tanımlanır (birincil arayüze /32, yeniden başlatma ve yeniden kurulumda korunur); ters DNS: PUT /cloud/servers/{id}/rdns. Yalnız ön ödemeli tr-ist-1 sunucuları; askıdayken eklenemez.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerServer id (tr-ist-1)

İstek gövdesi

AlanTürAçıklama
countinteger

Yanıtlar

201OK — data: ServerIps
404Not found — also returned for objects owned by someone else
409not_actionable (suspended / busy)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
501not_supported (not a tr-ist-1 Gyro Compute server)

Örnekler

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/ips' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"count": 1}'
gyro server ip add 12345 --help    # tüm seçenekler
# kaynak gyro_server_ip: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_ip
resource "gyro_server_ip" "extra" {
  count     = 2
  server_id = gyro_server.web.id
}

output "extra_ips" {
  value = gyro_server_ip.extra[*].ip
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/ips", headers=h, json={"count": 1}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/ips", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"count": 1}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#DELETE/cloud/servers/{id}/ips/{ip}

Ek IPv4 adresini bırakKapsam: cloud_writeremoveServerIpBu işlemin OpenAPI parçası

Asgari ücret: her eklenen IP en az 6 saat ücretlendirilir (pricing.minimum_hours): daha erken bırakılsa da asgari süre (bırakırken) düşülür; aynı adresi yeniden almak yeni bir asgari süre başlatır. Bir sunucuya 60 dakikada en çok adds_per_hour (varsayılan 10) adres eklenebilir. Adres sunucudan kaldırılır ve havuza döner (aynı adresi geri alma garantisi yok); ücret bırakınca durur (asgari süre yine uygulanır). confirm=true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerServer id (tr-ist-1)
ip zorunlupathstring
confirm zorunluqueryboolean

Yanıtlar

200OK — data: ServerIps
404Not found — also returned for objects owned by someone else
409not_actionable (suspended / busy)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
501not_supported (not a tr-ist-1 Gyro Compute server)

Örnekler

curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/ips/1' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro server ip remove 12345
# kaynak gyro_server_ip: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_ip
resource "gyro_server_ip" "extra" {
  count     = 2
  server_id = gyro_server.web.id
}

output "extra_ips" {
  value = gyro_server_ip.extra[*].ip
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/ips/1", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/ips/1", {
  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}`);