curl --request PUT \ --url 'https://api.e2enetworks.com/myaccount/api/v1/kubernetes/update-node-pool/{node_pool_id}/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "min_vms": 3, "cardinality": 3, "max_vms": 5, "policy_type": "Default", "plan_id": 1088, "elasticity_policies": [ { "type": "CHANGE", "adjust": 1, "parameter": "CPU", "operator": ">", "value": 60, "period_number": 3, "period": 10, "cooldown": 150 }, { "type": "CHANGE", "adjust": -1, "parameter": "CPU", "operator": "<", "value": 30, "period_number": 3, "period": 10, "cooldown": 150 } ], "scheduled_policies": []}'import requests
response = requests.put( "https://api.e2enetworks.com/myaccount/api/v1/kubernetes/update-node-pool/{node_pool_id}/", params={"project_id": "<PROJECT_ID>", "apikey": "<API_KEY>", "location": "<LOCATION>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "min_vms": 3, "cardinality": 3, "max_vms": 5, "policy_type": "Default", "plan_id": 1088, "elasticity_policies": [ { "type": "CHANGE", "adjust": 1, "parameter": "CPU", "operator": ">", "value": 60, "period_number": 3, "period": 10, "cooldown": 150, }, { "type": "CHANGE", "adjust": -1, "parameter": "CPU", "operator": "<", "value": 30, "period_number": 3, "period": 10, "cooldown": 150, }, ], "scheduled_policies": [], },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/kubernetes/update-node-pool/{node_pool_id}/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", apikey: "<API_KEY>", location: "<LOCATION>" });
const response = await fetch(url, { method: "PUT", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "min_vms": 3, "cardinality": 3, "max_vms": 5, "policy_type": "Default", "plan_id": 1088, "elasticity_policies": [ { "type": "CHANGE", "adjust": 1, "parameter": "CPU", "operator": ">", "value": 60, "period_number": 3, "period": 10, "cooldown": 150 }, { "type": "CHANGE", "adjust": -1, "parameter": "CPU", "operator": "<", "value": 30, "period_number": 3, "period": 10, "cooldown": 150 } ], "scheduled_policies": [] }),});console.log(await response.json());Updates a node pool’s scaling configuration: its min_vms / cardinality / max_vms, policy_type, backing plan_id, and the elastic (elasticity_policies) and scheduled (scheduled_policies) rules. The requested cardinality must lie within [min_vms, max_vms]. Use the node pool’s service_id (from List Node Pools).
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The node pool service_id (from List Node Pools).
Example
12346Query Parameters
Section titled “Query Parameters”Identifier of the project to scope the request to. Required integer project ID.
Example
<PROJECT_ID>API key used to authenticate the update request.
Example
<API_KEY>Region of the cluster.
Example
<LOCATION>Request Body
Section titled “Request Body”Update a node pool’s sizing and scaling policies.
object
Minimum number of worker nodes.
Example
3Desired (current) number of worker nodes.
Example
3Maximum number of worker nodes.
Example
5Scaling policy mode.
Example
DefaultSKU ID of the worker plan backing the pool.
Example
1088Elastic scaling rules (scale-up adjust 1 and scale-down adjust -1).
object
Example
CHANGEExample
1Example
CPUExample
>Example
60Example
3Example
10Example
150Scheduled scaling rules. Empty when the pool uses only elastic scaling.
object
Example
CARDINALITYExample
3Example
0 12 * * *Example
{ "min_vms": 3, "cardinality": 3, "max_vms": 5, "policy_type": "Default", "plan_id": 1088, "elasticity_policies": [ { "type": "CHANGE", "adjust": 1, "parameter": "CPU", "operator": ">", "value": 60, "period_number": 3, "period": 10, "cooldown": 150 }, { "type": "CHANGE", "adjust": -1, "parameter": "CPU", "operator": "<", "value": 30, "period_number": 3, "period": 10, "cooldown": 150 } ], "scheduled_policies": []}Responses
Section titled “Responses”Successful response
object
object
object
Example
{ "code": 200, "message": "Node Pool pool-worker-1 Updated Successfully"}