VMware Cloud Director API - POST-CreateResourceClassAction
POST /admin/extension/service/resourceclass/{id}/resourceclassactions
- Operation:
- POST /admin/extension/service/resourceclass/{id}/resourceclassactions
- Description:
- Registers resource class action for extension service. The resource class action will be added only if a resource class with the same name does not exist.
- Since:
- Input parameters
-
New resource class parameter
- Consume media type(s):
-
application/vnd.vmware.admin.resourceClassAction+xml
application/vnd.vmware.admin.resourceClassAction+json
- Input type:
- ResourceClassActionType
- Output parameters
-
Newly registered or already existing resource class action.
- Produce media type(s):
-
application/vnd.vmware.admin.resourceClassAction+xml
application/vnd.vmware.admin.resourceClassAction+json
- Output type:
- ResourceClassActionType
- Examples
-
- Request
-
HTTP 1.1
POST /api/admin/extension/service/resourceclass/5c986319-0aee-45fd-b4ac-2a7153b4728c/resourceclassactions
Headers:
Content-Length: 287
Content-Type: application/vnd.vmware.admin.resourceClassAction+xml; charset=ISO-8859-1
x-vcloud-authorization: SZMKkKToUBmDWSEeqZYL2yxpCqDiyToj5PYW3TigOrI=
Body:
<?xml version="1.0" encoding="UTF-8"?><vmext:ResourceClassAction
xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
name="Read backups">
<vmext:HttpMethod>GET</vmext:HttpMethod>
<vmext:UrlPattern>/api/backup/([-,a-g,0-9]*)</vmext:UrlPattern>
</vmext:ResourceClassAction>
- Response
-
HTTP/1.1 201 Created
Headers:
Content-Length: 1610
Content-Type: application/vnd.vmware.admin.resourceclassaction+xml;version=5.5
Location: https://vcloud.example.com/api/admin/extension/service/resourceclassaction/487c49a1-84af-452e-bbfb-2eb57270e5a7
Vary: Accept-Encoding
Body:
<?xml version="1.0" encoding="UTF-8"?><vmext:ResourceClassAction
xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
href="https://vcloud.example.com/api/admin/extension/service/resourceclassaction/487c49a1-84af-452e-bbfb-2eb57270e5a7"
id="urn:vcloud:resourceClassAction:487c49a1-84af-452e-bbfb-2eb57270e5a7"
name="Read backups"
type="application/vnd.vmware.admin.resourceClassAction+xml"
xsi:schemaLocation="http://www.vmware.com/vcloud/extension/v1.5 http://https://vcloud.example.com/api/v1.5/schema/vmwextensions.xsd http://www.vmware.com/vcloud/v1.5 http://https://vcloud.example.com/api/v1.5/schema/master.xsd">
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/service/resourceclassaction/487c49a1-84af-452e-bbfb-2eb57270e5a7"
rel="remove"/>
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/service/resourceclass/5c986319-0aee-45fd-b4ac-2a7153b4728c"
rel="up"
type="application/vnd.vmware.admin.resourceClass+xml"/>
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/service/resourceclassaction/487c49a1-84af-452e-bbfb-2eb57270e5a7/aclrules"
rel="down:aclRules"
type="application/vnd.vmware.vcloud.query.records+xml"/>
<vcloud:Link
href="https://vcloud.example.com/api/admin/extension/service/resourceclassaction/487c49a1-84af-452e-bbfb-2eb57270e5a7/aclrules"
rel="add"
type="application/vnd.vmware.admin.aclRule+xml"/>
<vmext:HttpMethod>GET</vmext:HttpMethod>
<vmext:UrlPattern>/api/backup/([-,a-g,0-9]*)</vmext:UrlPattern>
</vmext:ResourceClassAction>