pool member forced offline

I want to use icontrol to force a pool member offline. When I set a pool member “forced offline” from the GUI, the audit log shows:

POOL_MEMBER modified:

pool_name=“Acme_ONLINE_PRE-PROD_POOL”

addr=10.178.123.131

port=123

monitor_state=7

new_session_enable=0

monitor_rule=“”

update_status=1

In the SDK, it seems as though monitor_state=7 is not an option for poolmember set_monitor_state - only 0 & 2 (STATE_DISABLED & STATE_ENABLED).

Where should I be looking for this?

Since we use IP affinity persistence, the connections never drop off to zero, because there are many users behind proxies. Is there a way to put a member “Forced Offline (Only active connections allowed)”, as opposed to “Disabled (Only persistent or active connections allowed)”?

I see where my mistake was. I was using LocalLBPoolMemberMemberSessionState. What I really wanted was LocalLBPoolMemberMemberMonitorState.