PATCH
/
waap
/
v1
/
domains
/
{domain_id}
/
policies
/
{policy_id}
/
toggle
import os
from gcore import Gcore

client = Gcore(
    api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
)
waap_policy_mode = client.waap.domains.policies.toggle(
    policy_id="policy_id",
    domain_id=0,
)
print(waap_policy_mode.mode)
{
  "mode": true
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

domain_id
integer
required

The domain ID

policy_id
string
required

The ID of the policy to toggle

Response

200
application/json

Successful Response

Represents the mode of a security rule.