Cloudflare\Zone\LoadBalancers::update PHP Method

update() public method

Modify a load balancer Modify a configured load balancer
public update ( string $zone_identifier, string $identifier, string | null $name = null, string | null $global_policy = null, string | null $description = null, integer | null $ttl = null, boolean | null $proxied = null )
$zone_identifier string
$identifier string
$name string | null A hostname of the record that should provide load balancing capabilities. If this name already exists as a DNS record in your CloudFlare DNS, the existing record will take precedence over the Load Balancer.
$global_policy string | null ID of the Global Policy object.
$description string | null Object description.
$ttl integer | null Time to live (TTL) of the DNS entry for the IP address returned by this load balancer.
$proxied boolean | null Whether the hostname should be grey clouded (False) or orange clouded (True).
    public function update($zone_identifier, $identifier, $name = null, $global_policy = null, $description = null, $ttl = null, $proxied = null)
    {
        $data = ['name' => $name, 'global_policy' => $global_policy, 'description' => $description, 'ttl' => $ttl, 'proxied' => $proxied];
        return $this->patch('/zones/' . $zone_identifier . '/load_balancers/' . $identifier, $data);
    }