import requests
url = "https://platform.ankra.app/api/v1/clusters/ovh/{cluster_id}/bastion/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/ovh/{cluster_id}/bastion/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/ovh/{cluster_id}/bastion/instance-type \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instance_type": "<string>"
}
'{
"node_id": "<string>",
"kind": "<string>",
"name": "<string>",
"instance_type": "<string>",
"operation_id": "<string>"
}{
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "accepted"
}{
"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"
}Resize the gateway
Changes the instance type of the cluster’s gateway node and dispatches the cloud resize, answering the operation to poll (null when no work was scheduled: a stopped cluster applies the type on start, and a gateway already covered by an active write is left to it). Requires clusters.write. With the default wait=false the write is queued and answered 202; a cluster with no live bastion or gateway, a type the location cannot place, or a write already running answers 409.
import requests
url = "https://platform.ankra.app/api/v1/clusters/ovh/{cluster_id}/bastion/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/ovh/{cluster_id}/bastion/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/ovh/{cluster_id}/bastion/instance-type \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"instance_type": "<string>"
}
'{
"node_id": "<string>",
"kind": "<string>",
"name": "<string>",
"instance_type": "<string>",
"operation_id": "<string>"
}{
"operation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "accepted"
}{
"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.
Path Parameters
Query Parameters
true runs the write inline and answers its result; the default queues it and answers 202 once its first verdict is in (or after a few seconds), with a refusal decided in that window answered as it would be inline.
Body
The new instance type (server type, size, flavor or plan) of the bastion or gateway.
1Response
The resize was written (wait=true)