2017-05-24 14:21:03 +03:00
|
|
|
================
|
|
|
|
Resource Classes
|
|
|
|
================
|
|
|
|
|
|
|
|
Resource classes are entities that indicate standard or
|
|
|
|
deployer-specific resources that can be provided by a resource
|
|
|
|
provider.
|
|
|
|
|
2017-09-08 11:03:00 +08:00
|
|
|
.. note:: Resource class API calls are available starting from version 1.2.
|
2017-05-24 14:21:03 +03:00
|
|
|
|
|
|
|
List resource classes
|
|
|
|
=====================
|
|
|
|
|
|
|
|
.. rest_method:: GET /resource_classes
|
|
|
|
|
|
|
|
Return a list of all resource classes.
|
|
|
|
|
|
|
|
Normal Response Codes: 200
|
|
|
|
|
|
|
|
Response
|
|
|
|
--------
|
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- resource_classes: resource_classes
|
|
|
|
- links: resource_class_links
|
|
|
|
- name: resource_class
|
|
|
|
|
|
|
|
Response Example
|
|
|
|
----------------
|
|
|
|
|
2017-12-25 13:03:17 +09:00
|
|
|
.. literalinclude:: ./samples/resource_classes/get-resource_classes.json
|
2017-05-24 14:21:03 +03:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Create resource class
|
|
|
|
=====================
|
|
|
|
|
|
|
|
.. rest_method:: POST /resource_classes
|
|
|
|
|
2017-09-25 08:23:21 +08:00
|
|
|
Create a new resource class. The new class must be a *custom* resource class,
|
2018-02-02 18:00:21 -06:00
|
|
|
prefixed with `CUSTOM_` and distinct from the standard resource classes.
|
2017-05-24 14:21:03 +03:00
|
|
|
|
|
|
|
Normal Response Codes: 201
|
|
|
|
|
|
|
|
Error response codes: badRequest(400), conflict(409)
|
|
|
|
|
2017-09-25 08:23:21 +08:00
|
|
|
A `400 BadRequest` response code will be returned if the resource class
|
|
|
|
does not have prefix `CUSTOM_`.
|
|
|
|
|
2017-05-24 14:21:03 +03:00
|
|
|
A `409 Conflict` response code will
|
|
|
|
be returned if another resource class exists with the provided name.
|
|
|
|
|
|
|
|
Request
|
|
|
|
-------
|
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
2017-11-20 20:03:20 +09:00
|
|
|
- name: resource_class_custom
|
2017-05-24 14:21:03 +03:00
|
|
|
|
|
|
|
Request example
|
|
|
|
---------------
|
|
|
|
|
2017-12-25 13:03:17 +09:00
|
|
|
.. literalinclude:: ./samples/resource_classes/create-resource_classes-request.json
|
2017-05-24 14:21:03 +03:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Response
|
|
|
|
--------
|
|
|
|
|
2017-11-20 22:33:39 +09:00
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- Location: location
|
|
|
|
|
2017-05-24 14:21:03 +03:00
|
|
|
No body content is returned on a successful POST.
|