Skip to content

Commit 2efef30

Browse files
chore(api): update composite API spec
1 parent ec06854 commit 2efef30

9 files changed

Lines changed: 231 additions & 73 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: 89b7548880c5f2608886affe8f108d2e
3+
openapi_spec_hash: 81803642bd376243047b3b4bdc0c7d4b
44
config_hash: af64aebd155c327064f15fb62f55c6fc

src/cloudflare/resources/dls/regional_services/prefix_bindings.py

Lines changed: 50 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def with_streaming_response(self) -> PrefixBindingsResourceWithStreamingResponse
5656
def create(
5757
self,
5858
*,
59-
account_id: int,
59+
account_id: str,
6060
cidr: str,
6161
prefix_id: str,
6262
region_key: str,
@@ -71,6 +71,8 @@ def create(
7171
Create a DLS prefix binding
7272
7373
Args:
74+
account_id: Identifier of a Cloudflare account.
75+
7476
cidr: IP prefix in CIDR notation to bind.
7577
7678
prefix_id: The ID of the parent IP prefix that contains the CIDR.
@@ -85,6 +87,8 @@ def create(
8587
8688
timeout: Override the client-level default timeout for this request, in seconds
8789
"""
90+
if not account_id:
91+
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
8892
return self._post(
8993
path_template("/accounts/{account_id}/dls/regional_services/prefix_bindings", account_id=account_id),
9094
body=maybe_transform(
@@ -108,7 +112,7 @@ def create(
108112
def list(
109113
self,
110114
*,
111-
account_id: int,
115+
account_id: str,
112116
cursor: str | Omit = omit,
113117
per_page: int | Omit = omit,
114118
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -122,6 +126,8 @@ def list(
122126
List DLS prefix bindings for an account
123127
124128
Args:
129+
account_id: Identifier of a Cloudflare account.
130+
125131
cursor: Opaque token for cursor-based pagination. Omit for the first page. Pass the
126132
value from a previous response to fetch the next page.
127133
@@ -133,6 +139,8 @@ def list(
133139
134140
timeout: Override the client-level default timeout for this request, in seconds
135141
"""
142+
if not account_id:
143+
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
136144
return self._get_api_list(
137145
path_template("/accounts/{account_id}/dls/regional_services/prefix_bindings", account_id=account_id),
138146
page=SyncCursorPagination[PrefixBindingListResponse],
@@ -156,7 +164,7 @@ def delete(
156164
self,
157165
binding_id: str,
158166
*,
159-
account_id: int,
167+
account_id: str,
160168
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
161169
# The extra values given here take precedence over values defined on the client or passed to this method.
162170
extra_headers: Headers | None = None,
@@ -168,6 +176,8 @@ def delete(
168176
Delete a DLS prefix binding
169177
170178
Args:
179+
account_id: Identifier of a Cloudflare account.
180+
171181
binding_id: Unique identifier for the prefix binding.
172182
173183
extra_headers: Send extra headers
@@ -178,6 +188,8 @@ def delete(
178188
179189
timeout: Override the client-level default timeout for this request, in seconds
180190
"""
191+
if not account_id:
192+
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
181193
if not binding_id:
182194
raise ValueError(f"Expected a non-empty value for `binding_id` but received {binding_id!r}")
183195
return self._delete(
@@ -196,7 +208,7 @@ def edit(
196208
self,
197209
binding_id: str,
198210
*,
199-
account_id: int,
211+
account_id: str,
200212
region_key: str,
201213
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
202214
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -209,6 +221,8 @@ def edit(
209221
Update a DLS prefix binding
210222
211223
Args:
224+
account_id: Identifier of a Cloudflare account.
225+
212226
binding_id: Unique identifier for the prefix binding.
213227
214228
region_key: New region key to assign (e.g., "us", "eu", "cfcanary").
@@ -221,6 +235,8 @@ def edit(
221235
222236
timeout: Override the client-level default timeout for this request, in seconds
223237
"""
238+
if not account_id:
239+
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
224240
if not binding_id:
225241
raise ValueError(f"Expected a non-empty value for `binding_id` but received {binding_id!r}")
226242
return self._patch(
@@ -244,7 +260,7 @@ def get(
244260
self,
245261
binding_id: str,
246262
*,
247-
account_id: int,
263+
account_id: str,
248264
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
249265
# The extra values given here take precedence over values defined on the client or passed to this method.
250266
extra_headers: Headers | None = None,
@@ -256,6 +272,8 @@ def get(
256272
Get a DLS prefix binding
257273
258274
Args:
275+
account_id: Identifier of a Cloudflare account.
276+
259277
binding_id: Unique identifier for the prefix binding.
260278
261279
extra_headers: Send extra headers
@@ -266,6 +284,8 @@ def get(
266284
267285
timeout: Override the client-level default timeout for this request, in seconds
268286
"""
287+
if not account_id:
288+
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
269289
if not binding_id:
270290
raise ValueError(f"Expected a non-empty value for `binding_id` but received {binding_id!r}")
271291
return self._get(
@@ -308,7 +328,7 @@ def with_streaming_response(self) -> AsyncPrefixBindingsResourceWithStreamingRes
308328
async def create(
309329
self,
310330
*,
311-
account_id: int,
331+
account_id: str,
312332
cidr: str,
313333
prefix_id: str,
314334
region_key: str,
@@ -323,6 +343,8 @@ async def create(
323343
Create a DLS prefix binding
324344
325345
Args:
346+
account_id: Identifier of a Cloudflare account.
347+
326348
cidr: IP prefix in CIDR notation to bind.
327349
328350
prefix_id: The ID of the parent IP prefix that contains the CIDR.
@@ -337,6 +359,8 @@ async def create(
337359
338360
timeout: Override the client-level default timeout for this request, in seconds
339361
"""
362+
if not account_id:
363+
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
340364
return await self._post(
341365
path_template("/accounts/{account_id}/dls/regional_services/prefix_bindings", account_id=account_id),
342366
body=await async_maybe_transform(
@@ -360,7 +384,7 @@ async def create(
360384
def list(
361385
self,
362386
*,
363-
account_id: int,
387+
account_id: str,
364388
cursor: str | Omit = omit,
365389
per_page: int | Omit = omit,
366390
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -374,6 +398,8 @@ def list(
374398
List DLS prefix bindings for an account
375399
376400
Args:
401+
account_id: Identifier of a Cloudflare account.
402+
377403
cursor: Opaque token for cursor-based pagination. Omit for the first page. Pass the
378404
value from a previous response to fetch the next page.
379405
@@ -385,6 +411,8 @@ def list(
385411
386412
timeout: Override the client-level default timeout for this request, in seconds
387413
"""
414+
if not account_id:
415+
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
388416
return self._get_api_list(
389417
path_template("/accounts/{account_id}/dls/regional_services/prefix_bindings", account_id=account_id),
390418
page=AsyncCursorPagination[PrefixBindingListResponse],
@@ -408,7 +436,7 @@ async def delete(
408436
self,
409437
binding_id: str,
410438
*,
411-
account_id: int,
439+
account_id: str,
412440
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
413441
# The extra values given here take precedence over values defined on the client or passed to this method.
414442
extra_headers: Headers | None = None,
@@ -420,6 +448,8 @@ async def delete(
420448
Delete a DLS prefix binding
421449
422450
Args:
451+
account_id: Identifier of a Cloudflare account.
452+
423453
binding_id: Unique identifier for the prefix binding.
424454
425455
extra_headers: Send extra headers
@@ -430,6 +460,8 @@ async def delete(
430460
431461
timeout: Override the client-level default timeout for this request, in seconds
432462
"""
463+
if not account_id:
464+
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
433465
if not binding_id:
434466
raise ValueError(f"Expected a non-empty value for `binding_id` but received {binding_id!r}")
435467
return await self._delete(
@@ -448,7 +480,7 @@ async def edit(
448480
self,
449481
binding_id: str,
450482
*,
451-
account_id: int,
483+
account_id: str,
452484
region_key: str,
453485
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
454486
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -461,6 +493,8 @@ async def edit(
461493
Update a DLS prefix binding
462494
463495
Args:
496+
account_id: Identifier of a Cloudflare account.
497+
464498
binding_id: Unique identifier for the prefix binding.
465499
466500
region_key: New region key to assign (e.g., "us", "eu", "cfcanary").
@@ -473,6 +507,8 @@ async def edit(
473507
474508
timeout: Override the client-level default timeout for this request, in seconds
475509
"""
510+
if not account_id:
511+
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
476512
if not binding_id:
477513
raise ValueError(f"Expected a non-empty value for `binding_id` but received {binding_id!r}")
478514
return await self._patch(
@@ -498,7 +534,7 @@ async def get(
498534
self,
499535
binding_id: str,
500536
*,
501-
account_id: int,
537+
account_id: str,
502538
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
503539
# The extra values given here take precedence over values defined on the client or passed to this method.
504540
extra_headers: Headers | None = None,
@@ -510,6 +546,8 @@ async def get(
510546
Get a DLS prefix binding
511547
512548
Args:
549+
account_id: Identifier of a Cloudflare account.
550+
513551
binding_id: Unique identifier for the prefix binding.
514552
515553
extra_headers: Send extra headers
@@ -520,6 +558,8 @@ async def get(
520558
521559
timeout: Override the client-level default timeout for this request, in seconds
522560
"""
561+
if not account_id:
562+
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
523563
if not binding_id:
524564
raise ValueError(f"Expected a non-empty value for `binding_id` but received {binding_id!r}")
525565
return await self._get(

src/cloudflare/resources/dls/regions.py

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def with_streaming_response(self) -> RegionsResourceWithStreamingResponse:
5050
def list(
5151
self,
5252
*,
53-
account_id: int,
53+
account_id: str,
5454
cursor: str | Omit = omit,
5555
per_page: int | Omit = omit,
5656
type: Literal["managed", "custom"] | Omit = omit,
@@ -65,6 +65,8 @@ def list(
6565
List DLS regions for an account
6666
6767
Args:
68+
account_id: Identifier of a Cloudflare account.
69+
6870
cursor: Opaque token for cursor-based pagination. Omit for the first page. Pass the
6971
value from a previous response to fetch the next page.
7072
@@ -78,6 +80,8 @@ def list(
7880
7981
timeout: Override the client-level default timeout for this request, in seconds
8082
"""
83+
if not account_id:
84+
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
8185
return self._get_api_list(
8286
path_template("/accounts/{account_id}/dls/regions", account_id=account_id),
8387
page=SyncCursorPagination[RegionListResponse],
@@ -102,7 +106,7 @@ def get(
102106
self,
103107
region_id: str,
104108
*,
105-
account_id: int,
109+
account_id: str,
106110
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
107111
# The extra values given here take precedence over values defined on the client or passed to this method.
108112
extra_headers: Headers | None = None,
@@ -114,6 +118,8 @@ def get(
114118
Get a DLS region
115119
116120
Args:
121+
account_id: Identifier of a Cloudflare account.
122+
117123
region_id: UUID of the region (custom or managed) or region_key of a managed region.
118124
119125
extra_headers: Send extra headers
@@ -124,6 +130,8 @@ def get(
124130
125131
timeout: Override the client-level default timeout for this request, in seconds
126132
"""
133+
if not account_id:
134+
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
127135
if not region_id:
128136
raise ValueError(f"Expected a non-empty value for `region_id` but received {region_id!r}")
129137
return self._get(
@@ -162,7 +170,7 @@ def with_streaming_response(self) -> AsyncRegionsResourceWithStreamingResponse:
162170
def list(
163171
self,
164172
*,
165-
account_id: int,
173+
account_id: str,
166174
cursor: str | Omit = omit,
167175
per_page: int | Omit = omit,
168176
type: Literal["managed", "custom"] | Omit = omit,
@@ -177,6 +185,8 @@ def list(
177185
List DLS regions for an account
178186
179187
Args:
188+
account_id: Identifier of a Cloudflare account.
189+
180190
cursor: Opaque token for cursor-based pagination. Omit for the first page. Pass the
181191
value from a previous response to fetch the next page.
182192
@@ -190,6 +200,8 @@ def list(
190200
191201
timeout: Override the client-level default timeout for this request, in seconds
192202
"""
203+
if not account_id:
204+
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
193205
return self._get_api_list(
194206
path_template("/accounts/{account_id}/dls/regions", account_id=account_id),
195207
page=AsyncCursorPagination[RegionListResponse],
@@ -214,7 +226,7 @@ async def get(
214226
self,
215227
region_id: str,
216228
*,
217-
account_id: int,
229+
account_id: str,
218230
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
219231
# The extra values given here take precedence over values defined on the client or passed to this method.
220232
extra_headers: Headers | None = None,
@@ -226,6 +238,8 @@ async def get(
226238
Get a DLS region
227239
228240
Args:
241+
account_id: Identifier of a Cloudflare account.
242+
229243
region_id: UUID of the region (custom or managed) or region_key of a managed region.
230244
231245
extra_headers: Send extra headers
@@ -236,6 +250,8 @@ async def get(
236250
237251
timeout: Override the client-level default timeout for this request, in seconds
238252
"""
253+
if not account_id:
254+
raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
239255
if not region_id:
240256
raise ValueError(f"Expected a non-empty value for `region_id` but received {region_id!r}")
241257
return await self._get(

src/cloudflare/types/dls/region_list_params.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88

99

1010
class RegionListParams(TypedDict, total=False):
11-
account_id: Required[int]
11+
account_id: Required[str]
12+
"""Identifier of a Cloudflare account."""
1213

1314
cursor: str
1415
"""Opaque token for cursor-based pagination.

0 commit comments

Comments
 (0)