Sm_PolicyApi_AddRule()
Creates a new stmndr rule. The attributes of the rule itself are contained in the structure referenced by pStructRule.
casso10
Creates a new
CA Single Sign-On
rule. The attributes of the rule itself are contained in the structure referenced by pStructRule
.If the rule exists and the
bUpdate
flag is true, the item is updated.A rule is always associated with a realm. Rule names are unique within in a realm but not within a domain.
Type
Rule function, domain scope.
Syntax
int SM_EXTERN Sm_PolicyApi_AddRule (void*pSessionHandle,Sm_PolicyApi_Rule_t*pStructRule,const boolbUpdate);
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. |
pStructRule
| I | A pointer to a completed rule structure. |
bUpdate
| I | A flag to indicate that if an existing object is found, it should be updated. |
Returns
- Sm_PolicyApi_Success. The rule was created successfully.
- Sm_PolicyApi_Failure. The rule was not created successfully.
- 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 create a rule.
- Sm_PolicyApi_InvalidOid:
- The rule OID was not found during an update.
- The realm OID was not found.