Configure Capacity
curl --request PUT \
--url https://public-api.cloudidr.com/external/api/v1/flexcompute/capacity-configuration \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cidrId": "sc_830349911839",
"vpc": "vpc-12345678",
"securityGroup": "sg-12345678",
"amiImage": "ami-12345678",
"sshPairKey": "keypair-name",
"ebsVolumeSize": 30
}
'import requests
url = "https://public-api.cloudidr.com/external/api/v1/flexcompute/capacity-configuration"
payload = {
"cidrId": "sc_830349911839",
"vpc": "vpc-12345678",
"securityGroup": "sg-12345678",
"amiImage": "ami-12345678",
"sshPairKey": "keypair-name",
"ebsVolumeSize": 30
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cidrId: 'sc_830349911839',
vpc: 'vpc-12345678',
securityGroup: 'sg-12345678',
amiImage: 'ami-12345678',
sshPairKey: 'keypair-name',
ebsVolumeSize: 30
})
};
fetch('https://public-api.cloudidr.com/external/api/v1/flexcompute/capacity-configuration', 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://public-api.cloudidr.com/external/api/v1/flexcompute/capacity-configuration",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'cidrId' => 'sc_830349911839',
'vpc' => 'vpc-12345678',
'securityGroup' => 'sg-12345678',
'amiImage' => 'ami-12345678',
'sshPairKey' => 'keypair-name',
'ebsVolumeSize' => 30
]),
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://public-api.cloudidr.com/external/api/v1/flexcompute/capacity-configuration"
payload := strings.NewReader("{\n \"cidrId\": \"sc_830349911839\",\n \"vpc\": \"vpc-12345678\",\n \"securityGroup\": \"sg-12345678\",\n \"amiImage\": \"ami-12345678\",\n \"sshPairKey\": \"keypair-name\",\n \"ebsVolumeSize\": 30\n}")
req, _ := http.NewRequest("PUT", 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.put("https://public-api.cloudidr.com/external/api/v1/flexcompute/capacity-configuration")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cidrId\": \"sc_830349911839\",\n \"vpc\": \"vpc-12345678\",\n \"securityGroup\": \"sg-12345678\",\n \"amiImage\": \"ami-12345678\",\n \"sshPairKey\": \"keypair-name\",\n \"ebsVolumeSize\": 30\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.cloudidr.com/external/api/v1/flexcompute/capacity-configuration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cidrId\": \"sc_830349911839\",\n \"vpc\": \"vpc-12345678\",\n \"securityGroup\": \"sg-12345678\",\n \"amiImage\": \"ami-12345678\",\n \"sshPairKey\": \"keypair-name\",\n \"ebsVolumeSize\": 30\n}"
response = http.request(request)
puts response.read_body{
"cidrId": "sc_830349911839",
"policyName": "Volod test policy",
"cspAccountName": "personal AWS",
"policyStatus": "ACTIVE",
"policyOperatingState": "QUEUED_FOR_START",
"policyInstance": {
"id": 1688,
"instanceType": "c5.large",
"platformCode": "Linux/UNIX",
"tenancyCode": "DEDICATED",
"vcpu": 2,
"memory": 4,
"gpu": 0,
"gpuMemory": 0,
"qty": 2
},
"cspRegion": {
"regionCode": "us-west-2",
"regionType": "PRIMARY",
"availabilityZoneId": "usw2-az1"
},
"createdDate": "2026-01-08T15:20:15.64868Z",
"capacityConfiguration": {
"launchDateTime": "2026-01-10T00:00:00-08:00",
"endDateTime": "2026-01-12T23:15:00-08:00",
"autoRenewalEnabled": false,
"frequency": null,
"vpc": "vpc-12345678",
"securityGroups": "sg-12345678",
"amiImage": "ami-12345678",
"sshPairKey": "keypair-name",
"ebsVolumeSize": 30
},
"pricing": {
"ourPrice": 8.48,
"cspProviderPrice": 12.11,
"savings": 3.63,
"savingsPercentage": 0.3,
"creditCardProcessingFee": null,
"bankAccountProcessingFee": null
}
}{
"error": {
"code": "400",
"message": "Bad Request",
"details": {
"timestamp": "2026-01-08T16:17:54",
"description": "securityGroups: securityGroups must be sg- followed by at least 8 hex characters"
}
}
}{
"error": {
"code": "401",
"message": "Unauthorized",
"details": {
"timestamp": "2025-03-04T17:01:01",
"description": "Unable to process access token"
}
}
}{
"error": {
"code": "404",
"message": "Not Found",
"details": {
"timestamp": "2026-01-08T14:43:14",
"description": "Supported instance type c5.large1 and platform Linux/UNIX not found"
}
}
}{
"error": {
"code": "500",
"message": "Internal Server Error",
"details": {
"timestamp": "2025-03-04T17:17:08",
"description": "Unexpected error. Our team is working on it"
}
}
}Flex compute
Configure Capacity
Update capacity configuration settings for a policy.
PUT
/
external
/
api
/
v1
/
flexcompute
/
capacity-configuration
Configure Capacity
curl --request PUT \
--url https://public-api.cloudidr.com/external/api/v1/flexcompute/capacity-configuration \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cidrId": "sc_830349911839",
"vpc": "vpc-12345678",
"securityGroup": "sg-12345678",
"amiImage": "ami-12345678",
"sshPairKey": "keypair-name",
"ebsVolumeSize": 30
}
'import requests
url = "https://public-api.cloudidr.com/external/api/v1/flexcompute/capacity-configuration"
payload = {
"cidrId": "sc_830349911839",
"vpc": "vpc-12345678",
"securityGroup": "sg-12345678",
"amiImage": "ami-12345678",
"sshPairKey": "keypair-name",
"ebsVolumeSize": 30
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cidrId: 'sc_830349911839',
vpc: 'vpc-12345678',
securityGroup: 'sg-12345678',
amiImage: 'ami-12345678',
sshPairKey: 'keypair-name',
ebsVolumeSize: 30
})
};
fetch('https://public-api.cloudidr.com/external/api/v1/flexcompute/capacity-configuration', 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://public-api.cloudidr.com/external/api/v1/flexcompute/capacity-configuration",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'cidrId' => 'sc_830349911839',
'vpc' => 'vpc-12345678',
'securityGroup' => 'sg-12345678',
'amiImage' => 'ami-12345678',
'sshPairKey' => 'keypair-name',
'ebsVolumeSize' => 30
]),
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://public-api.cloudidr.com/external/api/v1/flexcompute/capacity-configuration"
payload := strings.NewReader("{\n \"cidrId\": \"sc_830349911839\",\n \"vpc\": \"vpc-12345678\",\n \"securityGroup\": \"sg-12345678\",\n \"amiImage\": \"ami-12345678\",\n \"sshPairKey\": \"keypair-name\",\n \"ebsVolumeSize\": 30\n}")
req, _ := http.NewRequest("PUT", 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.put("https://public-api.cloudidr.com/external/api/v1/flexcompute/capacity-configuration")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cidrId\": \"sc_830349911839\",\n \"vpc\": \"vpc-12345678\",\n \"securityGroup\": \"sg-12345678\",\n \"amiImage\": \"ami-12345678\",\n \"sshPairKey\": \"keypair-name\",\n \"ebsVolumeSize\": 30\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.cloudidr.com/external/api/v1/flexcompute/capacity-configuration")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"cidrId\": \"sc_830349911839\",\n \"vpc\": \"vpc-12345678\",\n \"securityGroup\": \"sg-12345678\",\n \"amiImage\": \"ami-12345678\",\n \"sshPairKey\": \"keypair-name\",\n \"ebsVolumeSize\": 30\n}"
response = http.request(request)
puts response.read_body{
"cidrId": "sc_830349911839",
"policyName": "Volod test policy",
"cspAccountName": "personal AWS",
"policyStatus": "ACTIVE",
"policyOperatingState": "QUEUED_FOR_START",
"policyInstance": {
"id": 1688,
"instanceType": "c5.large",
"platformCode": "Linux/UNIX",
"tenancyCode": "DEDICATED",
"vcpu": 2,
"memory": 4,
"gpu": 0,
"gpuMemory": 0,
"qty": 2
},
"cspRegion": {
"regionCode": "us-west-2",
"regionType": "PRIMARY",
"availabilityZoneId": "usw2-az1"
},
"createdDate": "2026-01-08T15:20:15.64868Z",
"capacityConfiguration": {
"launchDateTime": "2026-01-10T00:00:00-08:00",
"endDateTime": "2026-01-12T23:15:00-08:00",
"autoRenewalEnabled": false,
"frequency": null,
"vpc": "vpc-12345678",
"securityGroups": "sg-12345678",
"amiImage": "ami-12345678",
"sshPairKey": "keypair-name",
"ebsVolumeSize": 30
},
"pricing": {
"ourPrice": 8.48,
"cspProviderPrice": 12.11,
"savings": 3.63,
"savingsPercentage": 0.3,
"creditCardProcessingFee": null,
"bankAccountProcessingFee": null
}
}{
"error": {
"code": "400",
"message": "Bad Request",
"details": {
"timestamp": "2026-01-08T16:17:54",
"description": "securityGroups: securityGroups must be sg- followed by at least 8 hex characters"
}
}
}{
"error": {
"code": "401",
"message": "Unauthorized",
"details": {
"timestamp": "2025-03-04T17:01:01",
"description": "Unable to process access token"
}
}
}{
"error": {
"code": "404",
"message": "Not Found",
"details": {
"timestamp": "2026-01-08T14:43:14",
"description": "Supported instance type c5.large1 and platform Linux/UNIX not found"
}
}
}{
"error": {
"code": "500",
"message": "Internal Server Error",
"details": {
"timestamp": "2025-03-04T17:17:08",
"description": "Unexpected error. Our team is working on it"
}
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Policy/Capacity ID (e.g., sc_830349911839)
VPC ID, must start with vpc- (e.g., vpc-0a1b2c3d)
Pattern:
^vpc-.*Security group ID, must start with sg- (e.g., sg-0a1b2c3d)
Pattern:
^sg-.*AMI ID, must start with ami- (e.g., ami-0a1b2c3d)
Pattern:
^ami-.*SSH key pair name (free-form string)
EBS volume size in GB (must be positive)
Required range:
x >= 1Response
Success - Capacity configuration updated
⌘I

