import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/agent/resources"
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/org/clusters/{cluster_id}/agent/resources', 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/org/clusters/{cluster_id}/agent/resources \
--header 'Authorization: Bearer <token>'{
"memory_limit": "<string>",
"memory_request": "<string>",
"cpu_limit": "<string>",
"cpu_request": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"apply_state": "not_set",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Get the cluster agent's sizing
Returns the agent container sizing Ankra holds for the cluster (memory and CPU limits and requests; null where Ankra holds nothing, so the agent chart’s default and the agent’s live sizing apply) and what it is doing now: apply_state not_set, applied, pending_upgrade or agent_offline, with a message to show verbatim. The bearer twin of ankra cluster agent resources get.
import requests
url = "https://platform.ankra.app/api/v1/org/clusters/{cluster_id}/agent/resources"
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/org/clusters/{cluster_id}/agent/resources', 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/org/clusters/{cluster_id}/agent/resources \
--header 'Authorization: Bearer <token>'{
"memory_limit": "<string>",
"memory_request": "<string>",
"cpu_limit": "<string>",
"cpu_request": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"apply_state": "not_set",
"message": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Successful Response
The held memory limit as a Kubernetes quantity, or null when Ankra holds none.
The held memory request, or null when Ankra holds none.
The held CPU limit, or null when Ankra holds none.
The held CPU request, or null when Ankra holds none.
When a held value last changed, or null before the first.
What the held sizing is doing on the cluster now.
not_set, applied, pending_upgrade, agent_offline A sentence describing the apply state, to show verbatim.