fix: Shield tools → Shield Zone API (/shield/shield-zone), client.py에 put 추가
All checks were successful
CI / build (push) Successful in 2m6s
All checks were successful
CI / build (push) Successful in 2m6s
구 API(Pull Zone ShieldDDosProtectionEnabled 필드)는 읽기 전용이라 Shield 설정 변경 불가.
새 Shield Zone API: bunny_shield_list, bunny_shield_status(by shieldZoneId),
bunny_shield_create, bunny_shield_update(PUT), bunny_waf_rules, bunny_waf_logs.
waf_logs 엔드포인트도 /shield/event-logs/{shieldZoneId}로 수정.
This commit is contained in:
@@ -34,6 +34,15 @@ class BunnyClient:
|
||||
)
|
||||
return self._handle(resp)
|
||||
|
||||
async def put(self, path: str, json: dict | None = None) -> dict | list | str:
|
||||
async with httpx.AsyncClient(timeout=REQUEST_TIMEOUT) as c:
|
||||
resp = await c.put(
|
||||
f"{self._base}{path}",
|
||||
headers=self._headers,
|
||||
json=json,
|
||||
)
|
||||
return self._handle(resp)
|
||||
|
||||
async def delete(self, path: str) -> dict | str:
|
||||
async with httpx.AsyncClient(timeout=REQUEST_TIMEOUT) as c:
|
||||
resp = await c.delete(
|
||||
|
||||
Reference in New Issue
Block a user