7.7.9.1 GRANT PRIVILEGE
Purpose
The GRANT PRIVILEGE command sets the access privileges for a role.
Syntax
GRANT PRIVILEGE { ALL ACTIONS | action } ON { ALL OBJECTS | object } \
{ ALL ATTRIBUTES | ATTRIBUTES attribute1 [, attribute2, ...] } \
{ WITH ALL OPTIONS | WITH OPTIONS option1 [, option2, ...] } \
TO ROLE { ALL | role1 [, role2, ...] }
Usage Notes
-
action is the command. Examples:
ALTER,CREATE,DESCRIBE,DROP,EXPORT,IMPORT,LIST.Notes:
- The
GRANTandREVOKEcommands cannot be granted. -
CREATE USERandDROP USERcannot be granted. -
CREATE ROLEandDROP ROLEcannot be granted.
- The
-
object is object type for the action. It can be any CellCLI object. Examples:
CELL,THRESHOLD,PHYSICALDISK,ALERTHISTORY,ROLE. -
attribute are the attributes for the object. To get a list of attributes for an object, run the
LIST object_typecommand. -
option are the options for the object. Examples:
DETAIL,LIMIT,ORDER BY,WHERE. -
role is the name of the role to grant privileges.
-
The
ALL ACTIONSargument grants privileges for all actions. -
The
ALL OBJECTSargument grants privileges for all objects. -
The
ALL ATTRIBUTESargument grants privileges for all attributes. -
The
WITH ALL OPTIONSargument grants privileges for all options. -
Specifying attributes and
WITH OPTIONSis optional. If they are not specified, then all attributes and options are granted with the privilege.
Examples
Example 7-138 Granting Privileges to a Role
This example shows how to grant privileges to a role.
CellCLI> GRANT PRIVILEGE list on alerthistory ATTRIBUTES alertAction,alertMessage \
WITH OPTIONS detail TO ROLE cellmonitor
Example 7-139 Granting All Attributes and Options to a Role
This example shows how to grant all attributes and options for a specified action and object to a role.
CellCLI> GRANT PRIVILEGE { ALL ACTIONS | action } ON { ALL OBJECTS | object } to ROLE role1
Example 7-140 Granting All Options with Specified Action, Object and Attributes
This example shows how to grant all options with a specified action, object and attributes to a role.
CellCLI> GRANT PRIVILEGE { ALL ACTIONS | action } ON { ALL OBJECTS | object } \
ATTRIBUTES attribute1 [, attribute2, ...] to ROLE role1
Example 7-141 Granting All Attributes with Specified Action, Object and Options
This example shows how to grant all attributes with a specified action, object, and options to a role.
CellCLI> GRANT PRIVILEGE { ALL ACTIONS | action } ON { ALL OBJECTS | object } \
WITH OPTIONS option1 [, option, ...] to ROLE role1Parent topic: GRANT