import requests
url = "https://platform.ankra.app/api/v1/clusters/ankracloud/{cluster_id}/node-groups/{group_name}/instance-type"
payload = {
"abandon_pending_resize": False,
"force_drain": False,
"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({abandon_pending_resize: false, force_drain: false, instance_type: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/clusters/ankracloud/{cluster_id}/node-groups/{group_name}/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/ankracloud/{cluster_id}/node-groups/{group_name}/instance-type \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"abandon_pending_resize": false,
"force_drain": false,
"instance_type": "<string>"
}
'{
"dispatch": "started",
"group_name": "<string>",
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated": 123,
"dispatch_reason": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Resize node group
Bearer PAT authentication; RBAC permission clusters.write. PAT mutations support wait=false where implemented; browser mutations require CSRF. Answers 404 while the organisation’s aws_provider feature flag is off.
import requests
url = "https://platform.ankra.app/api/v1/clusters/ankracloud/{cluster_id}/node-groups/{group_name}/instance-type"
payload = {
"abandon_pending_resize": False,
"force_drain": False,
"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({abandon_pending_resize: false, force_drain: false, instance_type: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/clusters/ankracloud/{cluster_id}/node-groups/{group_name}/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/ankracloud/{cluster_id}/node-groups/{group_name}/instance-type \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"abandon_pending_resize": false,
"force_drain": false,
"instance_type": "<string>"
}
'{
"dispatch": "started",
"group_name": "<string>",
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"updated": 123,
"dispatch_reason": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"detail": "Cluster not found"
}Authorizations
Body
Abandon the resize the group has pending instead of asking for one: each server's definition goes back to the type it actually runs and its resize markers are cleared, with nothing drained or powered off. Use it for a resize that cannot land (a drain the PodDisruptionBudgets block, a disk the provider will not shrink). instance_type is not needed when this is true; a group with no pending resize answers 409.
Response
Successful response
What the write did about the operation that applies it. started: operation_id names it, created in the same transaction as the write. deferred: the change is stored but no operation was started for it now; dispatch_reason says why and what applies it instead (the reconcile loop once a running operation has finished, or the cluster's next start). none: the write left nothing for an operation to apply (a scale to the group's current count, a removal on a stopped cluster, which the write applies to the group's records itself).
started, deferred, none Operation carrying the cloud resize; poll it to know when the group is back. Null when the write scheduled no work: a stopped cluster applies the new type on start, a group still being created is left to the create, and a group already covered by an active write operation is left to that operation. dispatch says which.