curl --request POST \
--url https://compute.{region}.basaltic.sh/v1/instance-pools \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subnets": [
"<string>"
],
"name": "web-asg",
"template": {
"flavor": "<string>",
"architecture": "amd64",
"image": "<string>",
"addresses": [
{
"address": "<string>"
}
],
"security_groups": [
"<string>"
],
"floating_ip_assignment": "none",
"user_data": "aSDinaTvuI8gbWludGxpZnk=",
"metadata": {
"environment": "production",
"team": "backend"
},
"tags": {
"environment": "production",
"team": "backend"
},
"iam_role": "<string>",
"volumes": [
{
"size_gb": 20,
"boot": false,
"volume_type": "nvme",
"performance": {
"iops": 6000,
"throughput_mib_s": 250
},
"mount_path": "/data",
"fstype": "ext4",
"delete_on_termination": true
}
]
},
"description": "<string>",
"tags": {
"environment": "production",
"team": "backend"
},
"desired_count": 2,
"min_count": 1,
"max_count": 3
}
'import requests
url = "https://compute.{region}.basaltic.sh/v1/instance-pools"
payload = {
"subnets": ["<string>"],
"name": "web-asg",
"template": {
"flavor": "<string>",
"architecture": "amd64",
"image": "<string>",
"addresses": [{ "address": "<string>" }],
"security_groups": ["<string>"],
"floating_ip_assignment": "none",
"user_data": "aSDinaTvuI8gbWludGxpZnk=",
"metadata": {
"environment": "production",
"team": "backend"
},
"tags": {
"environment": "production",
"team": "backend"
},
"iam_role": "<string>",
"volumes": [
{
"size_gb": 20,
"boot": False,
"volume_type": "nvme",
"performance": {
"iops": 6000,
"throughput_mib_s": 250
},
"mount_path": "/data",
"fstype": "ext4",
"delete_on_termination": True
}
]
},
"description": "<string>",
"tags": {
"environment": "production",
"team": "backend"
},
"desired_count": 2,
"min_count": 1,
"max_count": 3
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subnets: ['<string>'],
name: 'web-asg',
template: {
flavor: '<string>',
architecture: 'amd64',
image: '<string>',
addresses: [{address: '<string>'}],
security_groups: ['<string>'],
floating_ip_assignment: 'none',
user_data: 'aSDinaTvuI8gbWludGxpZnk=',
metadata: {environment: 'production', team: 'backend'},
tags: {environment: 'production', team: 'backend'},
iam_role: '<string>',
volumes: [
{
size_gb: 20,
boot: false,
volume_type: 'nvme',
performance: {iops: 6000, throughput_mib_s: 250},
mount_path: '/data',
fstype: 'ext4',
delete_on_termination: true
}
]
},
description: '<string>',
tags: {environment: 'production', team: 'backend'},
desired_count: 2,
min_count: 1,
max_count: 3
})
};
fetch('https://compute.{region}.basaltic.sh/v1/instance-pools', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://compute.{region}.basaltic.sh/v1/instance-pools",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'subnets' => [
'<string>'
],
'name' => 'web-asg',
'template' => [
'flavor' => '<string>',
'architecture' => 'amd64',
'image' => '<string>',
'addresses' => [
[
'address' => '<string>'
]
],
'security_groups' => [
'<string>'
],
'floating_ip_assignment' => 'none',
'user_data' => 'aSDinaTvuI8gbWludGxpZnk=',
'metadata' => [
'environment' => 'production',
'team' => 'backend'
],
'tags' => [
'environment' => 'production',
'team' => 'backend'
],
'iam_role' => '<string>',
'volumes' => [
[
'size_gb' => 20,
'boot' => false,
'volume_type' => 'nvme',
'performance' => [
'iops' => 6000,
'throughput_mib_s' => 250
],
'mount_path' => '/data',
'fstype' => 'ext4',
'delete_on_termination' => true
]
]
],
'description' => '<string>',
'tags' => [
'environment' => 'production',
'team' => 'backend'
],
'desired_count' => 2,
'min_count' => 1,
'max_count' => 3
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://compute.{region}.basaltic.sh/v1/instance-pools"
payload := strings.NewReader("{\n \"subnets\": [\n \"<string>\"\n ],\n \"name\": \"web-asg\",\n \"template\": {\n \"flavor\": \"<string>\",\n \"architecture\": \"amd64\",\n \"image\": \"<string>\",\n \"addresses\": [\n {\n \"address\": \"<string>\"\n }\n ],\n \"security_groups\": [\n \"<string>\"\n ],\n \"floating_ip_assignment\": \"none\",\n \"user_data\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"metadata\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"iam_role\": \"<string>\",\n \"volumes\": [\n {\n \"size_gb\": 20,\n \"boot\": false,\n \"volume_type\": \"nvme\",\n \"performance\": {\n \"iops\": 6000,\n \"throughput_mib_s\": 250\n },\n \"mount_path\": \"/data\",\n \"fstype\": \"ext4\",\n \"delete_on_termination\": true\n }\n ]\n },\n \"description\": \"<string>\",\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"desired_count\": 2,\n \"min_count\": 1,\n \"max_count\": 3\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://compute.{region}.basaltic.sh/v1/instance-pools")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subnets\": [\n \"<string>\"\n ],\n \"name\": \"web-asg\",\n \"template\": {\n \"flavor\": \"<string>\",\n \"architecture\": \"amd64\",\n \"image\": \"<string>\",\n \"addresses\": [\n {\n \"address\": \"<string>\"\n }\n ],\n \"security_groups\": [\n \"<string>\"\n ],\n \"floating_ip_assignment\": \"none\",\n \"user_data\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"metadata\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"iam_role\": \"<string>\",\n \"volumes\": [\n {\n \"size_gb\": 20,\n \"boot\": false,\n \"volume_type\": \"nvme\",\n \"performance\": {\n \"iops\": 6000,\n \"throughput_mib_s\": 250\n },\n \"mount_path\": \"/data\",\n \"fstype\": \"ext4\",\n \"delete_on_termination\": true\n }\n ]\n },\n \"description\": \"<string>\",\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"desired_count\": 2,\n \"min_count\": 1,\n \"max_count\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://compute.{region}.basaltic.sh/v1/instance-pools")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subnets\": [\n \"<string>\"\n ],\n \"name\": \"web-asg\",\n \"template\": {\n \"flavor\": \"<string>\",\n \"architecture\": \"amd64\",\n \"image\": \"<string>\",\n \"addresses\": [\n {\n \"address\": \"<string>\"\n }\n ],\n \"security_groups\": [\n \"<string>\"\n ],\n \"floating_ip_assignment\": \"none\",\n \"user_data\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"metadata\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"iam_role\": \"<string>\",\n \"volumes\": [\n {\n \"size_gb\": 20,\n \"boot\": false,\n \"volume_type\": \"nvme\",\n \"performance\": {\n \"iops\": 6000,\n \"throughput_mib_s\": 250\n },\n \"mount_path\": \"/data\",\n \"fstype\": \"ext4\",\n \"delete_on_termination\": true\n }\n ]\n },\n \"description\": \"<string>\",\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"desired_count\": 2,\n \"min_count\": 1,\n \"max_count\": 3\n}"
response = http.request(request)
puts response.read_body{
"instance_pool": {
"subnets": [
{
"id": "288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"crn": "crn:catalog::platform:country/288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"name": "Brazil"
}
],
"vpc": {
"id": "288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"crn": "crn:catalog::platform:country/288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"name": "Brazil"
},
"faults": [
{
"code": "BACKUP_FAILED",
"severity": "error",
"message": "Backup upload failed.",
"details": {},
"first_at": "2023-11-07T05:31:56Z",
"last_at": "2023-11-07T05:31:56Z",
"occurrences": 1
}
],
"autoscaling": {
"enabled": true,
"metrics": [
{
"source": "telemetry",
"target_type": "average_value",
"target_value": 100,
"name": "queue_depth",
"labels": {
"queue": "orders"
},
"sample_aggregation": "last",
"series_aggregation": "sum",
"expected_series": 1,
"window_seconds": 120,
"max_age_seconds": 90
}
],
"warmup_seconds": 180,
"cooldown_seconds": 60,
"scale_down_stabilization_seconds": 300,
"max_scale_out_step": 4,
"max_scale_in_step": 1,
"drain_seconds": 120
},
"autoscaling_status": {
"status": "pending",
"reason": "waiting for sustained lower demand",
"history": [
{
"at": "2023-11-07T05:31:56Z",
"from": 1,
"to": 1,
"reason": "<string>"
}
],
"evaluated_at": "2023-11-07T05:31:56Z",
"last_scaled_at": "2023-11-07T05:31:56Z"
},
"rollout_surge": true,
"retiring_instances": [
{
"requested_at": "2023-11-07T05:31:56Z",
"drain_seconds": 1815,
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_acknowledged_at": "2023-11-07T05:31:56Z",
"drain_until": "2023-11-07T05:31:56Z"
}
],
"id": "8f2a1c3d-4e5b-4a6f-9c0d-1e2f3a4b5c6d",
"crn": "crn:compute:sa-saopaulo-1:my-account:instance-pool/web-pool",
"name": "web-asg",
"description": "Front-end autoscaling group",
"desired_count": 2,
"min_count": 1,
"max_count": 3,
"live_count": 2,
"member_count": 2,
"refresh_in_progress": false,
"stale_instance_count": 0,
"status": "active",
"managed_by": "customer",
"tags": {
"environment": "production",
"team": "backend"
},
"template": {
"security_groups": [
{
"id": "288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"crn": "crn:catalog::platform:country/288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"name": "Brazil"
}
],
"floating_ip_assignment": "none",
"iam_role": {
"id": "550e8400-e29b-41d4-a716-446655440005",
"crn": "crn:iam:::role/550e8400-e29b-41d4-a716-446655440005",
"name": "instance-role"
},
"flavor": {
"id": "550e8400-e29b-41d4-a716-446655440003",
"crn": "crn:compute:sa-saopaulo-1:platform:flavor/s1.small",
"name": "s1.small"
},
"image": {
"id": "550e8400-e29b-41d4-a716-446655440004",
"crn": "crn:compute:sa-saopaulo-1:platform:image/ubuntu/architecture/amd64/version/24.04",
"name": "ubuntu"
},
"addresses": [
{
"family": "ipv4",
"address": "<string>"
}
],
"user_data": "aSDinaTvuI8gbWludGxpZnk=",
"metadata": {
"environment": "production",
"team": "backend"
},
"tags": {
"environment": "production",
"team": "backend"
},
"volumes": [
{
"size_gb": 20,
"boot": false,
"volume_type": "nvme",
"performance": {
"iops": 6000,
"throughput_mib_s": 250
},
"mount_path": "/data",
"fstype": "ext4",
"delete_on_termination": true
}
]
}
}
}{
"error": {
"code": "INVALID_INPUT",
"message": "Invalid request parameters",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "ACCESS_DENIED",
"message": "You don't have permission to perform this action",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "CONFLICT",
"message": "Resource with this name already exists",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "IDEMPOTENCY_KEY_REUSED",
"message": "This Idempotency-Key was already used with a different request payload",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}Create an instance pool
Create a pool from a launch template and a desired count. The desired_count instances are spawned synchronously; a background reconciler then converges member_count toward desired_count as it’s changed. On create only, min_count/max_count default to desired_count.
The top-level tags label the pool itself; template.tags are stamped
on every instance it launches.
curl --request POST \
--url https://compute.{region}.basaltic.sh/v1/instance-pools \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subnets": [
"<string>"
],
"name": "web-asg",
"template": {
"flavor": "<string>",
"architecture": "amd64",
"image": "<string>",
"addresses": [
{
"address": "<string>"
}
],
"security_groups": [
"<string>"
],
"floating_ip_assignment": "none",
"user_data": "aSDinaTvuI8gbWludGxpZnk=",
"metadata": {
"environment": "production",
"team": "backend"
},
"tags": {
"environment": "production",
"team": "backend"
},
"iam_role": "<string>",
"volumes": [
{
"size_gb": 20,
"boot": false,
"volume_type": "nvme",
"performance": {
"iops": 6000,
"throughput_mib_s": 250
},
"mount_path": "/data",
"fstype": "ext4",
"delete_on_termination": true
}
]
},
"description": "<string>",
"tags": {
"environment": "production",
"team": "backend"
},
"desired_count": 2,
"min_count": 1,
"max_count": 3
}
'import requests
url = "https://compute.{region}.basaltic.sh/v1/instance-pools"
payload = {
"subnets": ["<string>"],
"name": "web-asg",
"template": {
"flavor": "<string>",
"architecture": "amd64",
"image": "<string>",
"addresses": [{ "address": "<string>" }],
"security_groups": ["<string>"],
"floating_ip_assignment": "none",
"user_data": "aSDinaTvuI8gbWludGxpZnk=",
"metadata": {
"environment": "production",
"team": "backend"
},
"tags": {
"environment": "production",
"team": "backend"
},
"iam_role": "<string>",
"volumes": [
{
"size_gb": 20,
"boot": False,
"volume_type": "nvme",
"performance": {
"iops": 6000,
"throughput_mib_s": 250
},
"mount_path": "/data",
"fstype": "ext4",
"delete_on_termination": True
}
]
},
"description": "<string>",
"tags": {
"environment": "production",
"team": "backend"
},
"desired_count": 2,
"min_count": 1,
"max_count": 3
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
subnets: ['<string>'],
name: 'web-asg',
template: {
flavor: '<string>',
architecture: 'amd64',
image: '<string>',
addresses: [{address: '<string>'}],
security_groups: ['<string>'],
floating_ip_assignment: 'none',
user_data: 'aSDinaTvuI8gbWludGxpZnk=',
metadata: {environment: 'production', team: 'backend'},
tags: {environment: 'production', team: 'backend'},
iam_role: '<string>',
volumes: [
{
size_gb: 20,
boot: false,
volume_type: 'nvme',
performance: {iops: 6000, throughput_mib_s: 250},
mount_path: '/data',
fstype: 'ext4',
delete_on_termination: true
}
]
},
description: '<string>',
tags: {environment: 'production', team: 'backend'},
desired_count: 2,
min_count: 1,
max_count: 3
})
};
fetch('https://compute.{region}.basaltic.sh/v1/instance-pools', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://compute.{region}.basaltic.sh/v1/instance-pools",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'subnets' => [
'<string>'
],
'name' => 'web-asg',
'template' => [
'flavor' => '<string>',
'architecture' => 'amd64',
'image' => '<string>',
'addresses' => [
[
'address' => '<string>'
]
],
'security_groups' => [
'<string>'
],
'floating_ip_assignment' => 'none',
'user_data' => 'aSDinaTvuI8gbWludGxpZnk=',
'metadata' => [
'environment' => 'production',
'team' => 'backend'
],
'tags' => [
'environment' => 'production',
'team' => 'backend'
],
'iam_role' => '<string>',
'volumes' => [
[
'size_gb' => 20,
'boot' => false,
'volume_type' => 'nvme',
'performance' => [
'iops' => 6000,
'throughput_mib_s' => 250
],
'mount_path' => '/data',
'fstype' => 'ext4',
'delete_on_termination' => true
]
]
],
'description' => '<string>',
'tags' => [
'environment' => 'production',
'team' => 'backend'
],
'desired_count' => 2,
'min_count' => 1,
'max_count' => 3
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://compute.{region}.basaltic.sh/v1/instance-pools"
payload := strings.NewReader("{\n \"subnets\": [\n \"<string>\"\n ],\n \"name\": \"web-asg\",\n \"template\": {\n \"flavor\": \"<string>\",\n \"architecture\": \"amd64\",\n \"image\": \"<string>\",\n \"addresses\": [\n {\n \"address\": \"<string>\"\n }\n ],\n \"security_groups\": [\n \"<string>\"\n ],\n \"floating_ip_assignment\": \"none\",\n \"user_data\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"metadata\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"iam_role\": \"<string>\",\n \"volumes\": [\n {\n \"size_gb\": 20,\n \"boot\": false,\n \"volume_type\": \"nvme\",\n \"performance\": {\n \"iops\": 6000,\n \"throughput_mib_s\": 250\n },\n \"mount_path\": \"/data\",\n \"fstype\": \"ext4\",\n \"delete_on_termination\": true\n }\n ]\n },\n \"description\": \"<string>\",\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"desired_count\": 2,\n \"min_count\": 1,\n \"max_count\": 3\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://compute.{region}.basaltic.sh/v1/instance-pools")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"subnets\": [\n \"<string>\"\n ],\n \"name\": \"web-asg\",\n \"template\": {\n \"flavor\": \"<string>\",\n \"architecture\": \"amd64\",\n \"image\": \"<string>\",\n \"addresses\": [\n {\n \"address\": \"<string>\"\n }\n ],\n \"security_groups\": [\n \"<string>\"\n ],\n \"floating_ip_assignment\": \"none\",\n \"user_data\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"metadata\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"iam_role\": \"<string>\",\n \"volumes\": [\n {\n \"size_gb\": 20,\n \"boot\": false,\n \"volume_type\": \"nvme\",\n \"performance\": {\n \"iops\": 6000,\n \"throughput_mib_s\": 250\n },\n \"mount_path\": \"/data\",\n \"fstype\": \"ext4\",\n \"delete_on_termination\": true\n }\n ]\n },\n \"description\": \"<string>\",\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"desired_count\": 2,\n \"min_count\": 1,\n \"max_count\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://compute.{region}.basaltic.sh/v1/instance-pools")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"subnets\": [\n \"<string>\"\n ],\n \"name\": \"web-asg\",\n \"template\": {\n \"flavor\": \"<string>\",\n \"architecture\": \"amd64\",\n \"image\": \"<string>\",\n \"addresses\": [\n {\n \"address\": \"<string>\"\n }\n ],\n \"security_groups\": [\n \"<string>\"\n ],\n \"floating_ip_assignment\": \"none\",\n \"user_data\": \"aSDinaTvuI8gbWludGxpZnk=\",\n \"metadata\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"iam_role\": \"<string>\",\n \"volumes\": [\n {\n \"size_gb\": 20,\n \"boot\": false,\n \"volume_type\": \"nvme\",\n \"performance\": {\n \"iops\": 6000,\n \"throughput_mib_s\": 250\n },\n \"mount_path\": \"/data\",\n \"fstype\": \"ext4\",\n \"delete_on_termination\": true\n }\n ]\n },\n \"description\": \"<string>\",\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n },\n \"desired_count\": 2,\n \"min_count\": 1,\n \"max_count\": 3\n}"
response = http.request(request)
puts response.read_body{
"instance_pool": {
"subnets": [
{
"id": "288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"crn": "crn:catalog::platform:country/288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"name": "Brazil"
}
],
"vpc": {
"id": "288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"crn": "crn:catalog::platform:country/288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"name": "Brazil"
},
"faults": [
{
"code": "BACKUP_FAILED",
"severity": "error",
"message": "Backup upload failed.",
"details": {},
"first_at": "2023-11-07T05:31:56Z",
"last_at": "2023-11-07T05:31:56Z",
"occurrences": 1
}
],
"autoscaling": {
"enabled": true,
"metrics": [
{
"source": "telemetry",
"target_type": "average_value",
"target_value": 100,
"name": "queue_depth",
"labels": {
"queue": "orders"
},
"sample_aggregation": "last",
"series_aggregation": "sum",
"expected_series": 1,
"window_seconds": 120,
"max_age_seconds": 90
}
],
"warmup_seconds": 180,
"cooldown_seconds": 60,
"scale_down_stabilization_seconds": 300,
"max_scale_out_step": 4,
"max_scale_in_step": 1,
"drain_seconds": 120
},
"autoscaling_status": {
"status": "pending",
"reason": "waiting for sustained lower demand",
"history": [
{
"at": "2023-11-07T05:31:56Z",
"from": 1,
"to": 1,
"reason": "<string>"
}
],
"evaluated_at": "2023-11-07T05:31:56Z",
"last_scaled_at": "2023-11-07T05:31:56Z"
},
"rollout_surge": true,
"retiring_instances": [
{
"requested_at": "2023-11-07T05:31:56Z",
"drain_seconds": 1815,
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_acknowledged_at": "2023-11-07T05:31:56Z",
"drain_until": "2023-11-07T05:31:56Z"
}
],
"id": "8f2a1c3d-4e5b-4a6f-9c0d-1e2f3a4b5c6d",
"crn": "crn:compute:sa-saopaulo-1:my-account:instance-pool/web-pool",
"name": "web-asg",
"description": "Front-end autoscaling group",
"desired_count": 2,
"min_count": 1,
"max_count": 3,
"live_count": 2,
"member_count": 2,
"refresh_in_progress": false,
"stale_instance_count": 0,
"status": "active",
"managed_by": "customer",
"tags": {
"environment": "production",
"team": "backend"
},
"template": {
"security_groups": [
{
"id": "288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"crn": "crn:catalog::platform:country/288aa1e9-bbf5-5584-bce9-6a688f06d8a1",
"name": "Brazil"
}
],
"floating_ip_assignment": "none",
"iam_role": {
"id": "550e8400-e29b-41d4-a716-446655440005",
"crn": "crn:iam:::role/550e8400-e29b-41d4-a716-446655440005",
"name": "instance-role"
},
"flavor": {
"id": "550e8400-e29b-41d4-a716-446655440003",
"crn": "crn:compute:sa-saopaulo-1:platform:flavor/s1.small",
"name": "s1.small"
},
"image": {
"id": "550e8400-e29b-41d4-a716-446655440004",
"crn": "crn:compute:sa-saopaulo-1:platform:image/ubuntu/architecture/amd64/version/24.04",
"name": "ubuntu"
},
"addresses": [
{
"family": "ipv4",
"address": "<string>"
}
],
"user_data": "aSDinaTvuI8gbWludGxpZnk=",
"metadata": {
"environment": "production",
"team": "backend"
},
"tags": {
"environment": "production",
"team": "backend"
},
"volumes": [
{
"size_gb": 20,
"boot": false,
"volume_type": "nvme",
"performance": {
"iops": 6000,
"throughput_mib_s": 250
},
"mount_path": "/data",
"fstype": "ext4",
"delete_on_termination": true
}
]
}
}
}{
"error": {
"code": "INVALID_INPUT",
"message": "Invalid request parameters",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "ACCESS_DENIED",
"message": "You don't have permission to perform this action",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "CONFLICT",
"message": "Resource with this name already exists",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "IDEMPOTENCY_KEY_REUSED",
"message": "This Idempotency-Key was already used with a different request payload",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}compute:CreateInstancePool. See COMPUTE permissions for the full list, what each one covers, and an example policy.Authorizations
An OAuth 2.0 bearer token, sent as Authorization: Bearer <token>.
This is the recommended way to authenticate.
Get one by exchanging a service account's access key pair at
POST /v1/oauth/token with grant_type=client_credentials. It is the
standard client-credentials grant, so any OAuth-aware library will
obtain and refresh it for you.
curl -s -u "$KEY_ID:$SECRET" -d grant_type=client_credentials \
https://iam.basaltic.sh/v1/oauth/token
Tokens last an hour by default. The same access key pair is separately your AWS SigV4 credential for the S3-compatible object endpoint, which speaks nothing else.
Headers
Optional client-generated key that makes a create replay-safe. Retrying a request with the same key returns the original outcome verbatim instead of creating a duplicate resource. Reusing a key with a different request body is rejected (422); a request whose key is still being processed returns 409. Records are honored for 24 hours. Use a UUID or similarly unique token.
255Body
Create a pool with one interface per member. Subnets must be nonempty, unique, and belong to the same account, region and VPC. New members are placed in the least-populated selected subnet. Omitted min_count and max_count default to desired_count.
Subnet UUIDs or CRNs in the same VPC.
1Resource names must not start with the literal crn: prefix or be UUIDs (canonical, compact, braced, or urn:uuid: forms, in either case).
"web-asg"
Launch configuration shared by every member. Each member receives one interface in a subnet selected from the pool's top-level subnets. The template controls that interface's security groups, allocated address families and optional per-member floating IPs. Fixed addresses are not allowed.
Show child attributes
Show child attributes
Target tracking shared by instance pools and load balancers. Updates replace the policy. Set enabled=false to retain settings and use manual sizing. Each metric recommends a desired count; the largest recommendation wins. Missing, stale or incomplete observations prevent scale-in but do not block scale-out recommended by another valid metric. Decisions obey the resource's min_count/max_count, warmup, cooldown, stabilization, step limits and quotas. State survives controller restarts. Active policies own desired_count; manual changes are accepted and automatic evaluation resumes after cooldown. Custom telemetry requires telemetry:ReadMetrics in the same account.
Show child attributes
Show child attributes
Labels on the pool resource, for IAM conditions (basalt:RequestTag/<key> here, basalt:ResourceTag/<key> on later operations) and cost attribution. They are not propagated to the instances the pool launches; template.tags is that set.
A pool field, sent beside template. Replica tags are only reachable through template.tags.
Show child attributes
Show child attributes
{
"environment": "production",
"team": "backend"
}
0 <= x <= 1002
0 <= x <= 1001
A value of 0 means the pool holds no members until max_count is raised.
0 <= x <= 1003
Response
Pool created; initial instances spawned.
A launch template plus a desired count. Creating a pool spawns desired_count instances; a reconciler converges member_count toward desired_count as it changes. member_count is how many members the pool holds; live_count is how many of them are running.
A pool carries two tag sets and they answer different questions. tags labels the pool resource — that is what an IAM condition reads as basalt:ResourceTag/<key> and what a cost report groups by, and it reaches no instance. template.tags is the set stamped on every replica the pool launches.
Show child attributes
Show child attributes

