Create Resource Pool
If vSphere APIs begin with /rest (vs /api), any maps are consumed/returned instead as arrays of objects, each containing a key and a value property field.
Creates a resource pool. if you do not have all of the privileges described as follows: - The resource ResourcePool referenced by the attribute ResourcePool.CreateSpec.parent requires Resource.CreatePool.
Request
URLURL
https://{api_host}/rest/vcenter/resource-pool
Header Parameters
Header Parameters
string
vmware-api-session-id
Required
Required session ID, obtained by first calling Create Session API
Example: b00db39f948d13ea1e59b4d6fce56389
Request Body
Request Body
ResourcePoolCreateRequestBody of type application/json (required){
"spec": {
"name": "string",
"parent": "string"
}
}
spec
Required
Specification of the new resource pool to be created, see ResourcePool.CreateSpec.
Response
Response
Response BodyResponse Body
200 OK returns
ResourcePoolCreateResponseBody
of type application/json
The identifier of the newly created resource pool. The result will be an identifier for the resource type: ResourcePool.
{
"value": "string"
}
string
value
Optional
The identifier of the newly created resource pool. The result will be an identifier for the resource type: ResourcePool.
cURL Command
curl -X POST -H "vmware-api-session-id: b00db39f948d13ea1e59b4d6fce56389" -H "Content-Type: application/json" -d '{"spec":{"cpu_allocation":{"expandable_reservation":false,"limit":0,"reservation":0,"shares":{"level":"enum","shares":0}},"memory_allocation":{"expandable_reservation":false,"limit":0,"reservation":0,"shares":{"level":"enum","shares":0}},"name":"string","parent":"string"}}' https://{api_host}/rest/vcenter/resource-pool
Errors
503
com.vmware.vapi.std.errors.service_unavailable : If the system is unable to communicate with a service to complete the request.
507
com.vmware.vapi.std.errors.unable_to_allocate_resource : if any of the resources needed to create the resource pool could not be allocated.
400
com.vmware.vapi.std.errors.invalid_argument : If a parameter passed in the spec is invalid.
401
com.vmware.vapi.std.errors.unauthenticated : If the user can not be authenticated. | com.vmware.vapi.std.errors.unauthorized : If the user doesn't have the required privileges.
404
com.vmware.vapi.std.errors.error : If the system reports an error while responding to the request. | com.vmware.vapi.std.errors.not_found : If the resource specified in parent could not be found | com.vmware.vapi.std.errors.resource_inaccessible : If the specified resource in parent is not accessible.
On This Page
Resource Pool Operations
post
patch
delete