Component - applyAclPolicy
Component - applyAclPolicy
Description :
This command applies an ACL policy to a component.
When an ACL policy is applied to an object, all access checks on that object will check both the permissions in its ACL along with the permissions of the associated ACL policy. Returns the DBKey of the modified object.
Return type : DBKey
Command Input :
Variable Name | Variable Type | Description |
|---|---|---|
componentKey | DBKey | Component Key. |
policyName | String | Name of the ACL policy to use. |
Example
The following example gets the ID of a server and the handle of a template, and uses them to create a new component. Creation of the component returns the component key, which is used in applying a specific ACL policy to the component.
Script
SERVER="Server_Name"
COMP_NAME="Comnponent_Name"
TEMPLATE_GROUP="/Template_Group"
TEMPLATE="Template_Name"
POLICY_NAME="Policy_name"
TEMPLATE_KEY=`blcli Template getDBKeyByGroupAndName $TEMPLATE_GROUP $TEMPLATE`
SERVER_ID=`blcli Server getServerIdByName $SERVER`
COMPONENT_KEY=`blcli Component createComponent $COMP_NAME $TEMPLATE_KEY $SERVER_ID`
COMP_APPLY_ACL_POLICY=`blcli Component applyAclPolicy $COMPONENT_KEY $POLICY_NAME`
COMP_NAME="Comnponent_Name"
TEMPLATE_GROUP="/Template_Group"
TEMPLATE="Template_Name"
POLICY_NAME="Policy_name"
TEMPLATE_KEY=`blcli Template getDBKeyByGroupAndName $TEMPLATE_GROUP $TEMPLATE`
SERVER_ID=`blcli Server getServerIdByName $SERVER`
COMPONENT_KEY=`blcli Component createComponent $COMP_NAME $TEMPLATE_KEY $SERVER_ID`
COMP_APPLY_ACL_POLICY=`blcli Component applyAclPolicy $COMPONENT_KEY $POLICY_NAME`
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*