import requests
url = "https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/node-groups/{group_name}/autoscaling"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/node-groups/{group_name}/autoscaling', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/node-groups/{group_name}/autoscaling \
--header 'Authorization: Bearer <token>'{
"group_name": "<string>",
"enabled": true,
"min_count": 123,
"max_count": 123,
"node_count": 123,
"target_count": 123,
"operation_id": "<string>",
"message": "<string>"
}{
"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"
}Read node-group autoscaling
Reads whether the cluster autoscaler manages the node group and its minimum and maximum node counts. Requires clusters.read. A cluster of another kind or a refused state answers 409; an unknown cluster 404.
import requests
url = "https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/node-groups/{group_name}/autoscaling"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/node-groups/{group_name}/autoscaling', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/node-groups/{group_name}/autoscaling \
--header 'Authorization: Bearer <token>'{
"group_name": "<string>",
"enabled": true,
"min_count": 123,
"max_count": 123,
"node_count": 123,
"target_count": 123,
"operation_id": "<string>",
"message": "<string>"
}{
"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.
Response
The group's autoscaling settings
A node group's cluster-autoscaler settings. The members after max_count are answered by the PUT only.
PUT only. The group's node count when the write was made.
PUT only. The node count the write moves the group to: max_count when it had more nodes, min_count when it had fewer (while autoscaling is enabled), node_count otherwise.
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. What the write does to the group's node count, in words.