Skip to main content
PUT
/
api
/
v1
/
clusters
/
digitalocean
/
{cluster_id}
/
control-plane
/
instance-type
Change Control Plane Instance Type Endpoint
import requests

url = "https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/control-plane/instance-type"

payload = { "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({instance_type: '<string>'})
};

fetch('https://platform.ankra.app/api/v1/clusters/digitalocean/{cluster_id}/control-plane/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/digitalocean/{cluster_id}/control-plane/instance-type \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instance_type": "<string>"
}
'
{
  "new_instance_type": "<string>",
  "previous_instance_type": "<string>",
  "updated": 123
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

authorization
string | null
x-ankra-organisation-id
string | null

Path Parameters

cluster_id
string<uuid>
required

Body

application/json
instance_type
string
required

The new instance type for every control plane node. Applied the next time the cluster is recreated.

Minimum string length: 1

Response

Successful Response

new_instance_type
string
required
previous_instance_type
string
required
updated
integer
required