Programming Guides › Programming Guide for C › Policy Management API Guidance › Function Declarations for the Policy Management API › Sm_PolicyApi_AddGlobalRule()
Sm_PolicyApi_AddGlobalRule()
Creates a new global rule in the object store.
Type
Rule function, global scope.
Syntax
int SM_EXTERN Sm_PolicyApi_AddGlobalRule (
void* pSessionHandle,
Sm_PolicyApi_Rule_t* pStructRule,
const bool bUpdate
);
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 completely filled-in rule structure. The realm OID in the structure is ignored.
|
bUpdate
|
I
|
A flag to indicate that if an existing object is found, it should be updated.
|
Returns
- Sm_PolicyApi_Success. The global rule was created successfully.
- Sm_PolicyApi_Failure. The global 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 global rule.
- Sm_PolicyApi_InvalidOid:
- A global rule with a matching OID was not found during an update.
- An agent or agent group with matching OID was not found.
- Sm_PolicyApi_NotImplemented: The client who called this function initialized the API with a version less than SM_POLICY_API_VERSION_6_0.
Copyright © 2015 CA Technologies.
All rights reserved.
|
|