import requests
url = "https://platform.ankra.app/api/v1/clusters/aws/{cluster_id}/node-groups/{group_name}/autoscaling"
payload = { "enabled": True }
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({enabled: true})
};
fetch('https://platform.ankra.app/api/v1/clusters/aws/{cluster_id}/node-groups/{group_name}/autoscaling', 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/aws/{cluster_id}/node-groups/{group_name}/autoscaling \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'{
"enabled": true,
"group_name": "<string>",
"max_count": 123,
"min_count": 123,
"message": "<string>",
"node_count": 123,
"operation_id": "<string>",
"target_count": 123
}{
"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"
}Update node-group autoscaling
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/aws/{cluster_id}/node-groups/{group_name}/autoscaling"
payload = { "enabled": True }
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({enabled: true})
};
fetch('https://platform.ankra.app/api/v1/clusters/aws/{cluster_id}/node-groups/{group_name}/autoscaling', 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/aws/{cluster_id}/node-groups/{group_name}/autoscaling \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'{
"enabled": true,
"group_name": "<string>",
"max_count": 123,
"min_count": 123,
"message": "<string>",
"node_count": 123,
"operation_id": "<string>",
"target_count": 123
}{
"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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
PAT organisation override.
Response
Successful response
PUT only. What the write does to the group's node count, in words.
PUT only. The group's node count when the write was made.
PUT only. The operation applying the write; absent when none was created now (a stopped cluster, an operation already working on the cluster, or nothing to apply).
PUT only. The node count the write moves the group to: max_count when the group had more nodes, min_count when it had fewer (while autoscaling is enabled), node_count otherwise. A group above max_count scales down through the guarded removal of its least busy nodes, each drained once the pipeline steps on it finish.