Sm_PolicyApi_DeleteGroup()

Deletes the group object identified by pszGroupOid.
casso126
Deletes the group object identified by
pszGroupOid
.
The
pszDomainOid
parameter is required by a rule group or response group. An agent group does not require a domain OID because it is not a domain-based object.
Type
Group function, global scope (agents) or domain scope (responses, rules).
Syntax
int SM_EXTERN Sm_PolicyApi_DeleteGroup (
void*pSessionHandle,
Sm_PolicyApi_Groups_tdwGroup,
const char*pszGroupOid,
const char*pszDomainOid
);
Parameter
I/O
Description
pSessionHandle
I
A pointer to an internal Policy Management API data structure. The structure holds information about the administrator session and the client session.
dwGroup
I
Indicates the type of the group to be deleted.
pszGroupOid
I
A null-terminated string containing the object identifier of the group and the type indicated by
dwGroup
.
pszDomainOid
I
A null-terminated string containing the object identifier of an existing domain. Required parameter for rule or response group.
Returns
  • Sm_PolicyApi_Success. The delete was successful.
  • Sm_PolicyApi_Failure. The delete was not successful.
  • Sm_PolicyApi_InvalidHandle. There was no valid initialization prior to this call.
  • Sm_PolicyApi_NoSession. There is no valid administrator session.
  • Sm_PolicyApi_NoPrivilege. The administrator does not have the privilege to delete a rule group, response group, or agent group.
  • Sm_PolicyApi_InvalidOid:
    • The group OID was not found.
    • The domain OID was not found (for a domain-based group).
  • Sm_PolicyApi_BadGroup. The
    dwGroup
    parameter is not the rule, response, or agent type.