Skip to content

Commit 41a8d22

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): update via SDK Studio (#1182)
1 parent efafb96 commit 41a8d22

File tree

9 files changed

+61
-1
lines changed

9 files changed

+61
-1
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 1256
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-cb76af21f6fcf485b7e41586c3076cd45d25d6d04971c77ec814523b894dcb97.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cloudflare%2Fcloudflare-f86dcdd3b76e16dc467b91bfa22be2423bd847e93a59d892004b29812777d217.yml

src/cloudflare/resources/zero_trust/networks/routes/networks.py

+8
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def create(
4242
ip_network_encoded: str,
4343
*,
4444
account_id: str,
45+
tunnel_id: str,
4546
comment: str | NotGiven = NOT_GIVEN,
4647
virtual_network_id: str | NotGiven = NOT_GIVEN,
4748
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -61,6 +62,8 @@ def create(
6162
6263
ip_network_encoded: IP/CIDR range in URL-encoded format
6364
65+
tunnel_id: UUID of the tunnel.
66+
6467
comment: Optional remark describing the route.
6568
6669
virtual_network_id: UUID of the virtual network.
@@ -81,6 +84,7 @@ def create(
8184
f"/accounts/{account_id}/teamnet/routes/network/{ip_network_encoded}",
8285
body=maybe_transform(
8386
{
87+
"tunnel_id": tunnel_id,
8488
"comment": comment,
8589
"virtual_network_id": virtual_network_id,
8690
},
@@ -225,6 +229,7 @@ async def create(
225229
ip_network_encoded: str,
226230
*,
227231
account_id: str,
232+
tunnel_id: str,
228233
comment: str | NotGiven = NOT_GIVEN,
229234
virtual_network_id: str | NotGiven = NOT_GIVEN,
230235
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -244,6 +249,8 @@ async def create(
244249
245250
ip_network_encoded: IP/CIDR range in URL-encoded format
246251
252+
tunnel_id: UUID of the tunnel.
253+
247254
comment: Optional remark describing the route.
248255
249256
virtual_network_id: UUID of the virtual network.
@@ -264,6 +271,7 @@ async def create(
264271
f"/accounts/{account_id}/teamnet/routes/network/{ip_network_encoded}",
265272
body=await async_maybe_transform(
266273
{
274+
"tunnel_id": tunnel_id,
267275
"comment": comment,
268276
"virtual_network_id": virtual_network_id,
269277
},

src/cloudflare/resources/zero_trust/networks/routes/routes.py

+16
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def create(
6868
*,
6969
account_id: str,
7070
network: str,
71+
tunnel_id: str,
7172
comment: str | NotGiven = NOT_GIVEN,
7273
virtual_network_id: str | NotGiven = NOT_GIVEN,
7374
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -85,6 +86,8 @@ def create(
8586
8687
network: The private IPv4 or IPv6 range connected by the route, in CIDR notation.
8788
89+
tunnel_id: UUID of the tunnel.
90+
8891
comment: Optional remark describing the route.
8992
9093
virtual_network_id: UUID of the virtual network.
@@ -104,6 +107,7 @@ def create(
104107
body=maybe_transform(
105108
{
106109
"network": network,
110+
"tunnel_id": tunnel_id,
107111
"comment": comment,
108112
"virtual_network_id": virtual_network_id,
109113
},
@@ -260,6 +264,7 @@ def edit(
260264
account_id: str,
261265
comment: str | NotGiven = NOT_GIVEN,
262266
network: str | NotGiven = NOT_GIVEN,
267+
tunnel_id: str | NotGiven = NOT_GIVEN,
263268
virtual_network_id: str | NotGiven = NOT_GIVEN,
264269
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
265270
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -282,6 +287,8 @@ def edit(
282287
283288
network: The private IPv4 or IPv6 range connected by the route, in CIDR notation.
284289
290+
tunnel_id: UUID of the tunnel.
291+
285292
virtual_network_id: UUID of the virtual network.
286293
287294
extra_headers: Send extra headers
@@ -302,6 +309,7 @@ def edit(
302309
{
303310
"comment": comment,
304311
"network": network,
312+
"tunnel_id": tunnel_id,
305313
"virtual_network_id": virtual_network_id,
306314
},
307315
route_edit_params.RouteEditParams,
@@ -339,6 +347,7 @@ async def create(
339347
*,
340348
account_id: str,
341349
network: str,
350+
tunnel_id: str,
342351
comment: str | NotGiven = NOT_GIVEN,
343352
virtual_network_id: str | NotGiven = NOT_GIVEN,
344353
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
@@ -356,6 +365,8 @@ async def create(
356365
357366
network: The private IPv4 or IPv6 range connected by the route, in CIDR notation.
358367
368+
tunnel_id: UUID of the tunnel.
369+
359370
comment: Optional remark describing the route.
360371
361372
virtual_network_id: UUID of the virtual network.
@@ -375,6 +386,7 @@ async def create(
375386
body=await async_maybe_transform(
376387
{
377388
"network": network,
389+
"tunnel_id": tunnel_id,
378390
"comment": comment,
379391
"virtual_network_id": virtual_network_id,
380392
},
@@ -531,6 +543,7 @@ async def edit(
531543
account_id: str,
532544
comment: str | NotGiven = NOT_GIVEN,
533545
network: str | NotGiven = NOT_GIVEN,
546+
tunnel_id: str | NotGiven = NOT_GIVEN,
534547
virtual_network_id: str | NotGiven = NOT_GIVEN,
535548
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
536549
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -553,6 +566,8 @@ async def edit(
553566
554567
network: The private IPv4 or IPv6 range connected by the route, in CIDR notation.
555568
569+
tunnel_id: UUID of the tunnel.
570+
556571
virtual_network_id: UUID of the virtual network.
557572
558573
extra_headers: Send extra headers
@@ -573,6 +588,7 @@ async def edit(
573588
{
574589
"comment": comment,
575590
"network": network,
591+
"tunnel_id": tunnel_id,
576592
"virtual_network_id": virtual_network_id,
577593
},
578594
route_edit_params.RouteEditParams,

src/cloudflare/types/custom_certificates/prioritize_update_params.py

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ class PrioritizeUpdateParams(TypedDict, total=False):
1717

1818

1919
class Certificate(TypedDict, total=False):
20+
id: str
21+
"""Identifier"""
22+
2023
priority: float
2124
"""The order/priority in which the certificate will be used in a request.
2225

src/cloudflare/types/zero_trust/networks/route_create_params.py

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ class RouteCreateParams(TypedDict, total=False):
1414
network: Required[str]
1515
"""The private IPv4 or IPv6 range connected by the route, in CIDR notation."""
1616

17+
tunnel_id: Required[str]
18+
"""UUID of the tunnel."""
19+
1720
comment: str
1821
"""Optional remark describing the route."""
1922

src/cloudflare/types/zero_trust/networks/route_edit_params.py

+3
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@ class RouteEditParams(TypedDict, total=False):
1717
network: str
1818
"""The private IPv4 or IPv6 range connected by the route, in CIDR notation."""
1919

20+
tunnel_id: str
21+
"""UUID of the tunnel."""
22+
2023
virtual_network_id: str
2124
"""UUID of the virtual network."""

src/cloudflare/types/zero_trust/networks/routes/network_create_params.py

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ class NetworkCreateParams(TypedDict, total=False):
1111
account_id: Required[str]
1212
"""Cloudflare account ID"""
1313

14+
tunnel_id: Required[str]
15+
"""UUID of the tunnel."""
16+
1417
comment: str
1518
"""Optional remark describing the route."""
1619

tests/api_resources/zero_trust/networks/routes/test_networks.py

+12
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def test_method_create(self, client: Cloudflare) -> None:
2222
network = client.zero_trust.networks.routes.networks.create(
2323
ip_network_encoded="172.16.0.0%2F16",
2424
account_id="699d98642c564d2e855e9661899b7252",
25+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
2526
)
2627
assert_matches_type(Route, network, path=["response"])
2728

@@ -30,6 +31,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
3031
network = client.zero_trust.networks.routes.networks.create(
3132
ip_network_encoded="172.16.0.0%2F16",
3233
account_id="699d98642c564d2e855e9661899b7252",
34+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
3335
comment="Example comment for this route.",
3436
virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
3537
)
@@ -40,6 +42,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
4042
response = client.zero_trust.networks.routes.networks.with_raw_response.create(
4143
ip_network_encoded="172.16.0.0%2F16",
4244
account_id="699d98642c564d2e855e9661899b7252",
45+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
4346
)
4447

4548
assert response.is_closed is True
@@ -52,6 +55,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
5255
with client.zero_trust.networks.routes.networks.with_streaming_response.create(
5356
ip_network_encoded="172.16.0.0%2F16",
5457
account_id="699d98642c564d2e855e9661899b7252",
58+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
5559
) as response:
5660
assert not response.is_closed
5761
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -67,12 +71,14 @@ def test_path_params_create(self, client: Cloudflare) -> None:
6771
client.zero_trust.networks.routes.networks.with_raw_response.create(
6872
ip_network_encoded="172.16.0.0%2F16",
6973
account_id="",
74+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
7075
)
7176

7277
with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_network_encoded` but received ''"):
7378
client.zero_trust.networks.routes.networks.with_raw_response.create(
7479
ip_network_encoded="",
7580
account_id="699d98642c564d2e855e9661899b7252",
81+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
7682
)
7783

7884
@parametrize
@@ -191,6 +197,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
191197
network = await async_client.zero_trust.networks.routes.networks.create(
192198
ip_network_encoded="172.16.0.0%2F16",
193199
account_id="699d98642c564d2e855e9661899b7252",
200+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
194201
)
195202
assert_matches_type(Route, network, path=["response"])
196203

@@ -199,6 +206,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
199206
network = await async_client.zero_trust.networks.routes.networks.create(
200207
ip_network_encoded="172.16.0.0%2F16",
201208
account_id="699d98642c564d2e855e9661899b7252",
209+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
202210
comment="Example comment for this route.",
203211
virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
204212
)
@@ -209,6 +217,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
209217
response = await async_client.zero_trust.networks.routes.networks.with_raw_response.create(
210218
ip_network_encoded="172.16.0.0%2F16",
211219
account_id="699d98642c564d2e855e9661899b7252",
220+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
212221
)
213222

214223
assert response.is_closed is True
@@ -221,6 +230,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
221230
async with async_client.zero_trust.networks.routes.networks.with_streaming_response.create(
222231
ip_network_encoded="172.16.0.0%2F16",
223232
account_id="699d98642c564d2e855e9661899b7252",
233+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
224234
) as response:
225235
assert not response.is_closed
226236
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -236,12 +246,14 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
236246
await async_client.zero_trust.networks.routes.networks.with_raw_response.create(
237247
ip_network_encoded="172.16.0.0%2F16",
238248
account_id="",
249+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
239250
)
240251

241252
with pytest.raises(ValueError, match=r"Expected a non-empty value for `ip_network_encoded` but received ''"):
242253
await async_client.zero_trust.networks.routes.networks.with_raw_response.create(
243254
ip_network_encoded="",
244255
account_id="699d98642c564d2e855e9661899b7252",
256+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
245257
)
246258

247259
@parametrize

tests/api_resources/zero_trust/networks/test_routes.py

+12
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def test_method_create(self, client: Cloudflare) -> None:
2727
route = client.zero_trust.networks.routes.create(
2828
account_id="699d98642c564d2e855e9661899b7252",
2929
network="172.16.0.0/16",
30+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
3031
)
3132
assert_matches_type(Route, route, path=["response"])
3233

@@ -35,6 +36,7 @@ def test_method_create_with_all_params(self, client: Cloudflare) -> None:
3536
route = client.zero_trust.networks.routes.create(
3637
account_id="699d98642c564d2e855e9661899b7252",
3738
network="172.16.0.0/16",
39+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
3840
comment="Example comment for this route.",
3941
virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
4042
)
@@ -45,6 +47,7 @@ def test_raw_response_create(self, client: Cloudflare) -> None:
4547
response = client.zero_trust.networks.routes.with_raw_response.create(
4648
account_id="699d98642c564d2e855e9661899b7252",
4749
network="172.16.0.0/16",
50+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
4851
)
4952

5053
assert response.is_closed is True
@@ -57,6 +60,7 @@ def test_streaming_response_create(self, client: Cloudflare) -> None:
5760
with client.zero_trust.networks.routes.with_streaming_response.create(
5861
account_id="699d98642c564d2e855e9661899b7252",
5962
network="172.16.0.0/16",
63+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
6064
) as response:
6165
assert not response.is_closed
6266
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -72,6 +76,7 @@ def test_path_params_create(self, client: Cloudflare) -> None:
7276
client.zero_trust.networks.routes.with_raw_response.create(
7377
account_id="",
7478
network="172.16.0.0/16",
79+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
7580
)
7681

7782
@parametrize
@@ -193,6 +198,7 @@ def test_method_edit_with_all_params(self, client: Cloudflare) -> None:
193198
account_id="699d98642c564d2e855e9661899b7252",
194199
comment="Example comment for this route.",
195200
network="172.16.0.0/16",
201+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
196202
virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
197203
)
198204
assert_matches_type(Route, route, path=["response"])
@@ -246,6 +252,7 @@ async def test_method_create(self, async_client: AsyncCloudflare) -> None:
246252
route = await async_client.zero_trust.networks.routes.create(
247253
account_id="699d98642c564d2e855e9661899b7252",
248254
network="172.16.0.0/16",
255+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
249256
)
250257
assert_matches_type(Route, route, path=["response"])
251258

@@ -254,6 +261,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncCloudflare
254261
route = await async_client.zero_trust.networks.routes.create(
255262
account_id="699d98642c564d2e855e9661899b7252",
256263
network="172.16.0.0/16",
264+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
257265
comment="Example comment for this route.",
258266
virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
259267
)
@@ -264,6 +272,7 @@ async def test_raw_response_create(self, async_client: AsyncCloudflare) -> None:
264272
response = await async_client.zero_trust.networks.routes.with_raw_response.create(
265273
account_id="699d98642c564d2e855e9661899b7252",
266274
network="172.16.0.0/16",
275+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
267276
)
268277

269278
assert response.is_closed is True
@@ -276,6 +285,7 @@ async def test_streaming_response_create(self, async_client: AsyncCloudflare) ->
276285
async with async_client.zero_trust.networks.routes.with_streaming_response.create(
277286
account_id="699d98642c564d2e855e9661899b7252",
278287
network="172.16.0.0/16",
288+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
279289
) as response:
280290
assert not response.is_closed
281291
assert response.http_request.headers.get("X-Stainless-Lang") == "python"
@@ -291,6 +301,7 @@ async def test_path_params_create(self, async_client: AsyncCloudflare) -> None:
291301
await async_client.zero_trust.networks.routes.with_raw_response.create(
292302
account_id="",
293303
network="172.16.0.0/16",
304+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
294305
)
295306

296307
@parametrize
@@ -412,6 +423,7 @@ async def test_method_edit_with_all_params(self, async_client: AsyncCloudflare)
412423
account_id="699d98642c564d2e855e9661899b7252",
413424
comment="Example comment for this route.",
414425
network="172.16.0.0/16",
426+
tunnel_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
415427
virtual_network_id="f70ff985-a4ef-4643-bbbc-4a0ed4fc8415",
416428
)
417429
assert_matches_type(Route, route, path=["response"])

0 commit comments

Comments
 (0)