vcenter datacenter: create
Create a new datacenter in the vCenter inventory
Request:
HTTP request
POST https://{server}/rest/vcenter/datacenter
Request Body Structure:
{
"spec": {
"folder": "obj-103",
"name": "string"
}
}
"spec": {
"folder": "obj-103",
"name": "string"
}
}
Request Body Parameters:
Name | Type | Description |
---|---|---|
bold = required | ||
spec | create_spec | Specification for the new datacenter to be created. |
spec.name | string | The name of the datacenter to be created. |
spec.folder | string | Datacenter folder in which the new datacenter should be created. Optional. This field is currently required. In the future, if this field is unset, the system will attempt to choose a suitable folder for the datacenter; if a folder cannot be chosen, the datacenter creation operation will fail.When clients pass a value of this structure as a parameter, the field must be an identifier for the resource type: Folder . When operations return a value of this structure as a result, the field will be an identifier for the resource type: Folder . |
Response:
HTTP Status Code: 200
Representation:
{
"value": "obj-103"
}
"value": "obj-103"
}
Response Type:
Name | Type | Description |
---|---|---|
bold = required | ||
value | string | The identifier of the newly created datacenter. |
Errors:
HTTP Status Code | Type | Description |
---|---|---|
500 | error | if the system reports an error while responding to the request. |
400 | already_exists | if the datacenter with the same name is already present. |
400 | invalid_argument | if the datacenter name is empty or invalid as per the underlying implementation. |
404 | not_found | if the datacenter folder cannot be found. |
503 | service_unavailable | if the system is unable to communicate with a service to complete the request. |
401 | unauthenticated | if the user can not be authenticated. |
403 | unauthorized | if the user doesn't have the required privileges. |