Resource Center/Hardware/Host Operations
POSTHost OperationsSince 4.3.12SynchronousAuth Required
GetHostResourceAllocation
GetHostResourceAllocation
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Path Parameters
Request Inputs
Path Parameters
uuidStringRequiredThe host UUID.
Body Fields
paramsObjectRequiredRequest body parameter object.
strategyStringRequiredThe resource allocation policy.
sceneStringRequiredThe scene type.
vcpuStringRequiredThe number of vCPUs that need to be allocated to a VM instance.
Responses
Endpoint
POST/zstack/v1/hosts/{uuid}/resource-allocation
/zstack/v1/hosts/{uuid}/resource-allocation
Request Example
curl -X POST 'http://{host}/zstack/v1/hosts/{uuid}/resource-allocation' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"strategy":"<strategy>","scene":"<scene>","vcpu":"<vcpu>"}}'
Response Example
200{ "name": "example", "uuid": "f7bae73b9874344b8766dfcdda48ad6e", "vCPUPin": [ { "vCPU": "0", "pCPU": "13" }, { "vCPU": "1", "pCPU": "12" }, { "vCPU": "2", "pCPU": "11" }, { "vCPU": "3", "pCPU": "10" }, { "vCPU": "4", "pCPU": "9" }, { "vCPU": "5", "pCPU": "8" } ] }Change History
This API has no change history records yet.
