Hizmetlerinizi projelere ayırın (iş, müşteri ya da ortam başına). Her hizmet tek bir projededir; atanmamış hizmetler varsayılan projededir (id 0). Faturalar projeye göre bölünmez.
# kaynak gyro_project: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/project
# A project per business / client / environment. Destroying it only deletes the project:
# its services go back to the default project (id 0).
resource "gyro_project" "gyroproje" {
name = "Gyro Proje"
description = "Web + API + CDN"
color = "blue"
icon = "rocket-takeoff"
}
# New servers and load balancers can be ordered straight into a project.
resource "gyro_server" "web" {
plan = "standart-2-4"
region = "tr-ist-1"
image = "ubuntu-24.04"
confirm_order = true
project_id = tonumber(gyro_project.gyroproje.id)
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/projects", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/projects", {
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}`);
Hesap başına en çok 50 proje (409 project_limit). İsteğe bağlı service_ids hizmetleri hemen taşır. Yazma: anahtar başına dakikada 60 (429 rate_limited). Alt hesap anahtarları proje oluşturamaz, yeniden adlandıramaz, silemez (403 subkey_forbidden).
İstek gövdesi
Alan
Tür
Açıklama
namezorunlu
string
Letter or digit first; then letters, digits, space and . _ - / + # & ( ). Unique per account (case-insensitive). Reserved: Genel, General, Default.
# kaynak gyro_project: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/project
# A project per business / client / environment. Destroying it only deletes the project:
# its services go back to the default project (id 0).
resource "gyro_project" "gyroproje" {
name = "Gyro Proje"
description = "Web + API + CDN"
color = "blue"
icon = "rocket-takeoff"
}
# New servers and load balancers can be ordered straight into a project.
resource "gyro_server" "web" {
plan = "standart-2-4"
region = "tr-ist-1"
image = "ubuntu-24.04"
confirm_order = true
project_id = tonumber(gyro_project.gyroproje.id)
}
# kaynak gyro_project: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/project
# A project per business / client / environment. Destroying it only deletes the project:
# its services go back to the default project (id 0).
resource "gyro_project" "gyroproje" {
name = "Gyro Proje"
description = "Web + API + CDN"
color = "blue"
icon = "rocket-takeoff"
}
# New servers and load balancers can be ordered straight into a project.
resource "gyro_server" "web" {
plan = "standart-2-4"
region = "tr-ist-1"
image = "ubuntu-24.04"
confirm_order = true
project_id = tonumber(gyro_project.gyroproje.id)
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/projects/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/projects/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}`);
name, description, color, icon alanlarından istediğinizi gönderin. Varsayılan proje değiştirilemez (409 default_project). Yazma: anahtar başına dakikada 60 (429 rate_limited). Alt hesap anahtarları proje oluşturamaz, yeniden adlandıramaz, silemez (403 subkey_forbidden).
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Project id (0 = default project)
İstek gövdesi
Alan
Tür
Açıklama
name
string
Letter or digit first; then letters, digits, space and . _ - / + # & ( ). Unique per account (case-insensitive). Reserved: Genel, General, Default.
# kaynak gyro_project: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/project
# A project per business / client / environment. Destroying it only deletes the project:
# its services go back to the default project (id 0).
resource "gyro_project" "gyroproje" {
name = "Gyro Proje"
description = "Web + API + CDN"
color = "blue"
icon = "rocket-takeoff"
}
# New servers and load balancers can be ordered straight into a project.
resource "gyro_server" "web" {
plan = "standart-2-4"
region = "tr-ist-1"
image = "ubuntu-24.04"
confirm_order = true
project_id = tonumber(gyro_project.gyroproje.id)
}
Yalnız proje silinir: hizmetleri varsayılan projeye döner, başka hiçbir şey değişmez. Yazma: anahtar başına dakikada 60 (429 rate_limited). Alt hesap anahtarları proje oluşturamaz, yeniden adlandıramaz, silemez (403 subkey_forbidden).
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Project id (0 = default project)
Yanıtlar
200
Deleted — data: object
409
default_project
401
Missing, invalid or revoked key
403
Key lacks the scope, IP not allowed, or feature disabled
404
Not found — also returned for objects owned by someone else
429
Too many requests (rate_limited); see the Retry-After and X-RateLimit-* headers
# kaynak gyro_project: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/project
# A project per business / client / environment. Destroying it only deletes the project:
# its services go back to the default project (id 0).
resource "gyro_project" "gyroproje" {
name = "Gyro Proje"
description = "Web + API + CDN"
color = "blue"
icon = "rocket-takeoff"
}
# New servers and load balancers can be ordered straight into a project.
resource "gyro_server" "web" {
plan = "standart-2-4"
region = "tr-ist-1"
image = "ubuntu-24.04"
confirm_order = true
project_id = tonumber(gyro_project.gyroproje.id)
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/projects/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/projects/12345", {
method: "DELETE",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);
Tüm numaralar anahtarın kapsamındaki hizmetleriniz olmalı, yoksa 404 service_not_found ve hiçbir şey taşınmaz. Çağrı başına en çok 500; id 0 = varsayılan proje. Alt hesap anahtarı project:move eylemi ister.
Parametreler
Alan
in
Tür
Açıklama
idzorunlu
path
integer
Project id (0 = default project)
İstek gövdesi
Alan
Tür
Açıklama
service_idszorunlu
array<integer>
Yanıtlar
200
Moved — data: object
401
Missing, invalid or revoked key
403
Key lacks the scope, IP not allowed, or feature disabled
404
Not found — also returned for objects owned by someone else
429
Too many requests (rate_limited); see the Retry-After and X-RateLimit-* headers
# kaynak gyro_project: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/project
# A project per business / client / environment. Destroying it only deletes the project:
# its services go back to the default project (id 0).
resource "gyro_project" "gyroproje" {
name = "Gyro Proje"
description = "Web + API + CDN"
color = "blue"
icon = "rocket-takeoff"
}
# New servers and load balancers can be ordered straight into a project.
resource "gyro_server" "web" {
plan = "standart-2-4"
region = "tr-ist-1"
image = "ubuntu-24.04"
confirm_order = true
project_id = tonumber(gyro_project.gyroproje.id)
}
gyro service project set 12345 --help # tüm seçenekler
# kaynak gyro_service_project: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/service_project
# Put any existing service (DNS, storage, mail, containers, VDS ...) into a project.
resource "gyro_service_project" "dns" {
service_id = 12345
project_id = tonumber(gyro_project.gyroproje.id)
}
import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.put("https://www.gyrohosting.com/api/v1/client/cloud/services/12345/project", headers=h, json={"project_id": 1}, timeout=60)
r.raise_for_status()
print(r.json()["data"])