What are you passing in for the MonitorRuleType?
Here's the function prototype:
enum MonitorRuleType {
MONITOR_RULE_TYPE_UNDEFINED,
MONITOR_RULE_TYPE_NONE,
MONITOR_RULE_TYPE_SINGLE,
MONITOR_RULE_TYPE_AND_LIST,
MONITOR_RULE_TYPE_M_OF_N,
};
struct MonitorRule {
MonitorRuleType type;
long quorum;
String [] monitor_templates;
};
struct MonitorAssociation {
String pool_name;
MonitorRule monitor_rule;
};
void LocalLB::Pool::set_monitor_association(
MonitorAssociation[] monitor_associations
);
If you pass in a value of MONITOR_RULE_TYPE_UNDEFINED, or MONITOR_RULE_TYPE_NONE for the MonitorRuleType value the "Invalid Monitor Rule Type" error message will be returned. Use one of the valid values and you should be all set.
In the future, if you are having issues with the APIs, if you could include in your post the relevant parameters you are using that would help us to help you better. Otherwise, it's all guesswork.
-Joe