GuardAPI Group Functions

Group Functions

Member Functions

create_group

Create a group definition.

Parameters

Parameter

Description

desc

Required. Enter a unique description for the new group.

type

Required. Must be one of the following:

Application Event Value Number

Application Event Value String

Application Event Value Type

Application Item Name

Application Module

Application System ID

Application Transaction Code

APPLICATION USER

Audit Task Type

Client Hostname

Client IP

Client IP/DB User

Client MAC Address

Client OS

COMMANDS

Database Name

Database Version+Patches

DB Error Codes

DB PROTOCOL

DB PROTOCOL VERSION

DB Role

EXCEPTION TYPE

FIELDS

Files Permissions

Global ID

Guardium Audit Categories

Guardium Users

Login Succeded Code

NET PROTOCOL

Object Command

Object Field

OBJECTS

Operation Type

OS User

PORT

Records Affected

SCHEMA

SENTENCE DEPTH

Server Description

Server Hostname

Server IP

Server OS

SERVER TYPE

Service Name

SOURCE PROGRAM

TTL

USERS

WEEKDAY

YEAR

appID

Required. Identifies the application for the group. It must be one of the following values:

Public

Baseline

Access_policy

Classifier

Db2_zos

 

subtype

Optional. A sub type is used to collect multiple groups of the same group type, where the membership of each group is exclusive. For example, assume that you have database servers located in three datacenters, and that you want to group the servers by location. You would define a separate group of database servers for each location, and define all three groups with the same sub type (datacenter, for example).

category

Optional. A category is an optional label that is used to group policy violations and groups for reporting.

classification

Optional. A classification is another optional label that is used to group policy violations and groups for reporting.

Example

grdapi create_group desc=agroup type=objects appid=Public

Error Codes

ERR

Description

150

Invalid Group Type.

151

Error creating Group, possible cause can be that a Group with the specified name already exists.

152

Invalid application Id - should be one of : Public, Baseline, Access_policy,  Classifier, Db2_zos.

153

Error creating Group - a group with the specified description already exists.

list_group_by_id

Display the properties of a specific group.

Parameters

Parameter

Description

id

Required (integer). Identifies the group.

Example

grdapi list_group_by_id id=100003  

Error Codes

ERR

Description

140

Could not retrieve Group - check Id.

141

Invalid Group Type - data might be corrupted.

list_group_by_desc

Display the properties of a specific group.

Parameters

Parameter

Description

desc

Required. The name of the group to be displayed.

Example

grdapi list_group_by_desc desc=agroup  

Error Codes

ERR

Description

141

Invalid Group Type - data might be corrupted.

142

Could not retrieve Group - check desc.

remove_group_by_id

Remove the specified group.

Parameters

Parameter

Description

id

Required (integer). Identifies the group.

Example

grdapi list_group_by_id id=100005  

Error Codes

ERR

Description

160

 Could not delete Group.

remove_group_by_desc

Remove the specified group.

Parameters

Parameter

Description

desc

Required. The name of the group to be removed.

Example

grdapi remove_group_by_desc desc=agroup  

Error Codes

ERR

Description

160

Could not delete Group.

update_group_by_id

Update properties of the specified group.

Parameters

Parameter

Description

id

Required (integer). Identifies the group to be updated.

newDesc

Optional. Enter a unique description for the new group.

subtype

Optional. A sub type is used to collect multiple groups of the same group type, where the membership of each group is exclusive. For example, assume that you have database servers located in three datacenters, and that you want to group the servers by location. You would define a separate group of database servers for each location, and define all three groups with the same sub type (datacenter, for example).

category

Optional. A category is an optional label that is used to group policy violations and groups for reporting.

classification

Optional. A classification is another optional label that is used to group policy violations and groups for reporting.

Example

grdapi update_group_by_id id=100002 newDesc=beegroup subtype=bee category=be classification=bea  

Error Codes

ERR

Description

170

Could not save Group

171

Could not update Group - Invalid id.

172

Could not update Group - a group with the specified description already exists.

update_group_by_name

Update properties of the specified group.

Parameters

Parameter

Description

desc

Required. The name of the group to be updated.

newDesc

Optional. Enter a unique description for the new group.

subtype

Optional. A sub type is used to collect multiple groups of the same group type, where the membership of each group is exclusive. For example, assume that you have database servers located in three datacenters, and that you want to group the servers by location. You would define a separate group of database servers for each location, and define all three groups with the same sub type (datacenter, for example).

category

Optional. A category is an optional label that is used to group policy violations and groups for reporting.

classification

Optional. A classification is another optional label that is used to group policy violations and groups for reporting.

Example

grdapi update_group_by_name desc=beegroup newDesc=beegroupee category=bebebe classification=bebebebe  

Error Codes

ERR

Description

142

Could not retrieve Group - check desc.

170

Could not save Group

172

Could not update Group - a group with the specified description already exists.

add_member_to_group_by_id

Add a member to a group specified by the group ID.

Parameters

Parameter

Description

id

Required (integer). Identifies the group to which the member is to be added.

member

Required. The new member name, which must be unique within the group.

Example

grdapi add_member_to_group_by_id  id=100005 member=turkey  

Error Codes

ERR

Description

140

Could not retrieve Group - check Id.

143

Could not add member - member might already exist.

add_member_to_group_by_desc

Add a member to the named group.

Parameters

Parameter

Description

desc

Required. The name of the group to which the member is to be added.

member

Required. The new member name, which must be unique within the group.

Example

grdapi add_member_to_group_by_desc  desc=bgroup  member=turkey  

Error Codes

ERR

Description

142

Could not retrieve Group - check desc.

143

Could not add member - member might already exist.

list_group_members_by_id

List the members of the specified group.

Parameters

Parameter

Description

id

Required (integer). Identifies the group whose members are to be listed.

Example

grdapi list_group_members_by_id  id=100001   

Error Codes

ERR

Description

140

Could not retrieve Group - check Id.

list_group_members_by_desc

List the members of the specified group.

Parameters

Parameter

Description

desc

Required. The name of the group whose members are to be listed.

Example

grdapi list_group_members_by_desc  desc=bgroup   

Error Codes

ERR

Description

142

Could not retrieve Group - check desc.

remove_member_from_group_by_id

Remove a member from a group specified by the group ID.

Parameters

Parameter

Description

id

Required (integer). Identifies the group from which the member is to be removed.

member

Required. The name of the member to be removed.

Example

grdapi remove_member_to_group_by_id  id=100005 member=turkey  

Error Codes

ERR

Description

140

Could not retrieve Group - check Id.

161

Invalid Group or Group Member

162

Could not remove Group Member.

remove_member_from_group_by_desc

Remove a member from the named group.

Parameters

Parameter

Description

desc

Required. The name of the group from which the member is to be removed.

member

Required. The name of the member to be removed.

Example

grdapi remove_member_from_group_by_desc desc=bgroup member=boston  

Error Codes

ERR

Description

161

Invalid Group or Group Member

162

Could not remove Group Member.