5.1

Table Of Contents
Table 11-2. ACL Rules (Continued)
Container Element
Access
Comments
Entity The action is authorized for members of the organization referenced in the
Entity element in this container.
PrincipalAccess
Shared The action is authorized for all users
Entity The action is authorized for the User referenced in the Entity element in this
container, or for any role that includes the Right referenced in the Entity
element in this container.
A ResourceClassAction can include an arbitrary number of AclRule elements. The action is permitted if the
user or resource attempting the action matches any rule.
Prerequisites
Verify that you are logged in to the vCloud API as a system administrator.
Procedure
1 Retrieve the XML representation of the resource class action.
This request retrieves the XML representation of the resource class action created in “Example: Define an
Action for a Resource Class,” on page 297:
GET https://vcloud.example.com/api/admin/extension/service/resourceclassaction/268
2 Examine the response to find the Link for specifying ACL rules for the resource class action.
This Link has the following form:
<vcloud:Link
rel="add"
type="application/vnd.vmware.vcloud.query.aclRule+xml"
href="https://vcloud.example.com/api/admin/extension/service/resourceclassaction/268/aclrules
" />
3 Construct an AclRule element.
See the request portion of “Example: Define an ACL Rule for a Resource Class Action,” on page 299 for
information about the contents of this element.
4 POST the ResourceClassAction element to the URL described in Step 2.
Example: Define an ACL Rule for a Resource Class Action
This example adds an ACL rule to the resource class action created in “Example: Define an Action for a Resource
Class,” on page 297. The rule specifies that all members of a specific organization who have a role that includes
a specific right can execute the action.
Request:
POST https://vcloud.example.com/api/admin/extension/service/resourceclassaction/268/aclrules
Content-type: application/vnd.vmware.admin.aclRule+xml
<?xml version="1.0" encoding="UTF-8"?>
<vmext:AclRule
xmlns:vmext="http://www.vmware.com/vcloud/extension/v1.5"
xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
name="ACL rule for read backups">
<Description>Only users in org/26 who have right/2 can read backups</Description>
<vmext:ServiceResourceAccess>
Chapter 11 vCloud Director Extension Services
VMware, Inc. 299