Cloudflare\User\LoadBalancers\Pools::update PHP Method

update() public method

Modify a pool Modify a configured pool
public update ( string $identifier, string | null $name = null, array | null $origins = null, string | null $description = null, boolean | null $enabled = null, string | null $monitor = null, string | null $notifier = null )
$identifier string
$name string | null Object name
$origins array | null A list of origins contained in the pool. Traffic destined to the pool is balanced across all available origins contained in the pool (as long as the pool is considered available).
$description string | null Object description
$enabled boolean | null Whether this pool is enabled or not.
$monitor string | null ID of the monitor object to use for monitoring the health status of origins inside this pool.
$notifier string | null ID of the notifier object to use for notifications relating to the health status of origins inside this pool.
    public function update($identifier, $name = null, $origins = null, $description = null, $enabled = null, $monitor = null, $notifier = null)
    {
        $data = ['name' => $name, 'origins' => $origins, 'description' => $description, 'enabled' => $enabled, 'monitor' => $monitor, 'notifier' => $notifier];
        return $this->patch('/user/load_balancers/pools/' . $identifier, $data);
    }