KSC Open API  13.1
Kaspersky Security Center API description
HostMoveRules Class Reference

Modify and acquire move rules to hosts. More...

List of all members.

Public Member Functions

int AddRule (params pRuleInfo)
 Add extended host moving rule.
 UpdateRule (int nRule, params pRuleInfo)
 Modify attributes of specified rule.
 DeleteRule (int nRule)
 Remove extended host moving rule.
 SetRulesOrder (array pRules)
 Modifies order of specified rules in the global list.
params GetRule (int nRule)
 Acquire attributes of specified rule.
array GetRules (array pFields)
 Enumerate all extended host moving rules.
 ExecuteRulesNow (int nGroupId, array pRules, int nOptions,[out] wstring strActionGuid)
 Execute rules now.

Detailed Description

Modify and acquire move rules to hosts.

Interface allows to acquire and manage host moving rules. The rule will move host which fits KLHST_MR_Query to KLHST_MR_Group

See also Python code with use of KlAkOAPI Python package below:

        server = KlAkOAPI.AdmServer.KlAkAdmServer.Create("https://ksc.example.com:13299", "username", "password", verify = False)
        oHostMoveRules = KlAkOAPI.HostMoveRules.KlAkHostMoveRules(server)
        oHostMoveRules.AddRule({"KLHST_MR_DN": "My test rule #1", \
            "KLHST_MR_Group": 1, \
            "KLHST_MR_Options": 0, \
            "KLHST_MR_Query": "(&(KLHST_WKS_FROM_UNASSIGNED <> 0)(KLHST_WKS_WINHOSTNAME=\"TEST*"))", \
            "KLHST_MR_Custom": KlAkOAPI.Params.paramParams({"MyComment": "Rule #1"}) })