Skip to content

Commit d2bad01

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#194)
1 parent d19970f commit d2bad01

File tree

5 files changed

+0
-42
lines changed

5 files changed

+0
-42
lines changed

src/cloudflare/resources/dns/firewall/firewall.py

-16
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ def create(
7070
maximum_cache_ttl: float | NotGiven = NOT_GIVEN,
7171
minimum_cache_ttl: float | NotGiven = NOT_GIVEN,
7272
negative_cache_ttl: Optional[float] | NotGiven = NOT_GIVEN,
73-
origin_ips: object | NotGiven = NOT_GIVEN,
7473
ratelimit: Optional[float] | NotGiven = NOT_GIVEN,
7574
retries: float | NotGiven = NOT_GIVEN,
7675
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -100,8 +99,6 @@ def create(
10099
101100
negative_cache_ttl: Negative DNS Cache TTL.
102101
103-
origin_ips: Deprecated alias for "upstream_ips".
104-
105102
ratelimit: Ratelimit in queries per second per datacenter (applies to DNS queries sent to
106103
the upstream nameservers configured on the cluster).
107104
@@ -130,7 +127,6 @@ def create(
130127
"maximum_cache_ttl": maximum_cache_ttl,
131128
"minimum_cache_ttl": minimum_cache_ttl,
132129
"negative_cache_ttl": negative_cache_ttl,
133-
"origin_ips": origin_ips,
134130
"ratelimit": ratelimit,
135131
"retries": retries,
136132
},
@@ -256,7 +252,6 @@ def edit(
256252
upstream_ips: List[Union[str, str]],
257253
attack_mitigation: Optional[firewall_edit_params.AttackMitigation] | NotGiven = NOT_GIVEN,
258254
negative_cache_ttl: Optional[float] | NotGiven = NOT_GIVEN,
259-
origin_ips: object | NotGiven = NOT_GIVEN,
260255
ratelimit: Optional[float] | NotGiven = NOT_GIVEN,
261256
retries: float | NotGiven = NOT_GIVEN,
262257
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -288,8 +283,6 @@ def edit(
288283
289284
negative_cache_ttl: Negative DNS Cache TTL.
290285
291-
origin_ips: Deprecated alias for "upstream_ips".
292-
293286
ratelimit: Ratelimit in queries per second per datacenter (applies to DNS queries sent to
294287
the upstream nameservers configured on the cluster).
295288
@@ -321,7 +314,6 @@ def edit(
321314
"upstream_ips": upstream_ips,
322315
"attack_mitigation": attack_mitigation,
323316
"negative_cache_ttl": negative_cache_ttl,
324-
"origin_ips": origin_ips,
325317
"ratelimit": ratelimit,
326318
"retries": retries,
327319
},
@@ -407,7 +399,6 @@ async def create(
407399
maximum_cache_ttl: float | NotGiven = NOT_GIVEN,
408400
minimum_cache_ttl: float | NotGiven = NOT_GIVEN,
409401
negative_cache_ttl: Optional[float] | NotGiven = NOT_GIVEN,
410-
origin_ips: object | NotGiven = NOT_GIVEN,
411402
ratelimit: Optional[float] | NotGiven = NOT_GIVEN,
412403
retries: float | NotGiven = NOT_GIVEN,
413404
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -437,8 +428,6 @@ async def create(
437428
438429
negative_cache_ttl: Negative DNS Cache TTL.
439430
440-
origin_ips: Deprecated alias for "upstream_ips".
441-
442431
ratelimit: Ratelimit in queries per second per datacenter (applies to DNS queries sent to
443432
the upstream nameservers configured on the cluster).
444433
@@ -467,7 +456,6 @@ async def create(
467456
"maximum_cache_ttl": maximum_cache_ttl,
468457
"minimum_cache_ttl": minimum_cache_ttl,
469458
"negative_cache_ttl": negative_cache_ttl,
470-
"origin_ips": origin_ips,
471459
"ratelimit": ratelimit,
472460
"retries": retries,
473461
},
@@ -593,7 +581,6 @@ async def edit(
593581
upstream_ips: List[Union[str, str]],
594582
attack_mitigation: Optional[firewall_edit_params.AttackMitigation] | NotGiven = NOT_GIVEN,
595583
negative_cache_ttl: Optional[float] | NotGiven = NOT_GIVEN,
596-
origin_ips: object | NotGiven = NOT_GIVEN,
597584
ratelimit: Optional[float] | NotGiven = NOT_GIVEN,
598585
retries: float | NotGiven = NOT_GIVEN,
599586
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -625,8 +612,6 @@ async def edit(
625612
626613
negative_cache_ttl: Negative DNS Cache TTL.
627614
628-
origin_ips: Deprecated alias for "upstream_ips".
629-
630615
ratelimit: Ratelimit in queries per second per datacenter (applies to DNS queries sent to
631616
the upstream nameservers configured on the cluster).
632617
@@ -658,7 +643,6 @@ async def edit(
658643
"upstream_ips": upstream_ips,
659644
"attack_mitigation": attack_mitigation,
660645
"negative_cache_ttl": negative_cache_ttl,
661-
"origin_ips": origin_ips,
662646
"ratelimit": ratelimit,
663647
"retries": retries,
664648
},

src/cloudflare/types/dns/dns_firewall.py

-6
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ class AttackMitigation(BaseModel):
1515
DNS servers protected.
1616
"""
1717

18-
only_when_origin_unhealthy: Optional[object] = None
19-
"""Deprecated alias for "only_when_upstream_unhealthy"."""
20-
2118
only_when_upstream_unhealthy: Optional[bool] = None
2219
"""Only mitigate attacks when upstream servers seem unhealthy."""
2320

@@ -54,9 +51,6 @@ class DNSFirewall(BaseModel):
5451
negative_cache_ttl: Optional[float] = None
5552
"""Negative DNS Cache TTL."""
5653

57-
origin_ips: Optional[object] = None
58-
"""Deprecated alias for "upstream_ips"."""
59-
6054
ratelimit: Optional[float] = None
6155
"""
6256
Ratelimit in queries per second per datacenter (applies to DNS queries sent to

src/cloudflare/types/dns/firewall_create_params.py

-6
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ class FirewallCreateParams(TypedDict, total=False):
3535
negative_cache_ttl: Optional[float]
3636
"""Negative DNS Cache TTL."""
3737

38-
origin_ips: object
39-
"""Deprecated alias for "upstream_ips"."""
40-
4138
ratelimit: Optional[float]
4239
"""
4340
Ratelimit in queries per second per datacenter (applies to DNS queries sent to
@@ -58,8 +55,5 @@ class AttackMitigation(TypedDict, total=False):
5855
DNS servers protected.
5956
"""
6057

61-
only_when_origin_unhealthy: object
62-
"""Deprecated alias for "only_when_upstream_unhealthy"."""
63-
6458
only_when_upstream_unhealthy: bool
6559
"""Only mitigate attacks when upstream servers seem unhealthy."""

src/cloudflare/types/dns/firewall_edit_params.py

-6
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ class FirewallEditParams(TypedDict, total=False):
3737
negative_cache_ttl: Optional[float]
3838
"""Negative DNS Cache TTL."""
3939

40-
origin_ips: object
41-
"""Deprecated alias for "upstream_ips"."""
42-
4340
ratelimit: Optional[float]
4441
"""
4542
Ratelimit in queries per second per datacenter (applies to DNS queries sent to
@@ -60,8 +57,5 @@ class AttackMitigation(TypedDict, total=False):
6057
DNS servers protected.
6158
"""
6259

63-
only_when_origin_unhealthy: object
64-
"""Deprecated alias for "only_when_upstream_unhealthy"."""
65-
6660
only_when_upstream_unhealthy: bool
6761
"""Only mitigate attacks when upstream servers seem unhealthy."""

tests/api_resources/dns/test_firewall.py

-8
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,13 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
4040
upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"],
4141
attack_mitigation={
4242
"enabled": True,
43-
"only_when_origin_unhealthy": {},
4443
"only_when_upstream_unhealthy": False,
4544
},
4645
deprecate_any_requests=True,
4746
ecs_fallback=False,
4847
maximum_cache_ttl=900,
4948
minimum_cache_ttl=60,
5049
negative_cache_ttl=900,
51-
origin_ips={},
5250
ratelimit=600,
5351
retries=2,
5452
)
@@ -229,11 +227,9 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
229227
upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"],
230228
attack_mitigation={
231229
"enabled": True,
232-
"only_when_origin_unhealthy": {},
233230
"only_when_upstream_unhealthy": False,
234231
},
235232
negative_cache_ttl=900,
236-
origin_ips={},
237233
ratelimit=600,
238234
retries=2,
239235
)
@@ -385,15 +381,13 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
385381
upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"],
386382
attack_mitigation={
387383
"enabled": True,
388-
"only_when_origin_unhealthy": {},
389384
"only_when_upstream_unhealthy": False,
390385
},
391386
deprecate_any_requests=True,
392387
ecs_fallback=False,
393388
maximum_cache_ttl=900,
394389
minimum_cache_ttl=60,
395390
negative_cache_ttl=900,
396-
origin_ips={},
397391
ratelimit=600,
398392
retries=2,
399393
)
@@ -574,11 +568,9 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
574568
upstream_ips=["192.0.2.1", "198.51.100.1", "2001:DB8:100::CF"],
575569
attack_mitigation={
576570
"enabled": True,
577-
"only_when_origin_unhealthy": {},
578571
"only_when_upstream_unhealthy": False,
579572
},
580573
negative_cache_ttl=900,
581-
origin_ips={},
582574
ratelimit=600,
583575
retries=2,
584576
)

0 commit comments

Comments
 (0)