Syntax for defining addPrivilege python command

Syntax for defining addPrivilege python command

book

Article ID: KB0073340

calendar_today

Updated On:

Products Versions
TIBCO Enterprise Administrator (TEA) 2.x

Description

All TIBCO Enterprise Administrator object IDs have the following structure: <agentID>:<agentType>:<agentVersion>:<objectType>:<objectKey>
1. agentID Specifies the agent. Its the name mentioned while registering the agent.
2. agentType Name of the Agent type. For example BusinessEvents
3. agentTypeVersion Version of the Agent type.
4. objectType Name of the Object type. For example the entities mentioned like BusinessEvents,Agent,Host etc
5. objectKey A key to show details about a specific object instance. The link to the documentation mentioning about this is : https://docs.tibco.com/pub/tea/2.3.0/doc/html/GUID-08B89EAB-55B3-4AAD-88B1-77A8A946C7F8.html

Below are few examples of passing the correct format to objectIdToPermissions which worked when I tried out addPrivilege operation-
r1.addPrivilege(productName='BusinessEvents',objectIdToPermissions={":::BusinessEvents:":["read"],":::Agent:":["read"],":::Host:":["DEPLOY_INSTANCE_PERMISSION"]}) r1.addPrivilege(productName='BusinessEvents',objectIdToPermissions={"all::::":["read"]})
r1.addPrivilege(productName='BusinessEvents',objectIdToPermissions={":::BusinessEvents:":["read"],":::Agent:":["read"]})
r1.addPrivilege(productName='BusinessEvents',objectIdToPermissions={":::BusinessEvents:":["DEPLOY_INSTANCE_PERMISSION","UNDEPLOY_INSTANCE_PERMISSION"]}) r1.addPrivilege(productName='BusinessEvents',objectIdToPermissions={"all::::":["CREATE_DEPLOYMENT_PERMISSION"],":::BusinessEvents:":["DEPLOY_INSTANCE_PERMISSION","UNDEPLOY_INSTANCE_PERMISSION"]})

Issue/Introduction

How to define objectIdToPermissions parameter in addPrivilege and addRole python commands