Information
Unsupported content This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Component - applyAclTemplate


Component - applyAclTemplate

Description :

This command applies an ACL template to a component. Returns the DBKey of the modified object.

Return type : DBKey

Command Input :

Variable Name

Variable Type

Description

componentDbKey

DBKey

Handle to the component.

templateName

String

Name of the ACL template to use.

replace

Boolean

Flag indicating whether or not to replace all ACL entries (True/False).

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 template to the component.

Script

SERVER="Server_Name"

COMP_NAME="Comnponent_Name"

TEMPLATE_GROUP="/Template_Group"

TEMPLATE="Template_Name"

ACL_TEMPLATE="ACL_Template_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`

APPLY_ACL_TEMPLATE=`blcli Component applyAclTemplate $COMPONENT_KEY $ACL_TEMPLATE "true"`

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Server Automation Command Line Interface 8.5