Sm_PolicyApi_SetResponseInPolicyLink()

Alters the policy link described by the ppstructPolicyLink structure.
casso10
Alters the policy link described by the
ppstructPolicyLink
structure.
This function sets a response or a response group to a rule or rule group. It can also be used to remove a response or response group from a policy link. To remove a response or response group from a policy link, set the
pszResponseOid
in Sm_PolicyApi_PolicyLink_t to an empty string.
Type
Response function, domain scope.
Syntax
int SM_EXTERN Sm_PolicyApi_SetResponseInPolicyLink (
void*pSessionHandle,const char*pszPolicyOid,
Sm_PolicyApi_PolicyLink_t*ppstructPolicyLink
);
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.
pszPolicyOid
I
A null-terminated string containing the object identifier of an existing policy.
ppstructPolicyLink
I
The address of a policy link structure.
Returns
  • Sm_PolicyApi_Success. The response was successfully set or removed in a policy link.
  • Sm_PolicyApi_Failure. The response cannot be set or removed in a policy link.
  • 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 set a policy link.
  • Sm_PolicyApi_InvalidOid:
    • The policy OID was not found.
    • The rule or rule group OID was not found.
    • The response or response group OID was not found.
  • Sm_PolicyApi_DoesNotExist. There are no policy links in the policy collection.