Resource Center/Resource Pool/Instance Offering Operations
POSTInstance Offering OperationsSince 0.6SynchronousAuth Required
CreateInstanceOffering
CreateInstanceOffering
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.
nameStringRequiredThe resource name.
descriptionStringOptional. The detailed description of the resource.
cpuNumintRequiredThe CPU count.
memorySizelongRequiredThe memory size. Unit: byte.
allocatorStrategyStringOptional. The allocator strategy.
sortKeyintOptional. The sort key.
typeStringOptional. The type.
resourceUuidStringOptional. The resource UUID.
systemTagsListOptional. The system tags.
userTagsListOptional. The user tags.
Responses
Endpoint
POST/zstack/v1/instance-offerings
/zstack/v1/instance-offerings
Request Example
curl -X POST 'http://{host}/zstack/v1/instance-offerings' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"name":"<name>","description":"<description>","cpuNum":1,"memorySize":1,"allocatorStrategy":"<allocatorStrategy>","sortKey":1,"type":"<type>","resourceUuid":"<resourceUuid>"},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'
Response Example
200{ "inventory": { "uuid": "d04e02a97d6c4ad0b0acee2a2f6c7084", "name": "instanceOffering1", "cpuNum": 2.0, "cpuSpeed": 1.0, "type": "UserVm", "allocatorStrategy": "Mevoco", "createDate": "Jun 7, 2017 9:20:40 PM", "lastOpDate": "Jun 7, 2017 9:20:40 PM", "state": "Enabled" } }Change History
This API has no change history records yet.
