Resource Center/Resource Pool/VM Scheduling Rule Group Operations
POSTVM Scheduling Rule Group OperationsSince 4.6.0SynchronousAuth Required
CreateVmSchedulingRule
CreateVmSchedulingRule
Execution Availability
Try It Out
Submit a mock request using the current auth context and example-driven inputs.
Request Inputs
Body Fields
paramsObjectRequiredRequest body parameter object.
ruleStringRequiredThe VM scheduling rule.
modeStringRequiredThe execution mode.
vmGroupUuidStringRequiredThe VM scheduling group UUID.
hostGroupUuidStringThe host scheduling group UUID.
nameStringRequiredThe resource name.
descriptionStringOptional. Optional. The detailed description of the resource.
policyString策略。
typeString类型。
zoneUuidStringOptional. The zone UUID.
subTypeString订阅类型。
resourceUuidStringThe resource UUID.
tagUuidsListOptional. The tag UUID list.
systemTagsListOptional. The system tags.
userTagsListOptional. The user tags.
Responses
Endpoint
POST/zstack/v1/vmsSchedulingRule
/zstack/v1/vmsSchedulingRule
Request Example
curl -X POST 'http://{host}/zstack/v1/vmsSchedulingRule' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"rule":"<rule>","mode":"<mode>","vmGroupUuid":"<vmGroupUuid>","hostGroupUuid":"<hostGroupUuid>","name":"<name>","description":"<description>","policy":"<policy>","type":"<type>","zoneUuid":"<zoneUuid>","subType":"<subType>","resourceUuid":"<resourceUuid>","tagUuids":["<tagUuids>"]},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
Response Example
200{ "inventory": { "uuid": "d517b42f669b324288fe8977a7df2e4d", "name": "affinity-group-test", "description": "affinity group for test", "policy": "ANTISOFT", "version": "1.0", "type": "HOST" } }Change History
This API has no change history records yet.
