import requests
url = "https://platform.ankra.app/api/v1/clusters/hetzner/{cluster_id}/control-plane/instance-type"
payload = { "instance_type": "<string>" }
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({instance_type: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/clusters/hetzner/{cluster_id}/control-plane/instance-type', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/clusters/hetzner/{cluster_id}/control-plane/instance-type \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instance_type": "<string>"
}
'{
"mode": "offline",
"new_instance_type": "<string>",
"previous_instance_type": "<string>",
"updated": 123,
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Resize control-plane nodes
Changes the instance type of every control plane. On a running cluster the control planes are resized one at a time behind an etcd quorum check and a drain, and the response carries the operation_id to follow (clusters with fewer than three control planes are refused); on a stopped cluster the new type is applied at the next start and no operation is returned.
import requests
url = "https://platform.ankra.app/api/v1/clusters/hetzner/{cluster_id}/control-plane/instance-type"
payload = { "instance_type": "<string>" }
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({instance_type: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/clusters/hetzner/{cluster_id}/control-plane/instance-type', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PUT \
--url https://platform.ankra.app/api/v1/clusters/hetzner/{cluster_id}/control-plane/instance-type \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instance_type": "<string>"
}
'{
"mode": "offline",
"new_instance_type": "<string>",
"previous_instance_type": "<string>",
"updated": 123,
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
The new instance type for every control plane node. On a stopped cluster it is applied at the next start; on a running cluster with at least three controllers it is rolled out live, one controller at a time, each drained and waited back to healthy before the next.
1Rolling lane only. Bypass PodDisruptionBudgets when draining each controller. Off by default: a PDB is a workload owner's stated availability requirement.
Response
Successful Response
Which lane the request took: 'offline' rewrote a stopped cluster's plan, 'rolling' is the live one-controller-at-a-time path on a running cluster. It describes the lane, not whether work was dispatched - read operation_id for that.
offline, rolling The operation to poll, when the request dispatched one. Null whenever nothing was dispatched: on the offline lane, which applies the new size at the next cluster start (its own operation), and on either lane when the control planes already run the requested type (updated is 0). Decide whether to poll by testing operation_id for null, not by reading mode.