import requests
url = "https://platform.ankra.app/api/v1/clusters/proxmox/{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/proxmox/{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/proxmox/{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 bastion
Changes the bastion’s instance type. On Proxmox VE the instance type is a size preset from the sizes catalog. On a running cluster the resize is scheduled at once and the result carries its operation_id; a stopped cluster applies it on start. By default the change runs in the background and the call answers 202; pass wait=true to run it in the request and receive the result. Requires clusters.write.
import requests
url = "https://platform.ankra.app/api/v1/clusters/proxmox/{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/proxmox/{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/proxmox/{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
Run the change in the request and answer its result. Off by default: the change runs in the background and the call answers 202.
Body
The bastion's new instance type: a size preset on Proxmox VE, a service-plan ID on HPE Morpheus.
1Response
The change's result (wait=true)
The operation carrying the resize. Null when the write scheduled no work: a stopped cluster applies the new type on start, and a bastion already covered by an active write operation is left to that operation.