Forum Discussion
Aaron_M_623
Nimbostratus
Oct 23, 2008PHP API - MemberMonitorState array format?
Hi all -
I have been trying to get the syntax down for calling the set_monitor_state for Pool Member.
I consistently get the error:
Could not find element by name: member
when I use the syntax that makes sense to me from what I see in the API.
I know this error is telling me that my SOAP data is packaged incorrectly , but I don't see what I am doing wrong. According to the API , I need to pass in a string array of pool names , no problem there , and then a 2D Array for monitor_states.
Below is the code I am using. Can someone provide me with some advice?
Thanks!
This is the code:
$pool contains the name of the pool.
$item->member is a member object retrieved in an earlier call.
$params = array('pool_names' => array($pool) ,
'monitor_states' =>
array('member' => $item->member ,
'monitor_state' => 'STATE_ENABLED')
) ;
This is a print_r() of the array:
Array
(
[pool_names] => Array
(
[0] => pool-ssl
)
[monitor_states] => Array
(
[member] => stdClass Object
(
[address] => 172.16.4.1
[port] => 443
)
[monitor_state] => STATE_ENABLED
)
)
No RepliesBe the first to reply
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects