Skip to content

Commit 1014d23

Browse files
chore(api): update composite API spec
1 parent c67d9af commit 1014d23

4 files changed

Lines changed: 26 additions & 10 deletions

File tree

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 2283
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-a6c352830d1270d0abb5bb983058ea21815e1bb7d2e163965335dcb0e706f057.yml
3-
openapi_spec_hash: 04b1f0e3282f29a02a1d2c44c04b44f5
3+
openapi_spec_hash: e3e8d9353d8e69b02fa345a95abbe336
44
config_hash: af64aebd155c327064f15fb62f55c6fc

src/cloudflare/resources/zones/holds.py

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Type, cast
5+
from typing import Type, Optional, cast
66

77
import httpx
88

@@ -58,7 +58,7 @@ def create(
5858
) -> ZoneHold:
5959
"""
6060
Enforce a zone hold on the zone, blocking the creation and activation of zones
61-
with this zone's hostname.
61+
with this zone's hostname. Zone holds cannot be enabled on CDN-only zones.
6262
6363
Args:
6464
zone_id: Identifier.
@@ -106,13 +106,17 @@ def delete(
106106
"""
107107
Stop enforcement of a zone hold on the zone, permanently or temporarily,
108108
allowing the creation and activation of zones with this zone's hostname.
109+
Existing zone holds can be removed from CDN-only zones when `hold_after` is not
110+
provided. Active holds are automatically disabled when a zone transitions to
111+
CDN-only mode.
109112
110113
Args:
111114
zone_id: Identifier.
112115
113116
hold_after: If `hold_after` is provided, the hold will be temporarily disabled, then
114117
automatically re-enabled by the system at the time specified in this
115118
RFC3339-formatted timestamp. Otherwise, the hold will be disabled indefinitely.
119+
`hold_after` cannot be provided for CDN-only zones.
116120
117121
extra_headers: Send extra headers
118122
@@ -141,7 +145,7 @@ def edit(
141145
self,
142146
*,
143147
zone_id: str,
144-
hold_after: str | Omit = omit,
148+
hold_after: Optional[str] | Omit = omit,
145149
include_subdomains: bool | Omit = omit,
146150
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
147151
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -153,6 +157,9 @@ def edit(
153157
"""
154158
Update the `hold_after` and/or `include_subdomains` values on an existing zone
155159
hold. The hold is enabled if the `hold_after` date-time value is in the past.
160+
Existing zone holds can be removed from CDN-only zones by setting `hold_after`
161+
to `null`. Other zone hold updates cannot be made on CDN-only zones. Active
162+
holds are automatically disabled when a zone transitions to CDN-only mode.
156163
157164
Args:
158165
zone_id: Identifier.
@@ -161,7 +168,7 @@ def edit(
161168
disabled, then automatically re-enabled by the system at the time specified in
162169
this RFC3339-formatted timestamp. A past-dated `hold_after` value will have no
163170
effect on an existing, enabled hold. Providing an empty string will set its
164-
value to the current time.
171+
value to the current time. Providing `null` will disable the hold indefinitely.
165172
166173
include_subdomains: If `true`, the zone hold will extend to block any subdomain of the given zone,
167174
as well as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with
@@ -272,7 +279,7 @@ async def create(
272279
) -> ZoneHold:
273280
"""
274281
Enforce a zone hold on the zone, blocking the creation and activation of zones
275-
with this zone's hostname.
282+
with this zone's hostname. Zone holds cannot be enabled on CDN-only zones.
276283
277284
Args:
278285
zone_id: Identifier.
@@ -322,13 +329,17 @@ async def delete(
322329
"""
323330
Stop enforcement of a zone hold on the zone, permanently or temporarily,
324331
allowing the creation and activation of zones with this zone's hostname.
332+
Existing zone holds can be removed from CDN-only zones when `hold_after` is not
333+
provided. Active holds are automatically disabled when a zone transitions to
334+
CDN-only mode.
325335
326336
Args:
327337
zone_id: Identifier.
328338
329339
hold_after: If `hold_after` is provided, the hold will be temporarily disabled, then
330340
automatically re-enabled by the system at the time specified in this
331341
RFC3339-formatted timestamp. Otherwise, the hold will be disabled indefinitely.
342+
`hold_after` cannot be provided for CDN-only zones.
332343
333344
extra_headers: Send extra headers
334345
@@ -357,7 +368,7 @@ async def edit(
357368
self,
358369
*,
359370
zone_id: str,
360-
hold_after: str | Omit = omit,
371+
hold_after: Optional[str] | Omit = omit,
361372
include_subdomains: bool | Omit = omit,
362373
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
363374
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -369,6 +380,9 @@ async def edit(
369380
"""
370381
Update the `hold_after` and/or `include_subdomains` values on an existing zone
371382
hold. The hold is enabled if the `hold_after` date-time value is in the past.
383+
Existing zone holds can be removed from CDN-only zones by setting `hold_after`
384+
to `null`. Other zone hold updates cannot be made on CDN-only zones. Active
385+
holds are automatically disabled when a zone transitions to CDN-only mode.
372386
373387
Args:
374388
zone_id: Identifier.
@@ -377,7 +391,7 @@ async def edit(
377391
disabled, then automatically re-enabled by the system at the time specified in
378392
this RFC3339-formatted timestamp. A past-dated `hold_after` value will have no
379393
effect on an existing, enabled hold. Providing an empty string will set its
380-
value to the current time.
394+
value to the current time. Providing `null` will disable the hold indefinitely.
381395
382396
include_subdomains: If `true`, the zone hold will extend to block any subdomain of the given zone,
383397
as well as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with

src/cloudflare/types/zones/hold_delete_params.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ class HoldDeleteParams(TypedDict, total=False):
1616
If `hold_after` is provided, the hold will be temporarily disabled, then
1717
automatically re-enabled by the system at the time specified in this
1818
RFC3339-formatted timestamp. Otherwise, the hold will be disabled indefinitely.
19+
`hold_after` cannot be provided for CDN-only zones.
1920
"""

src/cloudflare/types/zones/hold_edit_params.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
from typing import Optional
56
from typing_extensions import Required, TypedDict
67

78
__all__ = ["HoldEditParams"]
@@ -11,13 +12,13 @@ class HoldEditParams(TypedDict, total=False):
1112
zone_id: Required[str]
1213
"""Identifier."""
1314

14-
hold_after: str
15+
hold_after: Optional[str]
1516
"""
1617
If `hold_after` is provided and future-dated, the hold will be temporarily
1718
disabled, then automatically re-enabled by the system at the time specified in
1819
this RFC3339-formatted timestamp. A past-dated `hold_after` value will have no
1920
effect on an existing, enabled hold. Providing an empty string will set its
20-
value to the current time.
21+
value to the current time. Providing `null` will disable the hold indefinitely.
2122
"""
2223

2324
include_subdomains: bool

0 commit comments

Comments
 (0)