8000 feat(api): api update · GameRoMan/cloudflare-python@3a38efd · GitHub
[go: up one dir, main page]

Skip to content

Commit 3a38efd

Browse files
feat(api): api update
1 parent ad29ea4 commit 3a38efd

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1739
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3f72477c7ad185b8412acc07b382363c57a1164b40ff37232ea8c0da9919f199.yml
3-
openapi_spec_hash: 87b7c2287f19bf059b0cd6550a2b805d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-3bcbff61e51911a9f7dc10e8d468a0848ecc706a1694d3b49433dd6b739b3665.yml
3+
openapi_spec_hash: 2fa4d4a482c9f2612ab00e57b9bad971
44
config_hash: 7e270b3449efce600e3469937a344c2d

src/cloudflare/resources/zones/zones.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,7 @@ def edit(
306306
self,
307307
*,
308308
zone_id: str,
309+
paused: bool | NotGiven = NOT_GIVEN,
309310
type: Literal["full", "partial", "secondary", "internal"] | NotGiven = NOT_GIVEN,
310311
vanity_name_servers: List[str] | NotGiven = NOT_GIVEN,
311312
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -322,6 +323,9 @@ def edit(
322323
Args:
323324
zone_id: Identifier
324325
326+
paused: Indicates whether the zone is only using Cloudflare DNS services. A true value
327+
means the zone will not receive security or performance benefits.
328+
325329
type: A full zone implies that DNS is hosted with Cloudflare. A partial zone is
326330
typically a partner-hosted zone or a CNAME setup. This parameter is only
327331
available to Enterprise customers or if it has been explicitly enabled on a
@@ -344,6 +348,7 @@ def edit(
344348
f"/zones/{zone_id}",
345349
body=maybe_transform(
346350
{
351+
"paused": paused,
347352
"type": type,
348353
"vanity_name_servers": vanity_name_servers,
349354
},
@@ -621,6 +626,7 @@ async def edit(
621626
self,
622627
*,
623628
zone_id: str,
629+
paused: bool | NotGiven = NOT_GIVEN,
624630
type: Literal["full", "partial", "secondary", "internal"] | NotGiven = NOT_GIVEN,
625631
vanity_name_servers: List[str] | NotGiven = NOT_GIVEN,
626632
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -637,6 +643,9 @@ async def edit(
637643
Args:
638644
zone_id: Identifier
639645
646+
paused: Indicates whether the zone is only using Cloudflare DNS services. A true value
647+
means the zone will not receive security or performance benefits.
648+
640649
type: A full zone implies that DNS is hosted with Cloudflare. A partial zone is
641650
typically a partner-hosted zone or a CNAME setup. This parameter is only
642651
available to Enterprise customers or if it has been explicitly enabled on a
@@ -659,6 +668,7 @@ async def edit(
659668
f"/zones/{zone_id}",
660669
body=await async_maybe_transform(
661670
{
671+
"paused": paused,
662672
"type": type,
663673
"vanity_name_servers": vanity_name_servers,
664674
},

src/cloudflare/types/zones/zone_edit_params.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ class ZoneEditParams(TypedDict, total=False):
1212
zone_id: Required[str]
1313
"""Identifier"""
1414

15+
paused: bool
16+
"""Indicates whether the zone is only using Cloudflare DNS services.
17+
18+
A true value means the zone will not receive security or performance benefits.
19+
"""
20+
1521
type: Literal["full", "partial", "secondary", "internal"]
1622
"""A full zone implies that DNS is hosted with Cloudflare.
1723

tests/api_resources/test_zones.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ def test_method_edit(self, client: Cloudflare) -> None:
159159
def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
160160
zone = client.zones.edit(
161161
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
162+
paused=True,
162163
type="full",
163164
vanity_name_servers=["ns1.example.com", "ns2.example.com"],
164165
)
@@ -375,6 +376,7 @@ async def test_method_edit(self, async_client: AsyncCloudflare) -> None:
375376
async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare) -> None:
376377
zone = await async_client.zones.edit(
377378
zone_id="023e105f4ecef8ad9ca31a8372d0c353",
379+
paused=True,
378380
type="full",
379381
vanity_name_servers=["ns1.example.com", "ns2.example.com"],
380382
)

0 commit comments

Comments
 (0)
0