from gcore import Gcore
client = Gcore(
api_key="My API Key",
)
waap_firewall_rule = client.waap.domains.firewall_rules.create(
domain_id=1,
action={},
conditions=[{}],
enabled=True,
name="name",
)
print(waap_firewall_rule.id)
{
"name": "<string>",
"description": "<string>",
"enabled": true,
"action": {
"allow": {},
"block": {
"status_code": 403,
"action_duration": "12h"
}
},
"conditions": [
{
"ip": {
"negation": false,
"ip_address": "127.0.0.1"
},
"ip_range": {
"negation": false,
"lower_bound": "127.0.0.1",
"upper_bound": "127.0.0.1"
}
}
],
"id": 123
}
from gcore import Gcore
client = Gcore(
api_key="My API Key",
)
waap_firewall_rule = client.waap.domains.firewall_rules.create(
domain_id=1,
action={},
conditions=[{}],
enabled=True,
name="name",
)
print(waap_firewall_rule.id)
{
"name": "<string>",
"description": "<string>",
"enabled": true,
"action": {
"allow": {},
"block": {
"status_code": 403,
"action_duration": "12h"
}
},
"conditions": [
{
"ip": {
"negation": false,
"ip_address": "127.0.0.1"
},
"ip_range": {
"negation": false,
"lower_bound": "127.0.0.1",
"upper_bound": "127.0.0.1"
}
}
],
"id": 123
}
API key for authentication. Make sure to include the word apikey
, followed by a single space and then your token.
Example: apikey 1234$abcdef
The domain ID
x > 0
Successful Response
The response is of type object
.
Was this page helpful?