The following discusses APIs for performing ruleset operations. More specifically:
- Create or replace a TASM rule.
- Delete a TASM rule.
- Manage a rule (for example, enable or disable).
- Activate a ruleset.
Only system throttle and meter rules are supported.
The APIs are external stored procedures (XSPs).
An entry is logged in the DBC.TDWMEventLog table when an XSP successfully completes.
To create a system throttle, arrival rate meter, or filter rule:
- If you are creating a TASM rule, the desired ruleset or config name can be retrieved from the TDWM.Configurations table. Use 'ALLRULESETS' as the ruleset name to create the rule in all existing rulesets.
- Call the XSP to create the rule without any classification criteria. The new rule in initially disabled.
- TDWM.TDWMCreateSystemThrottle to create a System Throttle rule.
- TDWM.TDWMCreateArrivalRateMeter to create an Arrival Rate Meter rule.
- TDWM.TDWMCreateFilter to create a Filter rule.
- Call XSP TDWM.TDWMAddClassificationForRule to add a classification criterion to the rule. This step is repeated for each additional classification criterion, if necessary.
- Optionally, call XSP TDWM.TDWMAddClassificationForTarget to add a sub-criterion for a Target group classification. This step is repeated for each sub-criterion, if necessary.
- Call XSP TDWM.TDWMAddLimitForRuleState to add the default limit or a query limit for a specific state. This step can be repeated for each state. At least one of these calls must specify the default limit.
- Call XSP TDWM.TDWMManageRule to enable the new rule.
- Optionally, call XSP TDWM.TDWMActivateRuleset to activate an updated ruleset with the new rule.
See Ruleset API Examples.