Sm_PolicyApi_AddAgent()

Creates a new stmndr agent. The attributes of the agent are contained in the pstructAgent structure.
sm1252sp1
Creates a new
CA Single Sign-On
agent. The attributes of the agent are contained in the
pstructAgent
structure.
If the agent exists and the
bUpdate
flag is true, the item is updated.
You must specify an agent type with this call. To get the agent type OID for the agent, use Sm_PolicyApi_GetGlobalObjects().
Type
Agent function, global scope.
Syntax
int SM_EXTERN Sm_PolicyApi_AddAgent (
void*
pSessionHandle
,
Sm_PolicyApi_Agent_t*
pstructAgent
,
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.
pstructAgent
I
A pointer to a completely filled-in agent structure.
bUpdate
I
A flag to indicate that if an existing object is found, it should be updated.
 
Returns
  • Sm_PolicyApi_Success. The agent was created successfully.
  • Sm_PolicyApi_Failure. The agent 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 an agent.
  • Sm_PolicyApi_InvalidOid:
    • The agent type OID was not found or is not of the specified agent type.
    • The agent OID was not found. This happens when this function is called with
      bUpdate
      set to true and the
      pszOid
      field of Sm_PolicyApi_Agent_t holds the OID of the agent being updated.
  • Sm_PolicyApi_NotUnique. An agent with the same name exists.
  • Sm_PolicyApi_RadiusIpAddrNotUnique. Another RADIUS IP address exists that is the same.
  • Sm_PolicyApi_MissingProperty. One of the required fields is not set.