OpenAPI Türkçe gyrohosting.com ↗

Create an S3 bucket and access key

Order Object Storage, create a bucket and a key, and connect any S3 client.

1. Order storage#

curl -s -X POST https://www.gyrohosting.com/api/v1/client/cloud/storage \
  -H "Authorization: Bearer $GYRO_TOKEN" -H "Content-Type: application/json" -H "Idempotency-Key: $(uuidgen)" \
  -d '{"plan":"standard-250gb","cycle":"monthly","name":"gyro-proje-s3","confirm":true}'
gyro s3 plans
gyro s3 create --plan standard-250gb --cycle monthly --name gyro-proje-s3 --yes
resource "gyro_storage" "s3" {
  plan  = "standard-250gb"
  cycle = "monthly"
  name  = "gyro-proje-s3"
}

2. Bucket and key#

curl -s -X POST https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" -d '{"bucket":"assets"}'
curl -s -X POST https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/keys -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" -d '{}'      # secret key is shown once
curl -s https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/connect -H "Authorization: Bearer $GYRO_TOKEN"   # endpoint, region
gyro s3 bucket create 12345 --bucket assets
gyro s3 key create 12345
gyro s3 connect 12345
resource "gyro_storage_bucket" "assets" {
  service_id = gyro_storage.s3.service_id
  name       = "assets"
}
resource "gyro_storage_key" "ci" {
  service_id = gyro_storage.s3.service_id
  label      = "ci-uploader"
}

Endpoint https://s3.gyrohosting.com, region tr-ist-1; path-style and virtual-host style both work. Static websites, CORS and object lock have their own endpoints under Object storage.