Sm_PolicyApi_RemoveFromGroup()
Removes an item from a group.
casso127
Removes an item from a group.
The item and the group must exist and must be of the same type, and the item must be contained in the group.
The
pszDomainOid
parameter is required by rule and response groups. 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_RemoveFromGroup (void*pSessionHandle,Sm_PolicyApi_Groups_tdwGroup,const char*pszItemOid,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. |
pszItemOid
| I | A null-terminated string containing the object identifier of an existing item; must be the same type as the group. |
pszGroupOid
| I | A null-terminated string containing the object identifier of the group .
|
pszDomainOid
| I | A null-terminated string containing the object identifier of an existing domain. Required by rule and response groups. |
Returns
- Sm_PolicyApi_Success. The remove was successful.
- Sm_PolicyApi_Failure. The remove 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 remove a rule, response, or agent OID from its respective group.
- Sm_PolicyApi_InvalidOid:
- The domain OID was not found (for a domain-based group).
- The group OID was not found.
- The rule, response, or agent OID or group OID was not found.
- Sm_PolicyApi_BadGroup. ParameterdwGroupis not the rule, response, or agent type.