Resource Center/Hardware/Host Operations
POSTHost OperationsSince 4.7.11SynchronousAuth Required
AllocateHostResource
AllocateHostResource
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 resource UUID.
Body Fields
paramsObjectRequiredRequest body parameter object.
strategyStringRequiredThe resource allocation policy.
sceneStringRequiredThe scene type.
vcpuintRequiredThe number of vCPUs that need to be allocated to a VM instance.
memSizeLongOptional. The memory size of the vNUMA node.
systemTagsListOptional. The system tags.
userTagsListOptional. The user tags.
Responses
Endpoint
POST/zstack/v1/hosts/{uuid}/allocate-resource
/zstack/v1/hosts/{uuid}/allocate-resource
Request Example
curl -X POST 'http://{host}/zstack/v1/hosts/{uuid}/allocate-resource' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"strategy":"<strategy>","scene":"<scene>","vcpu":1,"memSize":1},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
Response Example
200{ "name": "example", "uuid": "f7bae73b9874344b8766dfcdda48ad6e", "vCPUPin": [ { "vCPU": "0", "pCPU": "13" } ] }Change History
This API has no change history records yet.
