Hi,
Just wondering is there a way to add a rule to a virtual server in a disabled state initially? In various pieces of work we prep as much config as possible during office hours and only enable those configs out of hours. At the moment because the rule is enabled by default when added it means the out of hours support teams need to select the rule (we have a lot) and then add. If we could add in a default state (maybe as a optional tick box) we could do that as part of the prep work and all they need to do is tick the enable box out of hours.
I appreciate it's not that big of a deal but it would be a nice touch and make things a bit easier for the late night teams.
Thanks,
Stephen
Using the GUI, rules will be automatically enabled when you add them to a virtual server.
However, using the REST API would give you more flexibilty, you could create a rule, associate with a virtual server, and enable/disable as needed. A really simple way to do this is to prefix the rule name with "/
" in the REST API call.
For example, using API with this JSON object uploaded to VS endpoint will add rule "test" as enabled:
{ "properties": { "basic": { "request_rules": [ "some pre-existing rule", "test" ], ... }
...and this is a JSON object uploaded to VS endpoint will add rule "test" as disabled:
{ "properties": { "basic": { "request_rules": [ "some pre-existing rule", "/test" ], ... }
You could encapsulate the API calls in a Python script or other provisioning tool.
>>> If we could add in a default state (maybe as a optional tick box)
>>> we could do that as part of the prep work and all they need to do is
>>> tick the enable box out of hours.
Thanks - I will pass that on to the team.
Thanks @pwallace, will give this a rattle. And thanks for passing the GUI option onto the team.
Cheers,
Stephen