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

Kapsayıcılar (ECS)

Gyro Kapsayıcı (ECS), İstanbul tr-ist-1: Docker imajlarını size ayrılmış düğüm havuzunda çalıştırın. Kesintisiz dağıtım, sürüm geçmişi ve geri alma, ölçekleme, ortam değişkenleri ve şifreli gizli değerler, <ad>-<kod>.gyroapp.net HTTPS adresi ve kendi alan adlarınız (ücretsiz sertifika), loglar ve grafikler.

#GET/cloud/containers/{id}/services

Kapsayıcı servislerini listeleKapsam: services_readtyped_get_containers__id__servicesBu işlemin OpenAPI parçası

Ortamdaki servisler: durum, hazır/istenen örnek, boyut, genel adres. Her öğede internal_address (portu olan servisler), listede namespace ve cluster_dns bulunur. Her serviste üst düzeyde alerts = {"min_ready": N} vardır (0 = kapalı; spec.alerts ile aynı).

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/containers/12345/services' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro container service list 12345
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
  type      = string
  sensitive = true
}

resource "gyro_container_service" "web" {
  service_id  = 123
  name        = "web"
  image       = "ghcr.io/acme/web:1.4"
  port        = 8080
  cpu_m       = 500
  memory_mi   = 512
  public      = true
  health_path = "/healthz"

  env     = { MODE = "prod" }
  secrets = { DB_PASSWORD = var.db_password } # write only, never read back

  # Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
  autoscaling = {
    min         = 2
    max         = 6
    cpu_percent = 70
  }
  # Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
  notification = {
    min_ready = 2
  }

  # Point a CNAME from your domain to gyro_container_service.web.host first.
  domains = ["app.example.com"]
}

output "web_url" {
  value = gyro_container_service.web.url
}
import os, uuid, requests

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

Kapsayıcı servisi oluşturKapsam: services_writetyped_post_containers__id__servicesBu işlemin OpenAPI parçası

Size ayrılmış düğüm havuzunda yeni servis başlatır. Ad: küçük harf, rakam, '-', en çok 40. Havuzda yer yoksa 409 quota_exceeded. Gizli değerler ayrıca (PUT .../secrets). Sunucusuz ortam: cpu_m / memory_mi GET /cloud/billing/container-sizes çiftlerinden biri olmalı (0,25-4 vCPU); ücret çalışan kopya başına saatliktir (POST /cloud/billing/estimate, type: serverless). Sayı servis başına 0..en fazla kopya aralığı dışındaysa 422 invalid_replicas (details.max = planınızın sınırı). alerts tek alan alır, min_ready (0 = kapalı); autoscaling enabled, min, max, cpu_percent, memory_percent alır. İçlerindeki başka alan 422 invalid_alerts / invalid_autoscaling ile reddedilir (eskiden sessizce düşüyordu).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

İstek gövdesi

AlanTürAçıklama
name zorunlustringService name
image zorunlustringImage reference, e.g. ghcr.io/acme/web:1.4 (public registries or your private registry)
portintegerContainer port (0 = no network port). Containers run as a non-root user: use a port >= 1024
replicasintegerNumber of instances (default 1)
cpu_mintegerCPU per instance in millicores (250 = 0.25 vCPU)
memory_miintegerMemory per instance in MiB
publicbooleanHTTPS address <name>-<code>.gyroapp.net (and your domains)
health_pathstringHTTP health check path (empty = TCP check)
argsarray<string>Arguments for the image's default command. A JSON array of strings, e.g. ["sh","-c","echo a && npm start"]. A plain string is accepted too and split like a shell: whitespace separates, quotes keep text together ("..." with \" escapes, '...' literal): sh -c "echo a && npm start" -> ["sh","-c","echo a && npm start"]. A string starting with [ must be a valid JSON array; an unclosed quote is an error.
commandarray<string>Override the image entrypoint. A JSON array of strings, e.g. ["sh","-c","echo a && npm start"]. A plain string is accepted too and split like a shell: whitespace separates, quotes keep text together ("..." with \" escapes, '...' literal): sh -c "echo a && npm start" -> ["sh","-c","echo a && npm start"]. A string starting with [ must be a valid JSON array; an unclosed quote is an error.
envobjectPlain environment variables (replaces the whole set on update)
run_as_userintegerUser id inside the container (default 10001)
autoscalingobjectAutoscaling (horizontal): replicas follow the average CPU (and optionally memory) use of the reserved size. enabled:false = off (fixed replicas).
autoscaling.enabledboolean
autoscaling.mininteger
autoscaling.maxinteger<= plan replica limit
autoscaling.cpu_percentinteger
autoscaling.memory_percentinteger0 = off, else 10-95
alertsobjectAlert threshold: notify when fewer replicas are ready (0 = off). Channels: PUT /cloud/containers/{id}/notifications.
alerts.min_readyinteger
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/containers/12345/services' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "string", "image": "string", "port": 1, "replicas": 1, "cpu_m": 1, "memory_mi": 1, "public": true, "health_path": "string", "args": ["string"], "command": ["string"], "env": {}, "run_as_user": 1, "autoscaling": {"enabled": true, "min": 1, "max": 1, "cpu_percent": 1, "memory_percent": 1}, "alerts": {"min_ready": 1}, "confirm": true}'
gyro container service create 12345 --help    # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
  type      = string
  sensitive = true
}

resource "gyro_container_service" "web" {
  service_id  = 123
  name        = "web"
  image       = "ghcr.io/acme/web:1.4"
  port        = 8080
  cpu_m       = 500
  memory_mi   = 512
  public      = true
  health_path = "/healthz"

  env     = { MODE = "prod" }
  secrets = { DB_PASSWORD = var.db_password } # write only, never read back

  # Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
  autoscaling = {
    min         = 2
    max         = 6
    cpu_percent = 70
  }
  # Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
  notification = {
    min_ready = 2
  }

  # Point a CNAME from your domain to gyro_container_service.web.host first.
  domains = ["app.example.com"]
}

output "web_url" {
  value = gyro_container_service.web.url
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services", headers=h, json={"name": "string", "image": "string", "port": 1, "replicas": 1, "cpu_m": 1, "memory_mi": 1, "public": True, "health_path": "string", "args": ["string"], "command": ["string"], "env": {}, "run_as_user": 1, "autoscaling": {"enabled": True, "min": 1, "max": 1, "cpu_percent": 1, "memory_percent": 1}, "alerts": {"min_ready": 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/containers/12345/services", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"name": "string", "image": "string", "port": 1, "replicas": 1, "cpu_m": 1, "memory_mi": 1, "public": true, "health_path": "string", "args": ["string"], "command": ["string"], "env": {}, "run_as_user": 1, "autoscaling": {"enabled": true, "min": 1, "max": 1, "cpu_percent": 1, "memory_percent": 1}, "alerts": {"min_ready": 1}, "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#GET/cloud/containers/{id}/services/{name}

Kapsayıcı servisini getirKapsam: services_readtyped_get_containers__id__services__nameBu işlemin OpenAPI parçası

Tanım, durum, sorun kodu, örnekler, sürüm, alan adları ve gizli değer adları (değerler asla dönmez). Yanıtta namespace ve portu olan servislerde internal = {host, short, port: 80, target_port, address, url} bulunur: aynı ortamdaki servisler internal.address (<ad>.<namespace>.svc.cluster.local:80) ya da <ad>:80 ile ulaşır. Her serviste üst düzeyde alerts = {"min_ready": N} vardır (0 = kapalı; spec.alerts ile aynı).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
name zorunlupathstringService name

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/containers/12345/services/1' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro container service get 12345
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
  type      = string
  sensitive = true
}

resource "gyro_container_service" "web" {
  service_id  = 123
  name        = "web"
  image       = "ghcr.io/acme/web:1.4"
  port        = 8080
  cpu_m       = 500
  memory_mi   = 512
  public      = true
  health_path = "/healthz"

  env     = { MODE = "prod" }
  secrets = { DB_PASSWORD = var.db_password } # write only, never read back

  # Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
  autoscaling = {
    min         = 2
    max         = 6
    cpu_percent = 70
  }
  # Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
  notification = {
    min_ready = 2
  }

  # Point a CNAME from your domain to gyro_container_service.web.host first.
  domains = ["app.example.com"]
}

output "web_url" {
  value = gyro_container_service.web.url
}
import os, uuid, requests

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

Yeni sürüm dağıt / ayar değiştirKapsam: services_writetyped_patch_containers__id__services__nameBu işlemin OpenAPI parçası

Yalnız değişecek alanları gönderin (ör. image). replicas dışındaki her değişiklik yeni sürüm oluşturur ve kesintisiz dağıtılır. Sunucusuz ortam: cpu_m / memory_mi GET /cloud/billing/container-sizes çiftlerinden biri olmalı (0,25-4 vCPU); ücret çalışan kopya başına saatliktir (POST /cloud/billing/estimate, type: serverless). Sayı servis başına 0..en fazla kopya aralığı dışındaysa 422 invalid_replicas (details.max = planınızın sınırı). alerts tek alan alır, min_ready (0 = kapalı); autoscaling enabled, min, max, cpu_percent, memory_percent alır. İçlerindeki başka alan 422 invalid_alerts / invalid_autoscaling ile reddedilir (eskiden sessizce düşüyordu).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
name zorunlupathstringService name

İstek gövdesi

AlanTürAçıklama
imagestringImage reference, e.g. ghcr.io/acme/web:1.4 (public registries or your private registry)
portintegerContainer port (0 = no network port). Containers run as a non-root user: use a port >= 1024
replicasintegerNumber of instances (default 1)
cpu_mintegerCPU per instance in millicores (250 = 0.25 vCPU)
memory_miintegerMemory per instance in MiB
publicbooleanHTTPS address <name>-<code>.gyroapp.net (and your domains)
health_pathstringHTTP health check path (empty = TCP check)
argsarray<string>Arguments for the image's default command. A JSON array of strings, e.g. ["sh","-c","echo a && npm start"]. A plain string is accepted too and split like a shell: whitespace separates, quotes keep text together ("..." with \" escapes, '...' literal): sh -c "echo a && npm start" -> ["sh","-c","echo a && npm start"]. A string starting with [ must be a valid JSON array; an unclosed quote is an error.
commandarray<string>Override the image entrypoint. A JSON array of strings, e.g. ["sh","-c","echo a && npm start"]. A plain string is accepted too and split like a shell: whitespace separates, quotes keep text together ("..." with \" escapes, '...' literal): sh -c "echo a && npm start" -> ["sh","-c","echo a && npm start"]. A string starting with [ must be a valid JSON array; an unclosed quote is an error.
envobjectPlain environment variables (replaces the whole set on update)
run_as_userintegerUser id inside the container (default 10001)
reasonstringFree text shown in the revision history (e.g. a git sha)
autoscalingobjectAutoscaling (horizontal): replicas follow the average CPU (and optionally memory) use of the reserved size. enabled:false = off (fixed replicas).
autoscaling.enabledboolean
autoscaling.mininteger
autoscaling.maxinteger<= plan replica limit
autoscaling.cpu_percentinteger
autoscaling.memory_percentinteger0 = off, else 10-95
alertsobjectAlert threshold: notify when fewer replicas are ready (0 = off). Channels: PUT /cloud/containers/{id}/notifications.
alerts.min_readyinteger
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/containers/12345/services/1' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"image": "string", "port": 1, "replicas": 1, "cpu_m": 1, "memory_mi": 1, "public": true, "health_path": "string", "args": ["string"], "command": ["string"], "env": {}, "run_as_user": 1, "reason": "string", "autoscaling": {"enabled": true, "min": 1, "max": 1, "cpu_percent": 1, "memory_percent": 1}, "alerts": {"min_ready": 1}, "confirm": true}'
gyro container service update 12345 --help    # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
  type      = string
  sensitive = true
}

resource "gyro_container_service" "web" {
  service_id  = 123
  name        = "web"
  image       = "ghcr.io/acme/web:1.4"
  port        = 8080
  cpu_m       = 500
  memory_mi   = 512
  public      = true
  health_path = "/healthz"

  env     = { MODE = "prod" }
  secrets = { DB_PASSWORD = var.db_password } # write only, never read back

  # Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
  autoscaling = {
    min         = 2
    max         = 6
    cpu_percent = 70
  }
  # Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
  notification = {
    min_ready = 2
  }

  # Point a CNAME from your domain to gyro_container_service.web.host first.
  domains = ["app.example.com"]
}

output "web_url" {
  value = gyro_container_service.web.url
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.patch("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services/1", headers=h, json={"image": "string", "port": 1, "replicas": 1, "cpu_m": 1, "memory_mi": 1, "public": True, "health_path": "string", "args": ["string"], "command": ["string"], "env": {}, "run_as_user": 1, "reason": "string", "autoscaling": {"enabled": True, "min": 1, "max": 1, "cpu_percent": 1, "memory_percent": 1}, "alerts": {"min_ready": 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/containers/12345/services/1", {
  method: "PATCH",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"image": "string", "port": 1, "replicas": 1, "cpu_m": 1, "memory_mi": 1, "public": true, "health_path": "string", "args": ["string"], "command": ["string"], "env": {}, "run_as_user": 1, "reason": "string", "autoscaling": {"enabled": true, "min": 1, "max": 1, "cpu_percent": 1, "memory_percent": 1}, "alerts": {"min_ready": 1}, "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#DELETE/cloud/containers/{id}/services/{name}

Kapsayıcı servisini silKapsam: services_writetyped_delete_containers__id__services__nameBu işlemin OpenAPI parçası

Servisi, adresini, gizli değerlerini, sürüm geçmişini ve sertifikalarını siler. "confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
name zorunlupathstringService name

İ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/containers/12345/services/1' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro container service delete 12345 --help    # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
  type      = string
  sensitive = true
}

resource "gyro_container_service" "web" {
  service_id  = 123
  name        = "web"
  image       = "ghcr.io/acme/web:1.4"
  port        = 8080
  cpu_m       = 500
  memory_mi   = 512
  public      = true
  health_path = "/healthz"

  env     = { MODE = "prod" }
  secrets = { DB_PASSWORD = var.db_password } # write only, never read back

  # Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
  autoscaling = {
    min         = 2
    max         = 6
    cpu_percent = 70
  }
  # Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
  notification = {
    min_ready = 2
  }

  # Point a CNAME from your domain to gyro_container_service.web.host first.
  domains = ["app.example.com"]
}

output "web_url" {
  value = gyro_container_service.web.url
}
import os, uuid, requests

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

#POST/cloud/containers/{id}/services/{name}/scale

Servisi ölçekleKapsam: services_writetyped_post_containers__id__services__name__scaleBu işlemin OpenAPI parçası

Örnek sayısını ayarlar (0 = durdur). Sürüm oluşturmaz. Sayı servis başına 0..en fazla kopya aralığı dışındaysa 422 invalid_replicas (details.max = planınızın sınırı).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
name zorunlupathstringService name

İstek gövdesi

AlanTürAçıklama
replicas 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/containers/12345/services/1/scale' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"replicas": 1, "confirm": true}'
gyro container service scale 12345 --help    # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
  type      = string
  sensitive = true
}

resource "gyro_container_service" "web" {
  service_id  = 123
  name        = "web"
  image       = "ghcr.io/acme/web:1.4"
  port        = 8080
  cpu_m       = 500
  memory_mi   = 512
  public      = true
  health_path = "/healthz"

  env     = { MODE = "prod" }
  secrets = { DB_PASSWORD = var.db_password } # write only, never read back

  # Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
  autoscaling = {
    min         = 2
    max         = 6
    cpu_percent = 70
  }
  # Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
  notification = {
    min_ready = 2
  }

  # Point a CNAME from your domain to gyro_container_service.web.host first.
  domains = ["app.example.com"]
}

output "web_url" {
  value = gyro_container_service.web.url
}
import os, uuid, requests

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

#POST/cloud/containers/{id}/services/{name}/restart

Servisi yeniden başlatKapsam: services_writetyped_post_containers__id__services__name__restartBu işlemin OpenAPI parçası

Örnekleri tek tek yeniler.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
name zorunlupathstringService name

İ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/containers/12345/services/1/restart' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro container service restart 12345 --help    # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
  type      = string
  sensitive = true
}

resource "gyro_container_service" "web" {
  service_id  = 123
  name        = "web"
  image       = "ghcr.io/acme/web:1.4"
  port        = 8080
  cpu_m       = 500
  memory_mi   = 512
  public      = true
  health_path = "/healthz"

  env     = { MODE = "prod" }
  secrets = { DB_PASSWORD = var.db_password } # write only, never read back

  # Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
  autoscaling = {
    min         = 2
    max         = 6
    cpu_percent = 70
  }
  # Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
  notification = {
    min_ready = 2
  }

  # Point a CNAME from your domain to gyro_container_service.web.host first.
  domains = ["app.example.com"]
}

output "web_url" {
  value = gyro_container_service.web.url
}
import os, uuid, requests

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

#POST/cloud/containers/{id}/services/{name}/rollback

Önceki sürüme dönKapsam: services_writetyped_post_containers__id__services__name__rollbackBu işlemin OpenAPI parçası

revision sürümünün (varsayılan bir önceki) imaj, boyut, komut ve değişkenlerini yeni sürüm olarak geri getirir. Kopya sayısı ve gizli değerler değişmez. "confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
name zorunlupathstringService name

İstek gövdesi

AlanTürAçıklama
revisionintegerRevision number (empty = previous)
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/containers/12345/services/1/rollback' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"revision": 1, "confirm": true}'
gyro container service rollback 12345 --help    # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
  type      = string
  sensitive = true
}

resource "gyro_container_service" "web" {
  service_id  = 123
  name        = "web"
  image       = "ghcr.io/acme/web:1.4"
  port        = 8080
  cpu_m       = 500
  memory_mi   = 512
  public      = true
  health_path = "/healthz"

  env     = { MODE = "prod" }
  secrets = { DB_PASSWORD = var.db_password } # write only, never read back

  # Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
  autoscaling = {
    min         = 2
    max         = 6
    cpu_percent = 70
  }
  # Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
  notification = {
    min_ready = 2
  }

  # Point a CNAME from your domain to gyro_container_service.web.host first.
  domains = ["app.example.com"]
}

output "web_url" {
  value = gyro_container_service.web.url
}
import os, uuid, requests

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

#GET/cloud/containers/{id}/services/{name}/revisions

Sürüm geçmişiKapsam: services_readtyped_get_containers__id__services__name__revisionsBu işlemin OpenAPI parçası

Son 15 sürüm (yeniden eskiye): imaj, boyut, değişken adları, neden.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
name zorunlupathstringService name

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/containers/12345/services/1/revisions' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro container service revisions 12345
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
  type      = string
  sensitive = true
}

resource "gyro_container_service" "web" {
  service_id  = 123
  name        = "web"
  image       = "ghcr.io/acme/web:1.4"
  port        = 8080
  cpu_m       = 500
  memory_mi   = 512
  public      = true
  health_path = "/healthz"

  env     = { MODE = "prod" }
  secrets = { DB_PASSWORD = var.db_password } # write only, never read back

  # Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
  autoscaling = {
    min         = 2
    max         = 6
    cpu_percent = 70
  }
  # Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
  notification = {
    min_ready = 2
  }

  # Point a CNAME from your domain to gyro_container_service.web.host first.
  domains = ["app.example.com"]
}

output "web_url" {
  value = gyro_container_service.web.url
}
import os, uuid, requests

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

Ortam değişkenlerini ayarlaKapsam: services_writetyped_put_containers__id__services__name__envBu işlemin OpenAPI parçası

set değişken ekler/günceller ({"KEY":"değer"} ya da KEY=VALUE satırları), unset siler, replace: 1 tümünü değiştirir. Sürüm oluşturur, servis yeniden başlar. Yalnız set, unset ve replace kabul edilir: bilinmeyen alan (ör. env) ya da hiçbir şeyi değiştirmeyen gövde (set, unset, replace: 1 yok) 422 invalid_env ile reddedilir (details.expected beklenen alanları verir); hiçbir şey kaydedilmez, servis yeniden başlamaz.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
name zorunlupathstringService name

İstek gövdesi

AlanTürAçıklama
setobject
unsetarray<string>
replaceinteger (0, 1)
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)
422invalid_env: unknown field or nothing to change (details.expected lists set / unset / replace)

Örnekler

curl -s -X PUT 'https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services/1/env' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"set": {}, "unset": ["string"], "replace": 0, "confirm": true}'
gyro container env set 12345 --help    # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
  type      = string
  sensitive = true
}

resource "gyro_container_service" "web" {
  service_id  = 123
  name        = "web"
  image       = "ghcr.io/acme/web:1.4"
  port        = 8080
  cpu_m       = 500
  memory_mi   = 512
  public      = true
  health_path = "/healthz"

  env     = { MODE = "prod" }
  secrets = { DB_PASSWORD = var.db_password } # write only, never read back

  # Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
  autoscaling = {
    min         = 2
    max         = 6
    cpu_percent = 70
  }
  # Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
  notification = {
    min_ready = 2
  }

  # Point a CNAME from your domain to gyro_container_service.web.host first.
  domains = ["app.example.com"]
}

output "web_url" {
  value = gyro_container_service.web.url
}
import os, uuid, requests

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

#PUT/cloud/containers/{id}/services/{name}/secrets

Gizli değer ayarlaKapsam: services_writetyped_put_containers__id__services__name__secretsBu işlemin OpenAPI parçası

Şifreli saklanır, ortam değişkeni olarak verilir, asla geri dönmez. Servis yeniden başlar.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
name zorunlupathstringService name

İstek gövdesi

AlanTürAçıklama
set zorunluobject
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/containers/12345/services/1/secrets' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"set": {}, "confirm": true}'
gyro container secret set 12345 --help    # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
  type      = string
  sensitive = true
}

resource "gyro_container_service" "web" {
  service_id  = 123
  name        = "web"
  image       = "ghcr.io/acme/web:1.4"
  port        = 8080
  cpu_m       = 500
  memory_mi   = 512
  public      = true
  health_path = "/healthz"

  env     = { MODE = "prod" }
  secrets = { DB_PASSWORD = var.db_password } # write only, never read back

  # Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
  autoscaling = {
    min         = 2
    max         = 6
    cpu_percent = 70
  }
  # Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
  notification = {
    min_ready = 2
  }

  # Point a CNAME from your domain to gyro_container_service.web.host first.
  domains = ["app.example.com"]
}

output "web_url" {
  value = gyro_container_service.web.url
}
import os, uuid, requests

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

#DELETE/cloud/containers/{id}/services/{name}/secrets

Gizli değer silKapsam: services_writetyped_delete_containers__id__services__name__secretsBu işlemin OpenAPI parçası

keys (sorguda virgülle). Servis yeniden başlar. "confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
name zorunlupathstringService name
keysquerystringSecret names, comma separated

İ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/containers/12345/services/1/secrets' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro container secret delete 12345 --help    # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
  type      = string
  sensitive = true
}

resource "gyro_container_service" "web" {
  service_id  = 123
  name        = "web"
  image       = "ghcr.io/acme/web:1.4"
  port        = 8080
  cpu_m       = 500
  memory_mi   = 512
  public      = true
  health_path = "/healthz"

  env     = { MODE = "prod" }
  secrets = { DB_PASSWORD = var.db_password } # write only, never read back

  # Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
  autoscaling = {
    min         = 2
    max         = 6
    cpu_percent = 70
  }
  # Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
  notification = {
    min_ready = 2
  }

  # Point a CNAME from your domain to gyro_container_service.web.host first.
  domains = ["app.example.com"]
}

output "web_url" {
  value = gyro_container_service.web.url
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services/1/secrets", 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/containers/12345/services/1/secrets", {
  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/containers/{id}/services/{name}/logs

Servis loglarıKapsam: services_readtyped_get_containers__id__services__name__logsBu işlemin OpenAPI parçası

Satırlar {time, instance, text} eskiden yeniye. since_minutes (varsayılan 60), filter, limit (en çok 2000), previous=1 = son çöken örnek.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
name zorunlupathstringService name
since_minutesquerystringTime range in minutes
filterquerystringPlain text filter
limitquerystringMax lines
previousquerystring1 = previous (crashed) instance

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/containers/12345/services/1/logs' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro container logs 12345
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
  type      = string
  sensitive = true
}

resource "gyro_container_service" "web" {
  service_id  = 123
  name        = "web"
  image       = "ghcr.io/acme/web:1.4"
  port        = 8080
  cpu_m       = 500
  memory_mi   = 512
  public      = true
  health_path = "/healthz"

  env     = { MODE = "prod" }
  secrets = { DB_PASSWORD = var.db_password } # write only, never read back

  # Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
  autoscaling = {
    min         = 2
    max         = 6
    cpu_percent = 70
  }
  # Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
  notification = {
    min_ready = 2
  }

  # Point a CNAME from your domain to gyro_container_service.web.host first.
  domains = ["app.example.com"]
}

output "web_url" {
  value = gyro_container_service.web.url
}
import os, uuid, requests

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

Servis işlemci / bellekKapsam: services_readtyped_get_containers__id__services__name__metricsBu işlemin OpenAPI parçası

source=history: hours boyunca seriler; source=current: anlık kullanım.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
name zorunlupathstringService name
hoursquerystringHistory length in hours (default 24)

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/containers/12345/services/1/metrics' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro container metrics 12345
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
  type      = string
  sensitive = true
}

resource "gyro_container_service" "web" {
  service_id  = 123
  name        = "web"
  image       = "ghcr.io/acme/web:1.4"
  port        = 8080
  cpu_m       = 500
  memory_mi   = 512
  public      = true
  health_path = "/healthz"

  env     = { MODE = "prod" }
  secrets = { DB_PASSWORD = var.db_password } # write only, never read back

  # Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
  autoscaling = {
    min         = 2
    max         = 6
    cpu_percent = 70
  }
  # Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
  notification = {
    min_ready = 2
  }

  # Point a CNAME from your domain to gyro_container_service.web.host first.
  domains = ["app.example.com"]
}

output "web_url" {
  value = gyro_container_service.web.url
}
import os, uuid, requests

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

#GET/cloud/containers/{id}/services/{name}/domains

Servisin alan adlarıKapsam: services_readtyped_get_containers__id__services__name__domainsBu işlemin OpenAPI parçası

Durum active ya da pending (DNS bekleniyor).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
name zorunlupathstringService name

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/containers/12345/services/1/domains' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro container domain list 12345
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
  type      = string
  sensitive = true
}

resource "gyro_container_service" "web" {
  service_id  = 123
  name        = "web"
  image       = "ghcr.io/acme/web:1.4"
  port        = 8080
  cpu_m       = 500
  memory_mi   = 512
  public      = true
  health_path = "/healthz"

  env     = { MODE = "prod" }
  secrets = { DB_PASSWORD = var.db_password } # write only, never read back

  # Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
  autoscaling = {
    min         = 2
    max         = 6
    cpu_percent = 70
  }
  # Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
  notification = {
    min_ready = 2
  }

  # Point a CNAME from your domain to gyro_container_service.web.host first.
  domains = ["app.example.com"]
}

output "web_url" {
  value = gyro_container_service.web.url
}
import os, uuid, requests

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

Alan adı bağlaKapsam: services_writetyped_post_containers__id__services__name__domainsBu işlemin OpenAPI parçası

Önce CNAME kaydını servis adresine (<ad>-<kod>.gyroapp.net) yönlendirin; DNS bize gösterince ücretsiz sertifikayla etkinleşir (saatlik ya da .../domains/verify ile).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
name zorunlupathstringService name

İstek gövdesi

AlanTürAçıklama
domain zorunlustring
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/containers/12345/services/1/domains' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"domain": "string", "confirm": true}'
gyro container domain add 12345 --help    # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
  type      = string
  sensitive = true
}

resource "gyro_container_service" "web" {
  service_id  = 123
  name        = "web"
  image       = "ghcr.io/acme/web:1.4"
  port        = 8080
  cpu_m       = 500
  memory_mi   = 512
  public      = true
  health_path = "/healthz"

  env     = { MODE = "prod" }
  secrets = { DB_PASSWORD = var.db_password } # write only, never read back

  # Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
  autoscaling = {
    min         = 2
    max         = 6
    cpu_percent = 70
  }
  # Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
  notification = {
    min_ready = 2
  }

  # Point a CNAME from your domain to gyro_container_service.web.host first.
  domains = ["app.example.com"]
}

output "web_url" {
  value = gyro_container_service.web.url
}
import os, uuid, requests

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

#POST/cloud/containers/{id}/services/{name}/domains/verify

Bekleyen alan adlarını kontrol etKapsam: services_writetyped_post_containers__id__services__name__domains_verifyBu işlemin OpenAPI parçası

DNS'i şimdi kontrol eder, bize gösterenleri etkinleştirir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
name zorunlupathstringService name

İ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/containers/12345/services/1/domains/verify' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro container domain verify 12345 --help    # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
  type      = string
  sensitive = true
}

resource "gyro_container_service" "web" {
  service_id  = 123
  name        = "web"
  image       = "ghcr.io/acme/web:1.4"
  port        = 8080
  cpu_m       = 500
  memory_mi   = 512
  public      = true
  health_path = "/healthz"

  env     = { MODE = "prod" }
  secrets = { DB_PASSWORD = var.db_password } # write only, never read back

  # Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
  autoscaling = {
    min         = 2
    max         = 6
    cpu_percent = 70
  }
  # Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
  notification = {
    min_ready = 2
  }

  # Point a CNAME from your domain to gyro_container_service.web.host first.
  domains = ["app.example.com"]
}

output "web_url" {
  value = gyro_container_service.web.url
}
import os, uuid, requests

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

Alan adını kaldırKapsam: services_writetyped_delete_containers__id__services__name__domains__domainBu işlemin OpenAPI parçası

Alan adını ve sertifikasını kaldırır. "confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
name zorunlupathstringService name
domain zorunlupathstringDomain name

İ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/containers/12345/services/1/domains/1' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro container domain remove 12345 --help    # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
  type      = string
  sensitive = true
}

resource "gyro_container_service" "web" {
  service_id  = 123
  name        = "web"
  image       = "ghcr.io/acme/web:1.4"
  port        = 8080
  cpu_m       = 500
  memory_mi   = 512
  public      = true
  health_path = "/healthz"

  env     = { MODE = "prod" }
  secrets = { DB_PASSWORD = var.db_password } # write only, never read back

  # Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
  autoscaling = {
    min         = 2
    max         = 6
    cpu_percent = 70
  }
  # Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
  notification = {
    min_ready = 2
  }

  # Point a CNAME from your domain to gyro_container_service.web.host first.
  domains = ["app.example.com"]
}

output "web_url" {
  value = gyro_container_service.web.url
}
import os, uuid, requests

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

#PUT/cloud/containers/{id}/services/{name}/autoscaling

Servisin otomatik ölçekleme / uyarı eşiğiKapsam: services_writetyped_put_containers__id__services__name__autoscalingBu işlemin OpenAPI parçası

Gövde {"autoscaling": {...}, "alerts": {"min_ready": 2}}. Ortalama kullanım hedefi aşınca kopya eklenir (30 sn'de en çok iki katı), 3 dakika sakin kalınca dakikada bir azaltılır. En çok kopya paket sınırını aşamaz; havuza sığmayan kopyalar bekler. Sürüm oluşturmaz. Kapatınca mevcut kopya sayısı (ya da replicas) kalır. Sayı servis başına 0..en fazla kopya aralığı dışındaysa 422 invalid_replicas (details.max = planınızın sınırı). alerts tek alan alır, min_ready (0 = kapalı); autoscaling enabled, min, max, cpu_percent, memory_percent alır. İçlerindeki başka alan 422 invalid_alerts / invalid_autoscaling ile reddedilir (eskiden sessizce düşüyordu).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
name zorunlupathstringService name

İstek gövdesi

AlanTürAçıklama
autoscalingobjectAutoscaling (horizontal): replicas follow the average CPU (and optionally memory) use of the reserved size. enabled:false = off (fixed replicas).
autoscaling.enabledboolean
autoscaling.mininteger
autoscaling.maxinteger<= plan replica limit
autoscaling.cpu_percentinteger
autoscaling.memory_percentinteger0 = off, else 10-95
alertsobjectAlert threshold: notify when fewer replicas are ready (0 = off). Channels: PUT /cloud/containers/{id}/notifications.
alerts.min_readyinteger
replicasintegerFixed replicas when switching autoscaling off
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/containers/12345/services/1/autoscaling' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"autoscaling": {"enabled": true, "min": 1, "max": 1, "cpu_percent": 1, "memory_percent": 1}, "alerts": {"min_ready": 1}, "replicas": 1, "confirm": true}'
gyro container service autoscale 12345 --help    # tüm seçenekler
# kaynak gyro_container_service: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_service
# A web service in your Gyro Containers (ECS) environment (Istanbul).
# service_id is the id of the container environment you ordered (see gyro_services).
variable "db_password" {
  type      = string
  sensitive = true
}

resource "gyro_container_service" "web" {
  service_id  = 123
  name        = "web"
  image       = "ghcr.io/acme/web:1.4"
  port        = 8080
  cpu_m       = 500
  memory_mi   = 512
  public      = true
  health_path = "/healthz"

  env     = { MODE = "prod" }
  secrets = { DB_PASSWORD = var.db_password } # write only, never read back

  # Replicas follow the load: 2..6, target 70 % CPU of cpu_m (replicas is ignored while autoscaling is set).
  autoscaling = {
    min         = 2
    max         = 6
    cpu_percent = 70
  }
  # Alert when fewer than 2 replicas are ready (channels: gyro_container_notifications).
  notification = {
    min_ready = 2
  }

  # Point a CNAME from your domain to gyro_container_service.web.host first.
  domains = ["app.example.com"]
}

output "web_url" {
  value = gyro_container_service.web.url
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.put("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/services/1/autoscaling", headers=h, json={"autoscaling": {"enabled": True, "min": 1, "max": 1, "cpu_percent": 1, "memory_percent": 1}, "alerts": {"min_ready": 1}, "replicas": 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/containers/12345/services/1/autoscaling", {
  method: "PUT",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"autoscaling": {"enabled": true, "min": 1, "max": 1, "cpu_percent": 1, "memory_percent": 1}, "alerts": {"min_ready": 1}, "replicas": 1, "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#GET/cloud/containers/{id}/notifications

Bildirim ayarları ve süren uyarılarKapsam: services_readtyped_get_containers__id__notificationsBu işlemin OpenAPI parçası

settings (kanallar, olaylar, tekrar aralığı; webhook anahtarı dönmez), conditions = şu an süren sorunlar, history = son 30 uyarı. Olaylar: down, crashloop, replicas_low, scale_max, capacity, egress (çıkış IP'leri değişti). Olay ~2 dakika sürünce bildirilir; aynı servis + olay tekrar aralığında bir kez (gidip gelenler dahil), düzelince 'düzeldi' mesajı.

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/containers/12345/notifications' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro container notifications get 12345
# kaynak gyro_container_notifications: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_notifications
# Alert channels of a Gyro Containers (ECS) environment.
resource "gyro_container_notifications" "alerts" {
  service_id  = 123
  email       = true
  sms         = false
  telegram    = "123456789" # send /start to @gyrouptime_bot, it replies with your chat id
  webhook_url = "https://ops.example.com/gyro-alerts"
  events      = ["down", "crashloop", "replicas_low", "scale_max", "capacity"]
  cooldown    = 30
}

# Verify webhooks: X-Gyro-Signature = "sha256=" + HMAC-SHA256(secret, X-Gyro-Timestamp + "." + body)
output "webhook_secret" {
  value     = gyro_container_notifications.alerts.webhook_secret
  sensitive = true
}
import os, uuid, requests

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

Bildirim kanallarını ayarlaKapsam: services_writetyped_put_containers__id__notificationsBu işlemin OpenAPI parçası

Yalnız değişecek alanları gönderin. Webhook adresi ilk kez girilince imza anahtarı üretilir (POST .../notifications/webhook-secret ile alınır).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

İstek gövdesi

AlanTürAçıklama
emailbooleanAccount e-mail (default on)
smsbooleanAccount phone
telegramstringTelegram chat id (send /start to the platform bot, e.g. @gyrouptime_bot); empty = off
webhook_urlstringhttps URL of a public server; JSON POST signed with X-Gyro-Signature: sha256=HMAC(secret, X-Gyro-Timestamp + '.' + body)
eventsstringComma separated: down, crashloop, replicas_low, scale_max, capacity, egress
cooldownintegerMinutes between two announcements of the same service + event (5-1440, default 30)
resolvedbooleanSend a 'resolved' message (default on)
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/containers/12345/notifications' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"email": true, "sms": true, "telegram": "string", "webhook_url": "string", "events": "string", "cooldown": 1, "resolved": true, "confirm": true}'
gyro container notifications set 12345 --help    # tüm seçenekler
# kaynak gyro_container_notifications: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_notifications
# Alert channels of a Gyro Containers (ECS) environment.
resource "gyro_container_notifications" "alerts" {
  service_id  = 123
  email       = true
  sms         = false
  telegram    = "123456789" # send /start to @gyrouptime_bot, it replies with your chat id
  webhook_url = "https://ops.example.com/gyro-alerts"
  events      = ["down", "crashloop", "replicas_low", "scale_max", "capacity"]
  cooldown    = 30
}

# Verify webhooks: X-Gyro-Signature = "sha256=" + HMAC-SHA256(secret, X-Gyro-Timestamp + "." + body)
output "webhook_secret" {
  value     = gyro_container_notifications.alerts.webhook_secret
  sensitive = true
}
import os, uuid, requests

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

#POST/cloud/containers/{id}/notifications/test

Test bildirimi gönderKapsam: services_writetyped_post_containers__id__notifications_testBu işlemin OpenAPI parçası

Açık her kanala test mesajı; channels kanal başına sonuç. 10 dakikada en çok 5.

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/containers/12345/notifications/test' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro container notifications test 12345 --help    # tüm seçenekler
# kaynak gyro_container_notifications: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_notifications
# Alert channels of a Gyro Containers (ECS) environment.
resource "gyro_container_notifications" "alerts" {
  service_id  = 123
  email       = true
  sms         = false
  telegram    = "123456789" # send /start to @gyrouptime_bot, it replies with your chat id
  webhook_url = "https://ops.example.com/gyro-alerts"
  events      = ["down", "crashloop", "replicas_low", "scale_max", "capacity"]
  cooldown    = 30
}

# Verify webhooks: X-Gyro-Signature = "sha256=" + HMAC-SHA256(secret, X-Gyro-Timestamp + "." + body)
output "webhook_secret" {
  value     = gyro_container_notifications.alerts.webhook_secret
  sensitive = true
}
import os, uuid, requests

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

#POST/cloud/containers/{id}/notifications/webhook-secret

Webhook imza anahtarıKapsam: services_writetyped_post_containers__id__notifications_webhook_secretBu işlemin OpenAPI parçası

İmza anahtarını döndürür (rotate: true yenisini üretir).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

İstek gövdesi

AlanTürAçıklama
rotateboolean
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/containers/12345/notifications/webhook-secret' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"rotate": true, "confirm": true}'
gyro container notifications webhook-secret 12345 --help    # tüm seçenekler
# kaynak gyro_container_notifications: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_notifications
# Alert channels of a Gyro Containers (ECS) environment.
resource "gyro_container_notifications" "alerts" {
  service_id  = 123
  email       = true
  sms         = false
  telegram    = "123456789" # send /start to @gyrouptime_bot, it replies with your chat id
  webhook_url = "https://ops.example.com/gyro-alerts"
  events      = ["down", "crashloop", "replicas_low", "scale_max", "capacity"]
  cooldown    = 30
}

# Verify webhooks: X-Gyro-Signature = "sha256=" + HMAC-SHA256(secret, X-Gyro-Timestamp + "." + body)
output "webhook_secret" {
  value     = gyro_container_notifications.alerts.webhook_secret
  sensitive = true
}
import os, uuid, requests

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

#GET/cloud/containers/{id}/nodes

Düğüm havuzuKapsam: services_readtyped_get_containers__id__nodesBu işlemin OpenAPI parçası

Size ayrılmış düğümler, havuz kapasitesi/kullanımı, kök alan adı A kaydı için IP'ler, özel depo (yalnız kullanıcı). Ayrıca namespace, cluster_dns ve egress (ContainerEgress şeması).

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/containers/12345/nodes' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro container nodes 12345
import os, uuid, requests

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

Ek düğüm sayısını ayarlaKapsam: services_writesetContainerNodesBu işlemin OpenAPI parçası

Paketin düğüm boyutunda ek düğüm ekler ya da çıkarır (mutlak extra_nodes, 0 = yalnız paket; ortam başına toplam en çok 20 düğüm, GyroKota düşürebilir). Ek düğüm paketteki düğümle aynı fiyattır, ön ödemeli bakiyeden saatlik düşer. Çıkarma önce boşaltır: kopyalar kalan düğümlere taşınır (servisler sırayla, sağlık kontrollü yeniden başlar), sonra düğüm silinir; boşaltılırken ücretlenmez. Kalan düğümler çalışan servislere yetmiyorsa 409 quota_in_use. Sunucusuz ortamlarda düğüm yoktur. "confirm": true gerekir. Ayrılmış ortamın düğüm takımı her değiştiğinde (paket değişikliği, ek düğüm ekleme / çıkarma) değişiklik eski düğümler kapanmadan ÖNCE duyurulur: yeni düğümlerin adresleri belli olur olmaz (genellikle bir dakikadan kısa) ortam sahibine bildirim gider (Uyarılar kanalları, egress olayı), egress_change / pending_egress_ips alanlarında görünür. Onay adımı açıksa (PUT /cloud/containers/{id}/egress-approval, 1-72 saat, önerilen 24) yeni düğümler trafik almaz, eski düğümler çalışmaya devam eder; POST /cloud/containers/{id}/egress-change/approve ya da süre dolunca geçiş devam eder. Yalnız düğüm çıkarma onay beklemez.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

İstek gövdesi

AlanTürAçıklama
extra_nodes 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 PUT 'https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/nodes' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"extra_nodes": 1, "confirm": true}'
import os, uuid, requests

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

#GET/cloud/containers/{id}

Kapsayıcı ortamı ayrıntısı (namespace, iç adresleme, çıkış IP'leri)Kapsam: services_readgetContainerEnvironmentBu işlemin OpenAPI parçası

Ortam kodu, Kubernetes namespace adı, iç adresleme (cluster_dns), paket sınırları, düğümler, kota, giriş IP'leri ve güncel çıkış IP'leri. Ayrılmış ortamın çıkış IP'leri = kendi düğümlerinin IP'leri + güncelleme sırasında kullanılan paylaşımlı havuz düğümü (yeni kopya yaklaşık bir dakika orada başlar, sonra düğümünüze döner). Sunucusuz = paylaşımlı yalıtılmış havuz düğümleri (havuz büyürse yeni adres eklenebilir). Gyro Pipeline derleme makineleri ayrı listelenir (build_ips). Düğümler değişince (paket değişimi, düğüm yenileme, havuz ölçeklemesi) liste değişir ve ortam sahibine bildirim gider (Uyarılar kanalları, egress olayı). IPv6 çıkışı yok; TCP 25 kapalı.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

Yanıtlar

200OK — data: ContainerEnvironment
404Not found — also returned for objects owned by someone else

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/containers/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
# veri kaynağı gyro_container_environment: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/data-sources/container_environment
data "gyro_container_environment" "app" {
  service_id = 12345
}

# Egress IPs: put them on the IP allow list of an external service (database, payment provider, partner API).
# They change when the environment's nodes change; the owner is notified and this list is always current.
output "egress_ips" {
  value = data.gyro_container_environment.app.egress_ips
}

# Other services of the same environment reach a service at <service>.<namespace>.svc.cluster.local:80 (or <service>:80).
output "api_internal_url" {
  value = "http://api.${data.gyro_container_environment.app.service_domain}"
}
import os, uuid, requests

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

Kapsayıcı ortamını sil (ön ödemeli)Kapsam: cloud_deletedeleteContainerEnvironmentBu işlemin OpenAPI parçası

Paneldeki Harcamalar > Sil ile aynı: saatlik ücret hemen durur, ortam tüm servis, düğüm, imaj deposu, pipeline ve özel alan adı bağlarıyla hemen silinir (saklama süresi yok). "confirm": true (gövde ya da sorgu) ve Idempotency-Key başlığı gerekir; tekrar çağrı 202 deleted döner. Faturalı ortamlar 409 not_prepaid. Terraform: gyro_container_environment silinince bu çağrılır.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
Idempotency-Key zorunluheaderstring
confirmqueryboolean

İstek gövdesi

AlanTürAçıklama
confirmboolean

Yanıtlar

202Deleting — data: object
400idempotency_key_required
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/containers/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"confirm": true}'
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
h["Idempotency-Key"] = str(uuid.uuid4())
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345", 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/containers/12345", {
  method: "DELETE",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({"confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#GET/cloud/containers/{id}/egress-ips

Kapsayıcı ortamının çıkış IP'leriKapsam: services_readgetContainerEgressIpsBu işlemin OpenAPI parçası

Kapsayıcıların internete çıktığı güncel IPv4 adresleri - harici bir servisin IP beyaz listesine ekleyin. Ayrılmış ortamın çıkış IP'leri = kendi düğümlerinin IP'leri + güncelleme sırasında kullanılan paylaşımlı havuz düğümü (yeni kopya yaklaşık bir dakika orada başlar, sonra düğümünüze döner). Sunucusuz = paylaşımlı yalıtılmış havuz düğümleri (havuz büyürse yeni adres eklenebilir). Gyro Pipeline derleme makineleri ayrı listelenir (build_ips). Düğümler değişince (paket değişimi, düğüm yenileme, havuz ölçeklemesi) liste değişir ve ortam sahibine bildirim gider (Uyarılar kanalları, egress olayı). IPv6 çıkışı yok; TCP 25 kapalı.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

Yanıtlar

200OK — data: object
404Not found — also returned for objects owned by someone else

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/egress-ips' \
  -H "Authorization: Bearer $GYRO_TOKEN"
# veri kaynağı gyro_container_environment: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/data-sources/container_environment
data "gyro_container_environment" "app" {
  service_id = 12345
}

# Egress IPs: put them on the IP allow list of an external service (database, payment provider, partner API).
# They change when the environment's nodes change; the owner is notified and this list is always current.
output "egress_ips" {
  value = data.gyro_container_environment.app.egress_ips
}

# Other services of the same environment reach a service at <service>.<namespace>.svc.cluster.local:80 (or <service>:80).
output "api_internal_url" {
  value = "http://api.${data.gyro_container_environment.app.service_domain}"
}
import os, uuid, requests

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

#GET/cloud/containers/{id}/events

Son uyarılarKapsam: services_readtyped_get_containers__id__eventsBu işlemin OpenAPI parçası

Ortamın son 50 platform uyarısı.

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/containers/12345/events' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro container events 12345
import os, uuid, requests

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

Çıkış IP değişikliği onay adımıKapsam: services_writesetContainerEgressApprovalBu işlemin OpenAPI parçası

hours 1-72 onay adımını açar (önerilen 24), 0 kapatır. Ayrılmış ortamın düğüm takımı her değiştiğinde (paket değişikliği, ek düğüm ekleme / çıkarma) değişiklik eski düğümler kapanmadan ÖNCE duyurulur: yeni düğümlerin adresleri belli olur olmaz (genellikle bir dakikadan kısa) ortam sahibine bildirim gider (Uyarılar kanalları, egress olayı), egress_change / pending_egress_ips alanlarında görünür. Onay adımı açıksa (PUT /cloud/containers/{id}/egress-approval, 1-72 saat, önerilen 24) yeni düğümler trafik almaz, eski düğümler çalışmaya devam eder; POST /cloud/containers/{id}/egress-change/approve ya da süre dolunca geçiş devam eder. Yalnız düğüm çıkarma onay beklemez.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

İstek gövdesi

AlanTürAçıklama
hours 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 PUT 'https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/egress-approval' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"hours": 24, "confirm": true}'
import os, uuid, requests

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

#POST/cloud/containers/{id}/egress-change/approve

Bekleyen çıkış IP değişikliğini onaylaKapsam: services_writeapproveContainerEgressChangeBu işlemin OpenAPI parçası

Şimdi devam et: yeni düğümler trafik almaya başlar, eskiler boşaltılıp kaldırılır. id (isteğe bağlı) egress_change.id ile aynı olmalı (yenisi geldiyse 409 change_mismatch). 409 no_pending_change / change_preparing. Ayrılmış ortamın düğüm takımı her değiştiğinde (paket değişikliği, ek düğüm ekleme / çıkarma) değişiklik eski düğümler kapanmadan ÖNCE duyurulur: yeni düğümlerin adresleri belli olur olmaz (genellikle bir dakikadan kısa) ortam sahibine bildirim gider (Uyarılar kanalları, egress olayı), egress_change / pending_egress_ips alanlarında görünür. Onay adımı açıksa (PUT /cloud/containers/{id}/egress-approval, 1-72 saat, önerilen 24) yeni düğümler trafik almaz, eski düğümler çalışmaya devam eder; POST /cloud/containers/{id}/egress-change/approve ya da süre dolunca geçiş devam eder. Yalnız düğüm çıkarma onay beklemez.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

İstek gövdesi

AlanTürAçıklama
idstring
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/containers/12345/egress-change/approve' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"id": "string", "confirm": true}'
import os, uuid, requests

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

#PUT/cloud/containers/{id}/external-registry

Harici özel depo bilgisiKapsam: services_writetyped_put_containers__id__external_registryBu işlemin OpenAPI parçası

Ortam başına bir özel depo (ör. ghcr.io + yalnız çekme izinli token). Token şifreli saklanır, geri dönmez.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

İstek gövdesi

AlanTürAçıklama
server zorunlustring
username zorunlustring
password zorunlustring
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/containers/12345/external-registry' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"server": "string", "username": "string", "password": "string", "confirm": true}'
gyro container external-registry set 12345 --help    # tüm seçenekler
import os, uuid, requests

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

#DELETE/cloud/containers/{id}/external-registry

Özel depo bilgisini silKapsam: services_writetyped_delete_containers__id__external_registryBu işlemin OpenAPI parçası

Özel imajlar artık çekilemez. "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/containers/12345/external-registry' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro container external-registry delete 12345 --help    # tüm seçenekler
import os, uuid, requests

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

Ortamın Gyro imaj deposuKapsam: services_readtyped_get_containers__id__registryBu işlemin OpenAPI parçası

Depo adresi, imaj öneki <host>/<kod>/, kullanıcı adı, kullanım (2 GB ücretsiz, üst sınır 50 GB), gönderim izni ve temizlik ayarı. Yalnız bu ortam kendi depolarına erişir. 2 GB üstü GB başına aylık 0,05 € (saatlik bakiyeden). Parola yalnız POST .../registry/credentials ile döner.

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/containers/12345/registry' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro container registry get 12345
import os, uuid, requests

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

Depo parolasıKapsam: services_writetyped_post_containers__id__registry_credentialsBu işlemin OpenAPI parçası

docker login için kullanıcı adı ve parola.

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/containers/12345/registry/credentials' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro container registry credentials 12345 --help    # tüm seçenekler
import os, uuid, requests

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

#POST/cloud/containers/{id}/registry/rotate

Depo parolasını yenileKapsam: services_writetyped_post_containers__id__registry_rotateBu işlemin OpenAPI parçası

Eski parola hemen geçersiz olur; çalışan servisler etkilenmez. "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 POST 'https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/registry/rotate' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro container registry rotate 12345 --help    # tüm seçenekler
import os, uuid, requests

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

#PUT/cloud/containers/{id}/registry/policy

İmaj temizlik ayarıKapsam: services_writetyped_put_containers__id__registry_policyBu işlemin OpenAPI parçası

enabled, keep 1-50 (varsayılan 10), untagged_days 1-90 (varsayılan 7).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

İstek gövdesi

AlanTürAçıklama
enabledboolean
keepinteger
untagged_daysinteger
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/containers/12345/registry/policy' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"enabled": true, "keep": 1, "untagged_days": 1, "confirm": true}'
gyro container registry policy 12345 --help    # tüm seçenekler
import os, uuid, requests

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

#GET/cloud/containers/{id}/registry/images

Depodaki imajlarKapsam: services_readtyped_get_containers__id__registry_imagesBu işlemin OpenAPI parçası

images: depo, etiket, boyut, tarih, kullanımda mı; total_bytes.

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/containers/12345/registry/images' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro container registry images 12345
# kaynak gyro_container_image: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_image
# Copy an image into the environment's private Gyro registry (no docker push), then run it.
resource "gyro_container_image" "web" {
  service_id = 12345 # container environment (gyro-ecs-1)
  source     = "nginxinc/nginx-unprivileged:1.27-alpine"
  repo       = "web"
  tag        = "1.27"
}

# A private image: the token is used only for the copy (prefer a read-only token).
resource "gyro_container_image" "app" {
  service_id = 12345
  source     = "ghcr.io/gyro-ornek/uygulama:1.0"
  username   = "gyro-ornek"
  password   = var.ghcr_read_token
}

resource "gyro_container_service" "web" {
  service_id = 12345
  name       = "web"
  image      = gyro_container_image.web.image
  port       = 8080
  public     = true
}
import os, uuid, requests

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

İmaj etiketini silKapsam: services_writetyped_delete_containers__id__registry_imagesBu işlemin OpenAPI parçası

Sorgu repo ve tag. Bir servisin kullandığı imaj silinemez. "confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
repoquerystringRepository, e.g. web
tagquerystringTag, e.g. 1.4

İ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/containers/12345/registry/images' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro container registry image-delete 12345 --help    # tüm seçenekler
# kaynak gyro_container_image: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_image
# Copy an image into the environment's private Gyro registry (no docker push), then run it.
resource "gyro_container_image" "web" {
  service_id = 12345 # container environment (gyro-ecs-1)
  source     = "nginxinc/nginx-unprivileged:1.27-alpine"
  repo       = "web"
  tag        = "1.27"
}

# A private image: the token is used only for the copy (prefer a read-only token).
resource "gyro_container_image" "app" {
  service_id = 12345
  source     = "ghcr.io/gyro-ornek/uygulama:1.0"
  username   = "gyro-ornek"
  password   = var.ghcr_read_token
}

resource "gyro_container_service" "web" {
  service_id = 12345
  name       = "web"
  image      = gyro_container_image.web.image
  port       = 8080
  public     = true
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/registry/images", 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/containers/12345/registry/images", {
  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/containers/{id}/registry/imports

İmaj içe aktarmaları (ilerleme ve geçmiş)Kapsam: services_readlistContainerImageImportsBu işlemin OpenAPI parçası

active = süren içe aktarma (ya da null): phase, bayt ve katman ilerlemesi; jobs = son 20 içe aktarma (yeniden eskiye), başarısızsa error + message; limits.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerContainer environment (service) id

Yanıtlar

200OK — 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/containers/12345/registry/imports' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro container registry imports 12345
# kaynak gyro_container_image: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_image
# Copy an image into the environment's private Gyro registry (no docker push), then run it.
resource "gyro_container_image" "web" {
  service_id = 12345 # container environment (gyro-ecs-1)
  source     = "nginxinc/nginx-unprivileged:1.27-alpine"
  repo       = "web"
  tag        = "1.27"
}

# A private image: the token is used only for the copy (prefer a read-only token).
resource "gyro_container_image" "app" {
  service_id = 12345
  source     = "ghcr.io/gyro-ornek/uygulama:1.0"
  username   = "gyro-ornek"
  password   = var.ghcr_read_token
}

resource "gyro_container_service" "web" {
  service_id = 12345
  name       = "web"
  image      = gyro_container_image.web.image
  port       = 8080
  public     = true
}
import os, uuid, requests

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

Başka bir depodan imaj içe aktarKapsam: services_writeimportContainerImageBu işlemin OpenAPI parçası

Bir imajı (ör. nginx:1.27, ghcr.io/gyro-ornek/uygulama:1.0) docker push gerekmeden ortamın Gyro imaj deposuna kopyalar. Yalnız https depolar; çok mimarili imajlarda yalnız linux/amd64 kopyalanır. repo (varsayılan: kaynak adının son parçası) ve tag (varsayılan: kaynak etiketi) kopyanın adıdır; var olan ad:etiket için overwrite: true gerekir. Özel imaj: username + password (token) yalnız bu kopya için kullanılır, saklanmaz, geri dönmez, API günlüğünde karartılır. Arka planda çalışır: GET .../registry/imports ile izleyin. Sınırlar: ortam başına aynı anda 1 (409 import_running), saatte 10 (429 import_rate_limited), 15 dakika, 128 katman, boyut deponuzdaki boş alanı aşamaz. İç/özel/Gyro altyapı adreslerine çözülen kaynaklar reddedilir (source_blocked).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerContainer environment (service) id

İstek gövdesi

AlanTürAçıklama
source zorunlustringsource image (host/repo:tag or @sha256:...); docker.io when no host
repostringtarget name under your prefix (lowercase, max 3 levels)
tagstringtarget tag (default: source tag, latest for a digest)
usernamestringprivate source: username (not stored)
passwordstringprivate source: token / password (not stored, redacted in logs)
overwritebooleanreplace an existing name:tag

Yanıtlar

202OK — 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 ...)
429import_rate_limited

Örnekler

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/registry/imports' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"source": "ghcr.io/gyro-ornek/uygulama:1.0", "repo": "uygulama", "tag": "1.0"}'
gyro container registry import 12345 --help    # tüm seçenekler
# kaynak gyro_container_image: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_image
# Copy an image into the environment's private Gyro registry (no docker push), then run it.
resource "gyro_container_image" "web" {
  service_id = 12345 # container environment (gyro-ecs-1)
  source     = "nginxinc/nginx-unprivileged:1.27-alpine"
  repo       = "web"
  tag        = "1.27"
}

# A private image: the token is used only for the copy (prefer a read-only token).
resource "gyro_container_image" "app" {
  service_id = 12345
  source     = "ghcr.io/gyro-ornek/uygulama:1.0"
  username   = "gyro-ornek"
  password   = var.ghcr_read_token
}

resource "gyro_container_service" "web" {
  service_id = 12345
  name       = "web"
  image      = gyro_container_image.web.image
  port       = 8080
  public     = true
}
import os, uuid, requests

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

#GET/cloud/containers/{id}/pipelines

Pipeline'ları listeleKapsam: services_readpipeline_listBu işlemin OpenAPI parçası

Ortamın pipeline'ları (son çalıştırma ile), paket sınırları ve bu ayın derleme dakikası.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

Yanıtlar

200OK — 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/containers/12345/pipelines' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro container pipeline list 12345
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
  service_id = 12345 # container environment (gyro-ecs-1)
  name       = "web"
  repo       = "https://github.com/gyro-ornek/uygulama"
  token      = var.github_read_token # private repository only (read access)
  branch     = "main"
  tags       = "v*"
  image      = "web"
  targets    = ["web"]

  # multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
  build_target = "production"
  build_args   = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)

  # optional build step before the Dockerfile (tests ...); secrets are environment variables here
  build_image = "node:22-alpine"
  commands    = ["npm ci", "npm test"]
  secrets     = { NPM_TOKEN = var.npm_token }
}

# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
  value     = gyro_container_pipeline.web.webhook_secret
  sensitive = true
}

# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
  service_id = 12345
  name       = "api"
  repo       = "[email protected]:gyro-ornek/api.git"
  deploy_key = true
  image      = "api"
  targets    = ["api"]
}

# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }

# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
  service_id   = 12345
  name         = "site"
  git_provider = "archive"
  image        = "site"
  targets      = ["web"]
}
import os, uuid, requests

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

Pipeline oluşturKapsam: services_writepipeline_createBu işlemin OpenAPI parçası

Depoyu bağlar. Yanıtta webhook_url ve webhook_secret (yalnız burada ve GET .../webhook) vardır; ikisini deponun webhook ayarına ekleyin. Özel depo için token. provider archive değilse repo zorunludur (arşiv pipeline'ı yalnız yüklenen arşivi derler: POST .../uploads, ardından upload_id ile çalıştırma).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

İstek gövdesi

AlanTürAçıklama
name zorunlustringDisplay name (1-48)
providerstring (github, gitlab, gitea, git, archive)
repostringRequired for github / gitlab / gitea / git: https clone URL (no credentials) or SSH address git@host:org/repo.git / ssh://user@host[:port]/path (needs a deploy key). Leave it out for provider archive (an archive pipeline has no repository; a value sent with archive is ignored and the answer shows repo empty).
tokenstringRead-only access token for a private repository (stored encrypted, never returned; "-" on update removes it)
git_userstringUser name for the token (default: x-access-token / oauth2 / git)
branchstringBranches whose pushes build (comma separated globs, empty = none)
tagsstringTags that build (globs, e.g. v*)
autobooleanWebhook pushes start runs
repo_filebooleanRead gyro-pipeline.yml from the repository (GitHub, GitLab, Gitea)
image zorunlustringImage name in the environment registry (<registry>/<code>/<image>:<sha7> + :latest)
dockerfilestring
contextstringBuild folder (empty = repository root)
build_targetstringStage of a multi-stage Dockerfile to build (FROM node:20 AS production -> production, same as docker build --target). Empty = the last stage. Stage names are case-insensitive (stored lowercase). A stage the Dockerfile does not have fails the run with build_target_not_found. gyro-pipeline.yml: build_target: overrides it per run. CLI: --target (or --build-target).
targetsarray<string>Services that get the new image (empty = build only)
approvalbooleanWait for approval before deploying (24 h)
auto_rollbackbooleanRoll back when the new version is unhealthy
build_imagestringImage that runs commands (e.g. node:22-alpine)
commandsarray<string>Shell commands run in the repository root before the Dockerfile (tests, npm ci ...); build secrets are environment variables here
build_envobjectVariables for commands
build_argsobjectDockerfile ARG values (visible in the image history)
cpu_mintegerBuild CPU (millicores, plan limit)
memory_miintegerBuild memory (MiB, plan limit)
timeout_minintegerBuild time limit (minutes, plan limit)
verify_minintegerHealth wait after deploy (1-30 minutes)
notifyarray<string (failed, succeeded, approval, rolled_back)>Notifications (channels: the environment's alert settings)
confirmboolean

Yanıtlar

200OK — 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/containers/12345/pipelines' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "string", "provider": "github", "repo": "https://github.com/gyro-ornek/uygulama", "token": "string", "git_user": "string", "branch": "string", "tags": "string", "auto": true, "repo_file": true, "image": "string", "dockerfile": "string", "context": "string", "build_target": "production", "targets": ["string"], "approval": true, "auto_rollback": true, "build_image": "string", "commands": ["string"], "build_env": {}, "build_args": {}, "cpu_m": 1, "memory_mi": 1, "timeout_min": 1, "verify_min": 1, "notify": ["failed"], "confirm": true}'
gyro container pipeline create 12345 --help    # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
  service_id = 12345 # container environment (gyro-ecs-1)
  name       = "web"
  repo       = "https://github.com/gyro-ornek/uygulama"
  token      = var.github_read_token # private repository only (read access)
  branch     = "main"
  tags       = "v*"
  image      = "web"
  targets    = ["web"]

  # multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
  build_target = "production"
  build_args   = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)

  # optional build step before the Dockerfile (tests ...); secrets are environment variables here
  build_image = "node:22-alpine"
  commands    = ["npm ci", "npm test"]
  secrets     = { NPM_TOKEN = var.npm_token }
}

# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
  value     = gyro_container_pipeline.web.webhook_secret
  sensitive = true
}

# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
  service_id = 12345
  name       = "api"
  repo       = "[email protected]:gyro-ornek/api.git"
  deploy_key = true
  image      = "api"
  targets    = ["api"]
}

# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }

# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
  service_id   = 12345
  name         = "site"
  git_provider = "archive"
  image        = "site"
  targets      = ["web"]
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines", headers=h, json={"name": "string", "provider": "github", "repo": "https://github.com/gyro-ornek/uygulama", "token": "string", "git_user": "string", "branch": "string", "tags": "string", "auto": True, "repo_file": True, "image": "string", "dockerfile": "string", "context": "string", "build_target": "production", "targets": ["string"], "approval": True, "auto_rollback": True, "build_image": "string", "commands": ["string"], "build_env": {}, "build_args": {}, "cpu_m": 1, "memory_mi": 1, "timeout_min": 1, "verify_min": 1, "notify": ["failed"], "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"name": "string", "provider": "github", "repo": "https://github.com/gyro-ornek/uygulama", "token": "string", "git_user": "string", "branch": "string", "tags": "string", "auto": true, "repo_file": true, "image": "string", "dockerfile": "string", "context": "string", "build_target": "production", "targets": ["string"], "approval": true, "auto_rollback": true, "build_image": "string", "commands": ["string"], "build_env": {}, "build_args": {}, "cpu_m": 1, "memory_mi": 1, "timeout_min": 1, "verify_min": 1, "notify": ["failed"], "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#GET/cloud/containers/{id}/pipelines/{pipeline}

Pipeline'ı getirKapsam: services_readpipeline_getBu işlemin OpenAPI parçası

Ayarlar, webhook adresi, gizli değer adları (değerler dönmez).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
pipeline zorunlupathstringPipeline id (p + 8)

Yanıtlar

200OK — data: ContainerPipeline
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/containers/12345/pipelines/1' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro container pipeline get 12345
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
  service_id = 12345 # container environment (gyro-ecs-1)
  name       = "web"
  repo       = "https://github.com/gyro-ornek/uygulama"
  token      = var.github_read_token # private repository only (read access)
  branch     = "main"
  tags       = "v*"
  image      = "web"
  targets    = ["web"]

  # multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
  build_target = "production"
  build_args   = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)

  # optional build step before the Dockerfile (tests ...); secrets are environment variables here
  build_image = "node:22-alpine"
  commands    = ["npm ci", "npm test"]
  secrets     = { NPM_TOKEN = var.npm_token }
}

# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
  value     = gyro_container_pipeline.web.webhook_secret
  sensitive = true
}

# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
  service_id = 12345
  name       = "api"
  repo       = "[email protected]:gyro-ornek/api.git"
  deploy_key = true
  image      = "api"
  targets    = ["api"]
}

# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }

# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
  service_id   = 12345
  name         = "site"
  git_provider = "archive"
  image        = "site"
  targets      = ["web"]
}
import os, uuid, requests

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

Pipeline'ı değiştirKapsam: services_writepipeline_updateBu işlemin OpenAPI parçası

Yalnız değişecek alanları gönderin. token: yeni değer ya da silmek için "-".

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
pipeline zorunlupathstringPipeline id (p + 8)

İstek gövdesi

AlanTürAçıklama
namestringDisplay name (1-48)
providerstring (github, gitlab, gitea, git, archive)
repostringRequired for github / gitlab / gitea / git: https clone URL (no credentials) or SSH address git@host:org/repo.git / ssh://user@host[:port]/path (needs a deploy key). Leave it out for provider archive (an archive pipeline has no repository; a value sent with archive is ignored and the answer shows repo empty).
tokenstringRead-only access token for a private repository (stored encrypted, never returned; "-" on update removes it)
git_userstringUser name for the token (default: x-access-token / oauth2 / git)
branchstringBranches whose pushes build (comma separated globs, empty = none)
tagsstringTags that build (globs, e.g. v*)
autobooleanWebhook pushes start runs
repo_filebooleanRead gyro-pipeline.yml from the repository (GitHub, GitLab, Gitea)
imagestringImage name in the environment registry (<registry>/<code>/<image>:<sha7> + :latest)
dockerfilestring
contextstringBuild folder (empty = repository root)
build_targetstringStage of a multi-stage Dockerfile to build (FROM node:20 AS production -> production, same as docker build --target). Empty = the last stage. Stage names are case-insensitive (stored lowercase). A stage the Dockerfile does not have fails the run with build_target_not_found. gyro-pipeline.yml: build_target: overrides it per run. CLI: --target (or --build-target).
targetsarray<string>Services that get the new image (empty = build only)
approvalbooleanWait for approval before deploying (24 h)
auto_rollbackbooleanRoll back when the new version is unhealthy
build_imagestringImage that runs commands (e.g. node:22-alpine)
commandsarray<string>Shell commands run in the repository root before the Dockerfile (tests, npm ci ...); build secrets are environment variables here
build_envobjectVariables for commands
build_argsobjectDockerfile ARG values (visible in the image history)
cpu_mintegerBuild CPU (millicores, plan limit)
memory_miintegerBuild memory (MiB, plan limit)
timeout_minintegerBuild time limit (minutes, plan limit)
verify_minintegerHealth wait after deploy (1-30 minutes)
notifyarray<string (failed, succeeded, approval, rolled_back)>Notifications (channels: the environment's alert settings)
confirmboolean

Yanıtlar

200OK — 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/containers/12345/pipelines/1' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "string", "provider": "github", "repo": "https://github.com/gyro-ornek/uygulama", "token": "string", "git_user": "string", "branch": "string", "tags": "string", "auto": true, "repo_file": true, "image": "string", "dockerfile": "string", "context": "string", "build_target": "production", "targets": ["string"], "approval": true, "auto_rollback": true, "build_image": "string", "commands": ["string"], "build_env": {}, "build_args": {}, "cpu_m": 1, "memory_mi": 1, "timeout_min": 1, "verify_min": 1, "notify": ["failed"], "confirm": true}'
gyro container pipeline update 12345 --help    # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
  service_id = 12345 # container environment (gyro-ecs-1)
  name       = "web"
  repo       = "https://github.com/gyro-ornek/uygulama"
  token      = var.github_read_token # private repository only (read access)
  branch     = "main"
  tags       = "v*"
  image      = "web"
  targets    = ["web"]

  # multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
  build_target = "production"
  build_args   = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)

  # optional build step before the Dockerfile (tests ...); secrets are environment variables here
  build_image = "node:22-alpine"
  commands    = ["npm ci", "npm test"]
  secrets     = { NPM_TOKEN = var.npm_token }
}

# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
  value     = gyro_container_pipeline.web.webhook_secret
  sensitive = true
}

# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
  service_id = 12345
  name       = "api"
  repo       = "[email protected]:gyro-ornek/api.git"
  deploy_key = true
  image      = "api"
  targets    = ["api"]
}

# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }

# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
  service_id   = 12345
  name         = "site"
  git_provider = "archive"
  image        = "site"
  targets      = ["web"]
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.patch("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines/1", headers=h, json={"name": "string", "provider": "github", "repo": "https://github.com/gyro-ornek/uygulama", "token": "string", "git_user": "string", "branch": "string", "tags": "string", "auto": True, "repo_file": True, "image": "string", "dockerfile": "string", "context": "string", "build_target": "production", "targets": ["string"], "approval": True, "auto_rollback": True, "build_image": "string", "commands": ["string"], "build_env": {}, "build_args": {}, "cpu_m": 1, "memory_mi": 1, "timeout_min": 1, "verify_min": 1, "notify": ["failed"], "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines/1", {
  method: "PATCH",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"name": "string", "provider": "github", "repo": "https://github.com/gyro-ornek/uygulama", "token": "string", "git_user": "string", "branch": "string", "tags": "string", "auto": true, "repo_file": true, "image": "string", "dockerfile": "string", "context": "string", "build_target": "production", "targets": ["string"], "approval": true, "auto_rollback": true, "build_image": "string", "commands": ["string"], "build_env": {}, "build_args": {}, "cpu_m": 1, "memory_mi": 1, "timeout_min": 1, "verify_min": 1, "notify": ["failed"], "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#DELETE/cloud/containers/{id}/pipelines/{pipeline}

Pipeline'ı silKapsam: services_writepipeline_deleteBu işlemin OpenAPI parçası

Süren çalıştırmalarını durdurur; geçmişini, webhook anahtarını, belirteci ve gizli değerlerini siler. İmajlar depoda kalır. "confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
pipeline zorunlupathstringPipeline id (p + 8)

İstek gövdesi

AlanTürAçıklama
confirmboolean

Yanıtlar

200OK — 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/containers/12345/pipelines/1' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro container pipeline delete 12345 --help    # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
  service_id = 12345 # container environment (gyro-ecs-1)
  name       = "web"
  repo       = "https://github.com/gyro-ornek/uygulama"
  token      = var.github_read_token # private repository only (read access)
  branch     = "main"
  tags       = "v*"
  image      = "web"
  targets    = ["web"]

  # multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
  build_target = "production"
  build_args   = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)

  # optional build step before the Dockerfile (tests ...); secrets are environment variables here
  build_image = "node:22-alpine"
  commands    = ["npm ci", "npm test"]
  secrets     = { NPM_TOKEN = var.npm_token }
}

# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
  value     = gyro_container_pipeline.web.webhook_secret
  sensitive = true
}

# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
  service_id = 12345
  name       = "api"
  repo       = "[email protected]:gyro-ornek/api.git"
  deploy_key = true
  image      = "api"
  targets    = ["api"]
}

# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }

# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
  service_id   = 12345
  name         = "site"
  git_provider = "archive"
  image        = "site"
  targets      = ["web"]
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines/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/containers/12345/pipelines/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/containers/{id}/pipelines/{pipeline}/webhook

Webhook adresi ve gizli anahtarKapsam: services_readpipeline_webhookBu işlemin OpenAPI parçası

webhook_url ve webhook_secret döner.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
pipeline zorunlupathstringPipeline id (p + 8)

Yanıtlar

200OK — 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/containers/12345/pipelines/1/webhook' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro container pipeline webhook 12345
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
  service_id = 12345 # container environment (gyro-ecs-1)
  name       = "web"
  repo       = "https://github.com/gyro-ornek/uygulama"
  token      = var.github_read_token # private repository only (read access)
  branch     = "main"
  tags       = "v*"
  image      = "web"
  targets    = ["web"]

  # multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
  build_target = "production"
  build_args   = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)

  # optional build step before the Dockerfile (tests ...); secrets are environment variables here
  build_image = "node:22-alpine"
  commands    = ["npm ci", "npm test"]
  secrets     = { NPM_TOKEN = var.npm_token }
}

# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
  value     = gyro_container_pipeline.web.webhook_secret
  sensitive = true
}

# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
  service_id = 12345
  name       = "api"
  repo       = "[email protected]:gyro-ornek/api.git"
  deploy_key = true
  image      = "api"
  targets    = ["api"]
}

# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }

# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
  service_id   = 12345
  name         = "site"
  git_provider = "archive"
  image        = "site"
  targets      = ["web"]
}
import os, uuid, requests

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

Webhook gizli anahtarını yenileKapsam: services_writepipeline_rotate_secretBu işlemin OpenAPI parçası

Eski anahtar hemen geçersiz olur: depodaki webhook'u güncelleyin. "confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
pipeline zorunlupathstringPipeline id (p + 8)

İstek gövdesi

AlanTürAçıklama
confirmboolean

Yanıtlar

200OK — 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/containers/12345/pipelines/1/webhook/rotate' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro container pipeline rotate-secret 12345 --help    # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
  service_id = 12345 # container environment (gyro-ecs-1)
  name       = "web"
  repo       = "https://github.com/gyro-ornek/uygulama"
  token      = var.github_read_token # private repository only (read access)
  branch     = "main"
  tags       = "v*"
  image      = "web"
  targets    = ["web"]

  # multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
  build_target = "production"
  build_args   = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)

  # optional build step before the Dockerfile (tests ...); secrets are environment variables here
  build_image = "node:22-alpine"
  commands    = ["npm ci", "npm test"]
  secrets     = { NPM_TOKEN = var.npm_token }
}

# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
  value     = gyro_container_pipeline.web.webhook_secret
  sensitive = true
}

# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
  service_id = 12345
  name       = "api"
  repo       = "[email protected]:gyro-ornek/api.git"
  deploy_key = true
  image      = "api"
  targets    = ["api"]
}

# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }

# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
  service_id   = 12345
  name         = "site"
  git_provider = "archive"
  image        = "site"
  targets      = ["web"]
}
import os, uuid, requests

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

#POST/cloud/containers/{id}/pipelines/{pipeline}/test

Depo erişimini test etKapsam: services_writepipeline_testBu işlemin OpenAPI parçası

Kayıtlı belirteçle dalları ve etiketleri okur.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
pipeline zorunlupathstringPipeline id (p + 8)

İstek gövdesi

AlanTürAçıklama
confirmboolean

Yanıtlar

200OK — 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/containers/12345/pipelines/1/test' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro container pipeline test 12345 --help    # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
  service_id = 12345 # container environment (gyro-ecs-1)
  name       = "web"
  repo       = "https://github.com/gyro-ornek/uygulama"
  token      = var.github_read_token # private repository only (read access)
  branch     = "main"
  tags       = "v*"
  image      = "web"
  targets    = ["web"]

  # multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
  build_target = "production"
  build_args   = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)

  # optional build step before the Dockerfile (tests ...); secrets are environment variables here
  build_image = "node:22-alpine"
  commands    = ["npm ci", "npm test"]
  secrets     = { NPM_TOKEN = var.npm_token }
}

# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
  value     = gyro_container_pipeline.web.webhook_secret
  sensitive = true
}

# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
  service_id = 12345
  name       = "api"
  repo       = "[email protected]:gyro-ornek/api.git"
  deploy_key = true
  image      = "api"
  targets    = ["api"]
}

# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }

# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
  service_id   = 12345
  name         = "site"
  git_provider = "archive"
  image        = "site"
  targets      = ["web"]
}
import os, uuid, requests

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

#PUT/cloud/containers/{id}/pipelines/{pipeline}/secrets

Derleme gizli değeri ayarlaKapsam: services_writepipeline_secret_setBu işlemin OpenAPI parçası

set: {AD: değer}. Yalnız commands adımına ortam değişkeni olarak verilir, loglarda ****, geri dönmez.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
pipeline zorunlupathstringPipeline id (p + 8)

İstek gövdesi

AlanTürAçıklama
set zorunluobject
confirmboolean

Yanıtlar

200OK — 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/containers/12345/pipelines/1/secrets' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"set": {}, "confirm": true}'
gyro container pipeline secret set 12345 --help    # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
  service_id = 12345 # container environment (gyro-ecs-1)
  name       = "web"
  repo       = "https://github.com/gyro-ornek/uygulama"
  token      = var.github_read_token # private repository only (read access)
  branch     = "main"
  tags       = "v*"
  image      = "web"
  targets    = ["web"]

  # multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
  build_target = "production"
  build_args   = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)

  # optional build step before the Dockerfile (tests ...); secrets are environment variables here
  build_image = "node:22-alpine"
  commands    = ["npm ci", "npm test"]
  secrets     = { NPM_TOKEN = var.npm_token }
}

# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
  value     = gyro_container_pipeline.web.webhook_secret
  sensitive = true
}

# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
  service_id = 12345
  name       = "api"
  repo       = "[email protected]:gyro-ornek/api.git"
  deploy_key = true
  image      = "api"
  targets    = ["api"]
}

# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }

# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
  service_id   = 12345
  name         = "site"
  git_provider = "archive"
  image        = "site"
  targets      = ["web"]
}
import os, uuid, requests

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

#DELETE/cloud/containers/{id}/pipelines/{pipeline}/secrets/{secret}

Derleme gizli değerini silKapsam: services_writepipeline_secret_deleteBu işlemin OpenAPI parçası

"confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
pipeline zorunlupathstringPipeline id (p + 8)
secret zorunlupathstringBuild secret name

İstek gövdesi

AlanTürAçıklama
confirmboolean

Yanıtlar

200OK — 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/containers/12345/pipelines/1/secrets/1' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro container pipeline secret delete 12345 --help    # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
  service_id = 12345 # container environment (gyro-ecs-1)
  name       = "web"
  repo       = "https://github.com/gyro-ornek/uygulama"
  token      = var.github_read_token # private repository only (read access)
  branch     = "main"
  tags       = "v*"
  image      = "web"
  targets    = ["web"]

  # multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
  build_target = "production"
  build_args   = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)

  # optional build step before the Dockerfile (tests ...); secrets are environment variables here
  build_image = "node:22-alpine"
  commands    = ["npm ci", "npm test"]
  secrets     = { NPM_TOKEN = var.npm_token }
}

# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
  value     = gyro_container_pipeline.web.webhook_secret
  sensitive = true
}

# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
  service_id = 12345
  name       = "api"
  repo       = "[email protected]:gyro-ornek/api.git"
  deploy_key = true
  image      = "api"
  targets    = ["api"]
}

# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }

# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
  service_id   = 12345
  name         = "site"
  git_provider = "archive"
  image        = "site"
  targets      = ["web"]
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines/1/secrets/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/containers/12345/pipelines/1/secrets/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/containers/{id}/pipelines/{pipeline}/runs

Pipeline çalıştırmalarıKapsam: services_readpipeline_runsBu işlemin OpenAPI parçası

Son 50 çalıştırma, yeniden eskiye.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
pipeline zorunlupathstringPipeline id (p + 8)

Yanıtlar

200OK — 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/containers/12345/pipelines/1/runs' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro container pipeline runs 12345
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
  service_id = 12345 # container environment (gyro-ecs-1)
  name       = "web"
  repo       = "https://github.com/gyro-ornek/uygulama"
  token      = var.github_read_token # private repository only (read access)
  branch     = "main"
  tags       = "v*"
  image      = "web"
  targets    = ["web"]

  # multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
  build_target = "production"
  build_args   = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)

  # optional build step before the Dockerfile (tests ...); secrets are environment variables here
  build_image = "node:22-alpine"
  commands    = ["npm ci", "npm test"]
  secrets     = { NPM_TOKEN = var.npm_token }
}

# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
  value     = gyro_container_pipeline.web.webhook_secret
  sensitive = true
}

# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
  service_id = 12345
  name       = "api"
  repo       = "[email protected]:gyro-ornek/api.git"
  deploy_key = true
  image      = "api"
  targets    = ["api"]
}

# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }

# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
  service_id   = 12345
  name         = "site"
  git_provider = "archive"
  image        = "site"
  targets      = ["web"]
}
import os, uuid, requests

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

Çalıştırma başlatKapsam: services_writepipeline_runBu işlemin OpenAPI parçası

ref: dal (main), etiket (tag:v1.2.0) ya da tam ref; sha: isteğe bağlı 40 karakter commit. İkisi yoksa kuraldaki ilk dal derlenir. upload_id verilirse yüklenen arşiv derlenir (arşivlerde gyro-pipeline.yml okunmaz).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
pipeline zorunlupathstringPipeline id (p + 8)

İstek gövdesi

AlanTürAçıklama
refstring
shastring
confirmboolean
upload_idstringBuild an uploaded archive (from POST .../uploads) instead of a git ref
archive_namestringShown in the run list

Yanıtlar

200OK — 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/containers/12345/pipelines/1/runs' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ref": "main", "sha": "string", "confirm": true, "upload_id": "u3k9x0abc12de", "archive_name": "site.tar.gz"}'
gyro container pipeline run 12345 --help    # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
  service_id = 12345 # container environment (gyro-ecs-1)
  name       = "web"
  repo       = "https://github.com/gyro-ornek/uygulama"
  token      = var.github_read_token # private repository only (read access)
  branch     = "main"
  tags       = "v*"
  image      = "web"
  targets    = ["web"]

  # multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
  build_target = "production"
  build_args   = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)

  # optional build step before the Dockerfile (tests ...); secrets are environment variables here
  build_image = "node:22-alpine"
  commands    = ["npm ci", "npm test"]
  secrets     = { NPM_TOKEN = var.npm_token }
}

# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
  value     = gyro_container_pipeline.web.webhook_secret
  sensitive = true
}

# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
  service_id = 12345
  name       = "api"
  repo       = "[email protected]:gyro-ornek/api.git"
  deploy_key = true
  image      = "api"
  targets    = ["api"]
}

# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }

# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
  service_id   = 12345
  name         = "site"
  git_provider = "archive"
  image        = "site"
  targets      = ["web"]
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines/1/runs", headers=h, json={"ref": "main", "sha": "string", "confirm": True, "upload_id": "u3k9x0abc12de", "archive_name": "site.tar.gz"}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines/1/runs", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"ref": "main", "sha": "string", "confirm": true, "upload_id": "u3k9x0abc12de", "archive_name": "site.tar.gz"}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#GET/cloud/containers/{id}/pipeline-runs/{run}

Çalıştırmayı getirKapsam: services_readpipeline_run_getBu işlemin OpenAPI parçası

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
run zorunlupathstringRun id

Yanıtlar

200OK — data: ContainerPipelineRun
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/containers/12345/pipeline-runs/1' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro container pipeline run-get 12345
import os, uuid, requests

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

#GET/cloud/containers/{id}/pipeline-runs/{run}/logs

Çalıştırma loguKapsam: services_readpipeline_logsBu işlemin OpenAPI parçası

Derlenirken canlı, sonra kayıtlı (en çok 512 KB). tail: son N satır.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
run zorunlupathstringRun id
tailqueryintegerlast N lines (default 3000)

Yanıtlar

200OK — 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/containers/12345/pipeline-runs/1/logs' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro container pipeline logs 12345
import os, uuid, requests

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

Çalıştırmayı durdurKapsam: services_writepipeline_cancelBu işlemin OpenAPI parçası

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
run zorunlupathstringRun id

İstek gövdesi

AlanTürAçıklama
confirmboolean

Yanıtlar

200OK — 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/containers/12345/pipeline-runs/1/cancel' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro container pipeline cancel 12345 --help    # tüm seçenekler
import os, uuid, requests

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

#POST/cloud/containers/{id}/pipeline-runs/{run}/approve

Dağıtımı onaylaKapsam: services_writepipeline_approveBu işlemin OpenAPI parçası

Yalnız awaiting_approval durumundaki çalıştırma.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
run zorunlupathstringRun id

İstek gövdesi

AlanTürAçıklama
confirmboolean

Yanıtlar

200OK — 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/containers/12345/pipeline-runs/1/approve' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro container pipeline approve 12345 --help    # tüm seçenekler
import os, uuid, requests

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

#POST/cloud/containers/{id}/pipeline-runs/{run}/reject

Dağıtımı reddetKapsam: services_writepipeline_rejectBu işlemin OpenAPI parçası

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
run zorunlupathstringRun id

İstek gövdesi

AlanTürAçıklama
confirmboolean

Yanıtlar

200OK — 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/containers/12345/pipeline-runs/1/reject' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro container pipeline reject 12345 --help    # tüm seçenekler
import os, uuid, requests

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

#POST/cloud/containers/{id}/pipeline-runs/{run}/redeploy

Bu çalıştırmanın imajını yeniden dağıt (geri dönüş)Kapsam: services_writepipeline_redeployBu işlemin OpenAPI parçası

Önceki bir çalıştırmanın imajını hedef servislere dağıtan yeni çalıştırma başlatır. "confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
run zorunlupathstringRun id

İstek gövdesi

AlanTürAçıklama
targetsarray<string>
confirmboolean

Yanıtlar

200OK — 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/containers/12345/pipeline-runs/1/redeploy' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"targets": ["string"], "confirm": true}'
gyro container pipeline redeploy 12345 --help    # tüm seçenekler
import os, uuid, requests

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

#POST/cloud/containers/{id}/pipelines/{pipeline}/uploads

Arşiv derlemesi için yükleme adresiKapsam: services_writepipeline_uploadBu işlemin OpenAPI parçası

15 dakika geçerli, tam size bayt için tek PUT adresi (url) döner (tar.gz / tgz / zip, en çok 200 MB; ör. curl -T site.tar.gz "<url>"). Sonra POST .../runs {"upload_id": ...} ile derleyin. Arşivler 24 saatte silinir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
pipeline zorunlupathstringPipeline id (p + 8)

İstek gövdesi

AlanTürAçıklama
size zorunluintegerarchive size in bytes (1 - 209715200)
confirmboolean

Yanıtlar

200OK — 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/containers/12345/pipelines/1/uploads' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"size": 1, "confirm": true}'
gyro container pipeline upload 12345 --help    # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
  service_id = 12345 # container environment (gyro-ecs-1)
  name       = "web"
  repo       = "https://github.com/gyro-ornek/uygulama"
  token      = var.github_read_token # private repository only (read access)
  branch     = "main"
  tags       = "v*"
  image      = "web"
  targets    = ["web"]

  # multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
  build_target = "production"
  build_args   = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)

  # optional build step before the Dockerfile (tests ...); secrets are environment variables here
  build_image = "node:22-alpine"
  commands    = ["npm ci", "npm test"]
  secrets     = { NPM_TOKEN = var.npm_token }
}

# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
  value     = gyro_container_pipeline.web.webhook_secret
  sensitive = true
}

# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
  service_id = 12345
  name       = "api"
  repo       = "[email protected]:gyro-ornek/api.git"
  deploy_key = true
  image      = "api"
  targets    = ["api"]
}

# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }

# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
  service_id   = 12345
  name         = "site"
  git_provider = "archive"
  image        = "site"
  targets      = ["web"]
}
import os, uuid, requests

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

#PUT/cloud/containers/{id}/pipelines/{pipeline}/deploy-key

SSH deploy key oluşturKapsam: services_writepipeline_deploy_key_createBu işlemin OpenAPI parçası

SSH deposu için ed25519 anahtar çifti üretir, yalnız açık anahtarı döner (depoya salt okuma deploy key olarak ekleyin). Özel anahtar şifreli saklanır, hiç dönmez. "rotate": true yeniler.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
pipeline zorunlupathstringPipeline id (p + 8)

İstek gövdesi

AlanTürAçıklama
rotateboolean
confirmboolean

Yanıtlar

200OK — 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/containers/12345/pipelines/1/deploy-key' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"rotate": true, "confirm": true}'
gyro container pipeline deploy-key create 12345 --help    # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
  service_id = 12345 # container environment (gyro-ecs-1)
  name       = "web"
  repo       = "https://github.com/gyro-ornek/uygulama"
  token      = var.github_read_token # private repository only (read access)
  branch     = "main"
  tags       = "v*"
  image      = "web"
  targets    = ["web"]

  # multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
  build_target = "production"
  build_args   = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)

  # optional build step before the Dockerfile (tests ...); secrets are environment variables here
  build_image = "node:22-alpine"
  commands    = ["npm ci", "npm test"]
  secrets     = { NPM_TOKEN = var.npm_token }
}

# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
  value     = gyro_container_pipeline.web.webhook_secret
  sensitive = true
}

# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
  service_id = 12345
  name       = "api"
  repo       = "[email protected]:gyro-ornek/api.git"
  deploy_key = true
  image      = "api"
  targets    = ["api"]
}

# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }

# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
  service_id   = 12345
  name         = "site"
  git_provider = "archive"
  image        = "site"
  targets      = ["web"]
}
import os, uuid, requests

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

#DELETE/cloud/containers/{id}/pipelines/{pipeline}/deploy-key

SSH deploy key'i silKapsam: services_writepipeline_deploy_key_deleteBu işlemin OpenAPI parçası

Pipeline SSH deposuna artık erişemez. "confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
pipeline zorunlupathstringPipeline id (p + 8)

İstek gövdesi

AlanTürAçıklama
confirmboolean

Yanıtlar

200OK — 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/containers/12345/pipelines/1/deploy-key' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro container pipeline deploy-key delete 12345 --help    # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
  service_id = 12345 # container environment (gyro-ecs-1)
  name       = "web"
  repo       = "https://github.com/gyro-ornek/uygulama"
  token      = var.github_read_token # private repository only (read access)
  branch     = "main"
  tags       = "v*"
  image      = "web"
  targets    = ["web"]

  # multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
  build_target = "production"
  build_args   = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)

  # optional build step before the Dockerfile (tests ...); secrets are environment variables here
  build_image = "node:22-alpine"
  commands    = ["npm ci", "npm test"]
  secrets     = { NPM_TOKEN = var.npm_token }
}

# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
  value     = gyro_container_pipeline.web.webhook_secret
  sensitive = true
}

# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
  service_id = 12345
  name       = "api"
  repo       = "[email protected]:gyro-ornek/api.git"
  deploy_key = true
  image      = "api"
  targets    = ["api"]
}

# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }

# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
  service_id   = 12345
  name         = "site"
  git_provider = "archive"
  image        = "site"
  targets      = ["web"]
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/containers/12345/pipelines/1/deploy-key", 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/containers/12345/pipelines/1/deploy-key", {
  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/containers/{id}/pipelines/{pipeline}/host-key

SSH sunucu anahtarıKapsam: services_readpipeline_host_key_scanBu işlemin OpenAPI parçası

Deponun SSH sunucusuna bağlanıp anahtar parmak izini döner. GitHub / GitLab / Bitbucket anahtarları sabittir. Diğer sunucularda parmak izini kendi kaydınızla karşılaştırıp PUT ile onaylayın.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
pipeline zorunlupathstringPipeline id (p + 8)

Yanıtlar

200OK — 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/containers/12345/pipelines/1/host-key' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro container pipeline host-key scan 12345
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
  service_id = 12345 # container environment (gyro-ecs-1)
  name       = "web"
  repo       = "https://github.com/gyro-ornek/uygulama"
  token      = var.github_read_token # private repository only (read access)
  branch     = "main"
  tags       = "v*"
  image      = "web"
  targets    = ["web"]

  # multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
  build_target = "production"
  build_args   = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)

  # optional build step before the Dockerfile (tests ...); secrets are environment variables here
  build_image = "node:22-alpine"
  commands    = ["npm ci", "npm test"]
  secrets     = { NPM_TOKEN = var.npm_token }
}

# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
  value     = gyro_container_pipeline.web.webhook_secret
  sensitive = true
}

# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
  service_id = 12345
  name       = "api"
  repo       = "[email protected]:gyro-ornek/api.git"
  deploy_key = true
  image      = "api"
  targets    = ["api"]
}

# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }

# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
  service_id   = 12345
  name         = "site"
  git_provider = "archive"
  image        = "site"
  targets      = ["web"]
}
import os, uuid, requests

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

SSH sunucu anahtarını onayla (ya da kaldır)Kapsam: services_writepipeline_host_key_trustBu işlemin OpenAPI parçası

fingerprint: doğruladığınız SHA256 parmak izi (sunucu yeniden taranır, aynısını göstermelidir); forget: true onayı kaldırır. Anahtar sonradan değişirse derleme durur.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
pipeline zorunlupathstringPipeline id (p + 8)

İstek gövdesi

AlanTürAçıklama
fingerprintstring
forgetboolean
confirmboolean

Yanıtlar

200OK — 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/containers/12345/pipelines/1/host-key' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"fingerprint": "SHA256:abc...", "forget": true, "confirm": true}'
gyro container pipeline host-key trust 12345 --help    # tüm seçenekler
# kaynak gyro_container_pipeline: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/container_pipeline
# Build the repository's Dockerfile on every push to main (or a v* tag) and roll the "web" service out to it.
resource "gyro_container_pipeline" "web" {
  service_id = 12345 # container environment (gyro-ecs-1)
  name       = "web"
  repo       = "https://github.com/gyro-ornek/uygulama"
  token      = var.github_read_token # private repository only (read access)
  branch     = "main"
  tags       = "v*"
  image      = "web"
  targets    = ["web"]

  # multi-stage Dockerfile: build the "production" stage (FROM node:20 AS production) instead of the last one
  build_target = "production"
  build_args   = { APP_VERSION = "1.2.0" } # Dockerfile ARG (not for secrets)

  # optional build step before the Dockerfile (tests ...); secrets are environment variables here
  build_image = "node:22-alpine"
  commands    = ["npm ci", "npm test"]
  secrets     = { NPM_TOKEN = var.npm_token }
}

# Add these to the repository: Settings > Webhooks (application/json, push event)
output "webhook_url" { value = gyro_container_pipeline.web.webhook_url }
output "webhook_secret" {
  value     = gyro_container_pipeline.web.webhook_secret
  sensitive = true
}

# Private repository over SSH: Gyro creates a read-only deploy key (the private key never leaves Gyro).
# GitHub / GitLab / Bitbucket host keys are pinned; for your own git server set ssh_host_fingerprint.
resource "gyro_container_pipeline" "api" {
  service_id = 12345
  name       = "api"
  repo       = "[email protected]:gyro-ornek/api.git"
  deploy_key = true
  image      = "api"
  targets    = ["api"]
}

# Add this to the repository: Settings > Deploy keys (read only)
output "deploy_key" { value = gyro_container_pipeline.api.deploy_key_public }

# Archive builds only (no repository): upload with the API (POST .../pipelines/{id}/uploads) and run with the upload id.
resource "gyro_container_pipeline" "site" {
  service_id   = 12345
  name         = "site"
  git_provider = "archive"
  image        = "site"
  targets      = ["web"]
}
import os, uuid, requests

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

#GET/cloud/containers/plans

Kapsayıcı ortam paketlerini listeleKapsam: cloud_readlistContainerPlansBu işlemin OpenAPI parçası

Sipariş edilebilir Gyro Kapsayıcı (ECS) ortam paketleri ve ön ödemeli fiyatlar. Paket = 1 ortam (size ayrılmış düğüm havuzu); max_services tanımlanabilecek en fazla uygulama, max_replicas servis başına en fazla kopya; hepsi havuzu paylaşır.

Yanıtlar

200OK — data: array<ContainerPlan>

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/containers/plans' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro container plans
import os, uuid, requests

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

Kapsayıcı ortamı oluştur (toplu)Kapsam: cloud_ordercreateContainerEnvironmentsBu işlemin OpenAPI parçası

Bir paketten 1..N ortamı TEK siparişte açar (quantity, varsayılan 1, istek başına en çok 25). Ön ödemeli: sipariş 0'dır, kullanım saatlik bakiyeden düşer; bakiye her ortamın ilk 24 saatini karşılamalıdır, yeni hesaplar ilk günlerde sınırlıdır. name ({n} ile) ve tags her ortamı adlandırır; project_id projeye koyar. Teklif için "dry_run": true; gerçek sipariş "confirm": true ve Idempotency-Key başlığı ister.

Parametreler

AlaninTürAçıklama
Idempotency-Key zorunluheaderstringUnique per logical request (e.g. a UUID). Replays within 24 hours return the stored answer.

İstek gövdesi

AlanTürAçıklama
planstringplan from GET /cloud/containers/plans (mini-1-1, small-1-2, starter, standart, pro, serverless)
product_idintegerproduct id instead of plan
quantityintegerenvironments to create in one order (--count), default 1, max 25
namestringname (nickname); {n} = number in a batch
tagsarray<string>tags (max 10)
project_idinteger | nullproject (0 = default project)
confirmboolean
dry_runboolean

Yanıtlar

200Dry-run quote
202Ordered; environments are being set up — data: object
403Key lacks the scope, IP not allowed, or feature disabled
422confirm_required | limit_exceeded (new-account limit of the prepaid cloud; details = LimitHint, raise it with a support ticket) | validation errors

Örnekler

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/containers' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"plan": "mini-1-1", "quantity": 3, "name": "gyro-ecs-{n}", "tags": ["gyro-test"], "confirm": true}'
gyro container create --help    # tüm seçenekler
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/containers", headers=h, json={"plan": "mini-1-1", "quantity": 3, "name": "gyro-ecs-{n}", "tags": ["gyro-test"], "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/containers", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({"plan": "mini-1-1", "quantity": 3, "name": "gyro-ecs-{n}", "tags": ["gyro-test"], "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);