The type is used to manage the service nodes (also known as hosts) registered in the platform. It implements the APS core Resource type.
In this document:
The considered APS type (download
)
extends the Resource APS type(s) and looks as follows:
{
"name": "Capacity",
"id": "http://www.parallels.com/pa/pa-core-services/host-management/Capacity/1.0",
"apsVersion": "2.0",
"implements": [
"http://aps-standard.org/types/core/resource/1.0"
],
"relations": {
"host": {
"type": "http://www.parallels.com/pa/pa-core-services/host-management/Host/1.0",
"required": true
}
},
"properties": {
"name": {
"type": "string"
},
"units": {
"type": "string"
},
"amount": {
"type": "integer"
},
"consumption": {
"type": "integer"
}
},
"operations": {
"increaseConsumption": {
"path": "/increaseConsumption",
"verb": "POST",
"errorResponse": {
"type": "object"
}
},
"decreaseConsumption": {
"path": "/decreaseConsumption",
"verb": "POST",
"errorResponse": {
"type": "object"
}
}
}
}
NAME | TYPE | ATTRIBUTES | DEFAULT | DESCRIPTION |
---|---|---|---|---|
amount | Integer | Not Required | Upper limit on the resource. | |
consumption | Integer | Not Required | Current resource consumption. | |
name | String | Not Required | The name of the related resource that this capacity represents. | |
units | String | Not Required | Unit of measure. |
NAME | TYPE | REQUIRED | DESCRIPTION |
---|---|---|---|
host | Host | Yes | Required relationship with a host resource based on the Host type. |
OPERATION | VERB | PATH | RETURNS | Description |
---|---|---|---|---|
decreaseConsumption | POST | /decreaseConsumption | No return values | Decrease the consumption of the specified resource (specified by APS ID) on the host. |
increaseConsumption | POST | /increaseConsumption | No return values | Increase the consumption of the specified resource (specified by APS ID) on the host. |
HTTP Request
POST /aps/2/resources/{aps-id}/decreaseConsumption
Description
Decrease the consumption of the specified resource (specified by APS ID) on the host.
Returns
No return values
HTTP Request
POST /aps/2/resources/{aps-id}/increaseConsumption
Description
Increase the consumption of the specified resource (specified by APS ID) on the host.
Returns
No return values
Please find general description of create-read-update-delete (CRUD) operations with resources, properties, and structures respectively at:
Since the considered APS type contains custom operations, refer to Custom Operations for the general explanation of their structure and examples of operation calls.