Cloudflare\Organizations\Railguns::enabled PHP Method

enabled() public method

Enable or disable a Railgun (permission needed: #organization:edit) Enable or disable a Railgun for all zones connected to it
public enabled ( string $organization_identifier, string $identifier, boolean | null $enabled = null )
$organization_identifier string Organization identifier tag
$identifier string API item identifier tag
$enabled boolean | null Flag to determine if the Railgun is accepting connections
    public function enabled($organization_identifier, $identifier, $enabled = null)
    {
        $data = ['enabled' => $enabled];
        return $this->patch('/organizations/' . $organization_identifier . '/railguns/' . $identifier, $data);
    }