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

Güvenlik grupları

Ağ güvenlik duvarı ek hizmeti olan sunucular için yeniden kullanılabilir izin listeleri (AWS security group modeli). Sunucu başına en çok 5 grup; Gyro kuralları ve gelişmiş sıralı kurallarınızdan sonra değerlendirilir; grup olup gelişmiş kural yoksa gelen trafik varsayılan olarak kapalıdır. Kurallar sunucunun kural hakkından düşer. SSH/RDP erişimini kesebilecek değişiklik 5 dakikalık deneme olarak uygulanır: onaylayın.

#GET/cloud/security-groups

Güvenlik gruplarını listeleKapsam: cloud_readlistSecurityGroupsBu işlemin OpenAPI parçası

Yanıtlar

200Groups — data: array<SecurityGroup>
401Missing, invalid or revoked key

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/security-groups' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro security-group list
# kaynak gyro_security_group: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/security_group
# Reusable allow lists (AWS security group model). Stateful: replies to allowed connections pass automatically.
resource "gyro_security_group" "web" {
  name        = "web"
  description = "HTTP/HTTPS for everyone"

  rule {
    type = "http"
  }
  rule {
    type = "https"
  }
}

resource "gyro_security_group" "admin" {
  name = "admin"

  rule {
    type        = "ssh"
    source      = ["203.0.113.10/32"]
    description = "office"
  }
  rule {
    type   = "custom_tcp"
    port   = "8000-8100"
    source = ["198.51.100.0/24"]
  }
  # outbound: a group without outbound rules does not restrict outbound traffic
  rule {
    direction = "out"
    type      = "all"
  }
}
import os, uuid, requests

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

Güvenlik grubu oluşturKapsam: cloud_writecreateSecurityGroupBu işlemin OpenAPI parçası

Ad hesap içinde benzersiz (2-64 karakter). rules verilmezse grupta tek giden kural (tüm trafik) olur, gelen kural olmaz.

İstek gövdesi

AlanTürAçıklama
name zorunlustring
descriptionstring
rulesarray<SecurityGroupRule>

Yanıtlar

201Created — data: SecurityGroup
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/security-groups' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "string", "description": "string", "rules": [{"id": "string", "direction": "in", "type": "ssh", "protocol": "tcp", "port": "8080", "source": ["203.0.113.10/32"], "description": "string"}]}'
gyro security-group create --help    # tüm seçenekler
# kaynak gyro_security_group: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/security_group
# Reusable allow lists (AWS security group model). Stateful: replies to allowed connections pass automatically.
resource "gyro_security_group" "web" {
  name        = "web"
  description = "HTTP/HTTPS for everyone"

  rule {
    type = "http"
  }
  rule {
    type = "https"
  }
}

resource "gyro_security_group" "admin" {
  name = "admin"

  rule {
    type        = "ssh"
    source      = ["203.0.113.10/32"]
    description = "office"
  }
  rule {
    type   = "custom_tcp"
    port   = "8000-8100"
    source = ["198.51.100.0/24"]
  }
  # outbound: a group without outbound rules does not restrict outbound traffic
  rule {
    direction = "out"
    type      = "all"
  }
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/security-groups", headers=h, json={"name": "string", "description": "string", "rules": [{"id": "string", "direction": "in", "type": "ssh", "protocol": "tcp", "port": "8080", "source": ["203.0.113.10/32"], "description": "string"}]}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/security-groups", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"name": "string", "description": "string", "rules": [{"id": "string", "direction": "in", "type": "ssh", "protocol": "tcp", "port": "8080", "source": ["203.0.113.10/32"], "description": "string"}]}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#GET/cloud/security-groups/{sg}

Güvenlik grubunu getirKapsam: cloud_readgetSecurityGroupBu işlemin OpenAPI parçası

Parametreler

AlaninTürAçıklama
sg zorunlupathstring

Yanıtlar

200Group — data: SecurityGroup
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/security-groups/1' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro security-group get
# kaynak gyro_security_group: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/security_group
# Reusable allow lists (AWS security group model). Stateful: replies to allowed connections pass automatically.
resource "gyro_security_group" "web" {
  name        = "web"
  description = "HTTP/HTTPS for everyone"

  rule {
    type = "http"
  }
  rule {
    type = "https"
  }
}

resource "gyro_security_group" "admin" {
  name = "admin"

  rule {
    type        = "ssh"
    source      = ["203.0.113.10/32"]
    description = "office"
  }
  rule {
    type   = "custom_tcp"
    port   = "8000-8100"
    source = ["198.51.100.0/24"]
  }
  # outbound: a group without outbound rules does not restrict outbound traffic
  rule {
    direction = "out"
    type      = "all"
  }
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/security-groups/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/security-groups/1", {
  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}`);

#PATCH/cloud/security-groups/{sg}

Güvenlik grubunun adını / açıklamasını değiştirKapsam: cloud_writeupdateSecurityGroupBu işlemin OpenAPI parçası

Yalnız görünen ad ve açıklama değişir; grup kimliği ve kuralları aynı kalır.

Parametreler

AlaninTürAçıklama
sg zorunlupathstring

İstek gövdesi

AlanTürAçıklama
namestring
descriptionstring

Yanıtlar

200Group — data: SecurityGroup
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 PATCH 'https://www.gyrohosting.com/api/v1/client/cloud/security-groups/1' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "string", "description": "string"}'
gyro security-group update --help    # tüm seçenekler
# kaynak gyro_security_group: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/security_group
# Reusable allow lists (AWS security group model). Stateful: replies to allowed connections pass automatically.
resource "gyro_security_group" "web" {
  name        = "web"
  description = "HTTP/HTTPS for everyone"

  rule {
    type = "http"
  }
  rule {
    type = "https"
  }
}

resource "gyro_security_group" "admin" {
  name = "admin"

  rule {
    type        = "ssh"
    source      = ["203.0.113.10/32"]
    description = "office"
  }
  rule {
    type   = "custom_tcp"
    port   = "8000-8100"
    source = ["198.51.100.0/24"]
  }
  # outbound: a group without outbound rules does not restrict outbound traffic
  rule {
    direction = "out"
    type      = "all"
  }
}
import os, uuid, requests

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

#DELETE/cloud/security-groups/{sg}

Güvenlik grubunu silKapsam: cloud_writedeleteSecurityGroupBu işlemin OpenAPI parçası

Yalnız hiçbir sunucuya bağlı olmayan grup (422 err_sg_attached).

Parametreler

AlaninTürAçıklama
sg zorunlupathstring

Yanıtlar

200Deleted — 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/security-groups/1' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro security-group delete
# kaynak gyro_security_group: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/security_group
# Reusable allow lists (AWS security group model). Stateful: replies to allowed connections pass automatically.
resource "gyro_security_group" "web" {
  name        = "web"
  description = "HTTP/HTTPS for everyone"

  rule {
    type = "http"
  }
  rule {
    type = "https"
  }
}

resource "gyro_security_group" "admin" {
  name = "admin"

  rule {
    type        = "ssh"
    source      = ["203.0.113.10/32"]
    description = "office"
  }
  rule {
    type   = "custom_tcp"
    port   = "8000-8100"
    source = ["198.51.100.0/24"]
  }
  # outbound: a group without outbound rules does not restrict outbound traffic
  rule {
    direction = "out"
    type      = "all"
  }
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/security-groups/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/security-groups/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}`);

#PUT/cloud/security-groups/{sg}/rules

Güvenlik grubunun kurallarını değiştirKapsam: cloud_writeputSecurityGroupRulesBu işlemin OpenAPI parçası

Tam değiştirme (gelen + giden), en çok 60 kural. Bağlı tüm sunuculara uygulanır. Bağlı bir sunucuda herhangi bir kaynağın SSH (22) / RDP (3389) erişimini kaldırıyor ya da daraltıyorsa veya çağıran adresi kesiyorsa 5 dakikalık deneme olur (trial: true, trial_seconds_left) - panel, CLI ve Terraform ile aynı kural: .../confirm ile onaylayın, yoksa önceki kurallar döner. Sunucunun kuralları (kendi + bağlı tüm gruplar) hakkına sığmalı (422 err_sg_quota).

Parametreler

AlaninTürAçıklama
sg zorunlupathstring

İstek gövdesi

AlanTürAçıklama
rules zorunluarray<SecurityGroupRule>

Yanıtlar

200Group (trial, corrections) — data: SecurityGroup
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 PUT 'https://www.gyrohosting.com/api/v1/client/cloud/security-groups/1/rules' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"rules": [{"type": "https", "source": ["0.0.0.0/0"]}, {"type": "ssh", "source": ["203.0.113.10/32"], "description": "office"}, {"direction": "out", "type": "all", "source": ["0.0.0.0/0"]}]}'
gyro security-group rules set --help    # tüm seçenekler
# kaynak gyro_security_group: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/security_group
# Reusable allow lists (AWS security group model). Stateful: replies to allowed connections pass automatically.
resource "gyro_security_group" "web" {
  name        = "web"
  description = "HTTP/HTTPS for everyone"

  rule {
    type = "http"
  }
  rule {
    type = "https"
  }
}

resource "gyro_security_group" "admin" {
  name = "admin"

  rule {
    type        = "ssh"
    source      = ["203.0.113.10/32"]
    description = "office"
  }
  rule {
    type   = "custom_tcp"
    port   = "8000-8100"
    source = ["198.51.100.0/24"]
  }
  # outbound: a group without outbound rules does not restrict outbound traffic
  rule {
    direction = "out"
    type      = "all"
  }
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.put("https://www.gyrohosting.com/api/v1/client/cloud/security-groups/1/rules", headers=h, json={"rules": [{"type": "https", "source": ["0.0.0.0/0"]}, {"type": "ssh", "source": ["203.0.113.10/32"], "description": "office"}, {"direction": "out", "type": "all", "source": ["0.0.0.0/0"]}]}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/security-groups/1/rules", {
  method: "PUT",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"rules": [{"type": "https", "source": ["0.0.0.0/0"]}, {"type": "ssh", "source": ["203.0.113.10/32"], "description": "office"}, {"direction": "out", "type": "all", "source": ["0.0.0.0/0"]}]}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#POST/cloud/security-groups/{sg}/confirm

Kural denemesini kalıcı yapKapsam: cloud_writeconfirmSecurityGroupBu işlemin OpenAPI parçası

Parametreler

AlaninTürAçıklama
sg zorunlupathstring

Yanıtlar

200Group — data: SecurityGroup
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 POST 'https://www.gyrohosting.com/api/v1/client/cloud/security-groups/1/confirm' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro security-group confirm
# kaynak gyro_security_group: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/security_group
# Reusable allow lists (AWS security group model). Stateful: replies to allowed connections pass automatically.
resource "gyro_security_group" "web" {
  name        = "web"
  description = "HTTP/HTTPS for everyone"

  rule {
    type = "http"
  }
  rule {
    type = "https"
  }
}

resource "gyro_security_group" "admin" {
  name = "admin"

  rule {
    type        = "ssh"
    source      = ["203.0.113.10/32"]
    description = "office"
  }
  rule {
    type   = "custom_tcp"
    port   = "8000-8100"
    source = ["198.51.100.0/24"]
  }
  # outbound: a group without outbound rules does not restrict outbound traffic
  rule {
    direction = "out"
    type      = "all"
  }
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/security-groups/1/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/security-groups/1/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}/security-groups

Sunucuya bağlı güvenlik gruplarıKapsam: cloud_readlistServerSecurityGroupsBu işlemin OpenAPI parçası

Parametreler

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

Yanıtlar

200Attached groups — data: ServerSecurityGroups
401Missing, invalid or revoked key
404Not found — also returned for objects owned by someone else
409firewall_not_enabled

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/security-groups' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro security-group server list 12345
# kaynak gyro_server_security_groups: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_security_groups
# Attach both groups to a server (order = evaluation order, max 5). Without gyro_firewall rules, inbound traffic
# that no group allows is denied.
resource "gyro_server_security_groups" "web1" {
  server_id          = 1234
  security_group_ids = [gyro_security_group.web.id, gyro_security_group.admin.id]
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/security-groups", 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/security-groups", {
  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}/security-groups

Bağlı grupları tam liste olarak ayarlaKapsam: cloud_writesetServerSecurityGroupsBu işlemin OpenAPI parçası

Tek değişiklikte bağlar / ayırır (sıra = değerlendirme sırası, en çok 5). Sunucunun önceki değişikliği uygulanırken 422 err_busy döner: birkaç saniye sonra tekrar deneyin.

Parametreler

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

İstek gövdesi

AlanTürAçıklama
security_groups zorunluarray<string>

Yanıtlar

200Attached groups — data: ServerSecurityGroups
401Missing, invalid or revoked key
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/security-groups' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"security_groups": ["string"]}'
gyro security-group server set 12345 --help    # tüm seçenekler
# kaynak gyro_server_security_groups: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_security_groups
# Attach both groups to a server (order = evaluation order, max 5). Without gyro_firewall rules, inbound traffic
# that no group allows is denied.
resource "gyro_server_security_groups" "web1" {
  server_id          = 1234
  security_group_ids = [gyro_security_group.web.id, gyro_security_group.admin.id]
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.put("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/security-groups", headers=h, json={"security_groups": ["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/security-groups", {
  method: "PUT",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"security_groups": ["string"]}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#POST/cloud/servers/{id}/security-groups/{sg}

Güvenlik grubunu sunucuya bağlaKapsam: cloud_writeattachSecurityGroupBu işlemin OpenAPI parçası

Parametreler

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

Yanıtlar

200Attached groups — data: ServerSecurityGroups
401Missing, invalid or revoked key
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 POST 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/security-groups/1' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro security-group attach 12345
# kaynak gyro_server_security_groups: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_security_groups
# Attach both groups to a server (order = evaluation order, max 5). Without gyro_firewall rules, inbound traffic
# that no group allows is denied.
resource "gyro_server_security_groups" "web1" {
  server_id          = 1234
  security_group_ids = [gyro_security_group.web.id, gyro_security_group.admin.id]
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/security-groups/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/security-groups/1", {
  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}`);

#DELETE/cloud/servers/{id}/security-groups/{sg}

Güvenlik grubunu sunucudan ayırKapsam: cloud_writedetachSecurityGroupBu işlemin OpenAPI parçası

Parametreler

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

Yanıtlar

200Attached groups — data: ServerSecurityGroups
401Missing, invalid or revoked key
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 DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/security-groups/1' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro security-group detach 12345
# kaynak gyro_server_security_groups: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_security_groups
# Attach both groups to a server (order = evaluation order, max 5). Without gyro_firewall rules, inbound traffic
# that no group allows is denied.
resource "gyro_server_security_groups" "web1" {
  server_id          = 1234
  security_group_ids = [gyro_security_group.web.id, gyro_security_group.admin.id]
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/security-groups/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/security-groups/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}`);