Component - addPermission


Component - addPermission

Description :

This command adds a permission to a component. Returns the ACL.

Return type : DBKey

Command Input :

Variable Name

Variable Type

Description

componentDbKey

DBKey

Handle to the component.

roleName

String

Name of the role.

authName

String

Name of the authorization.

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 adding a specific permission (role and authorization) to the component.

Script

SERVER="Server_Name"

COMP_NAME="Comnponent_Name"

TEMPLATE_GROUP="/Template_Group"

TEMPLATE="Template_Name"

ROLE_NAME="Role_Name"

AUTH_NAME="Authorization 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_ADD_PERMISSION=`blcli Component addPermission $COMPONENT_KEY $ROLE_NAME $AUTH_NAME`

 

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

TrueSight Server Automation Command Line Interface 24.2