@@ 63-72 (lines=10) @@ | ||
60 | * @param object $configuration Rule configuration |
|
61 | * @param string|null $notes A personal note about the rule. Typically used as a reminder or explanation for the rule. |
|
62 | */ |
|
63 | public function create($zone_id, $mode, $configuration, $notes = null) |
|
64 | { |
|
65 | $data = [ |
|
66 | 'mode' => $mode, |
|
67 | 'configuration' => $configuration, |
|
68 | 'notes' => $notes, |
|
69 | ]; |
|
70 | ||
71 | return $this->post('/zones/'.$zone_id.'/firewall/access_rules/rules', $data); |
|
72 | } |
|
73 | ||
74 | /** |
|
75 | * Update access rule (permission needed: #zone:edit) |
@@ 69-79 (lines=11) @@ | ||
66 | * |
|
67 | * @return mixed |
|
68 | */ |
|
69 | public function create($zone_id, $mode, $configuration, $paused = null, $description = null) |
|
70 | { |
|
71 | $data = [ |
|
72 | 'mode' => $mode, |
|
73 | 'configuration' => $configuration, |
|
74 | 'paused' => $paused, |
|
75 | 'description' => $description, |
|
76 | ]; |
|
77 | ||
78 | return $this->post('/zones/' . $zone_id . '/firewall/ua_rules', $data); |
|
79 | } |
|
80 | ||
81 | /** |
|
82 | * Update user agent rule (permission needed: #zone:edit) |
|
@@ 96-106 (lines=11) @@ | ||
93 | * |
|
94 | * @return mixed |
|
95 | */ |
|
96 | public function update($zone_id, $identifier, $mode, $configuration, $paused, $description = null) |
|
97 | { |
|
98 | $data = [ |
|
99 | 'mode' => $mode, |
|
100 | 'configuration' => $configuration, |
|
101 | 'paused' => $paused, |
|
102 | 'description' => $description, |
|
103 | ]; |
|
104 | ||
105 | return $this->patch('/zones/' . $zone_id . '/firewall/ua_rules/' . $identifier, $data); |
|
106 | } |
|
107 | ||
108 | /** |
|
109 | * Delete agent rule (permission needed: #zone:edit) |